21 #ifndef bempp_boundary_operator_hpp
22 #define bempp_boundary_operator_hpp
24 #include "../common/common.hpp"
25 #include "../common/shared_ptr.hpp"
26 #include "transposition_mode.hpp"
28 #include <boost/mpl/set.hpp>
29 #include <boost/mpl/has_key.hpp>
30 #include <boost/utility/enable_if.hpp>
31 #include <boost/weak_ptr.hpp>
38 template <
typename BasisFunctionType>
class Space;
39 template <
typename ResultType>
class DiscreteBoundaryOperator;
40 template <
typename BasisFunctionType,
typename ResultType>
class AbstractBoundaryOperator;
41 template <
typename BasisFunctionType,
typename ResultType>
class Context;
42 template <
typename BasisFunctionType,
typename ResultType>
class GridFunction;
62 template <
typename BasisFunctionType,
typename ResultType>
83 BasisFunctionType, ResultType> >&
context,
85 BasisFunctionType, ResultType> >& abstractOp);
102 BasisFunctionType, ResultType> >&
context,
104 BasisFunctionType, ResultType> >& abstractOp);
118 shared_ptr<const AbstractBoundaryOperator<BasisFunctionType, ResultType> >
122 shared_ptr<const Context<BasisFunctionType, ResultType> >
context()
const;
129 shared_ptr<const DiscreteBoundaryOperator<ResultType> >
weakForm()
const;
136 shared_ptr<const Space<BasisFunctionType> >
domain()
const;
143 shared_ptr<const Space<BasisFunctionType> >
range()
const;
150 shared_ptr<const Space<BasisFunctionType> >
dualToRange()
const;
153 std::string
label()
const;
192 ResultType alpha, ResultType beta)
const;
196 shared_ptr<const Context<BasisFunctionType, ResultType> > m_context;
197 shared_ptr<const AbstractBoundaryOperator<BasisFunctionType, ResultType> >
200 typedef shared_ptr<const DiscreteBoundaryOperator<ResultType> >
201 ConstWeakFormContainer;
202 mutable shared_ptr<ConstWeakFormContainer> m_weakFormContainer;
203 typedef boost::weak_ptr<const DiscreteBoundaryOperator<ResultType> >
204 WeakConstWeakFormContainer;
205 mutable shared_ptr<WeakConstWeakFormContainer> m_weakWeakFormContainer;
211 template <
typename BasisFunctionType,
typename ResultType>
219 template <
typename BasisFunctionType,
typename ResultType>
227 template <
typename BasisFunctionType,
typename ResultType>
236 template <
typename BasisFunctionType,
typename ResultType>
248 template <
typename BasisFunctionType,
typename ResultType,
typename ScalarType>
249 typename boost::enable_if<
250 typename boost::mpl::has_key<
251 boost::mpl::set<float, double, std::complex<float>, std::complex<double> >,
256 const ScalarType& scalar);
263 template <
typename BasisFunctionType,
typename ResultType,
typename ScalarType>
265 const ScalarType& scalar,
273 template <
typename BasisFunctionType,
typename ResultType,
typename ScalarType>
276 const ScalarType& scalar);
289 template <
typename BasisFunctionType,
typename ResultType>
299 template <
typename BasisFunctionType,
typename ResultType>
315 template <
typename BasisFunctionType,
typename ResultType>
329 template <
typename BasisFunctionType,
typename ResultType>
341 template <
typename BasisFunctionType,
typename ResultType>
344 std::string message =
"");
349 template <
typename BasisFunctionType,
typename ResultType>
352 std::string message =
"");
Function space.
Definition: assembled_potential_operator.hpp:35
void initialize(const shared_ptr< const Context< BasisFunctionType, ResultType > > &context, const shared_ptr< const AbstractBoundaryOperator< BasisFunctionType, ResultType > > &abstractOp)
Initialize or reinitialize a BoundaryOperator.
Definition: boundary_operator.cpp:54
Assembly context.
Definition: context.hpp:30
void apply(const TranspositionMode trans, const GridFunction< BasisFunctionType, ResultType > &x_in, GridFunction< BasisFunctionType, ResultType > &y_inout, ResultType alpha, ResultType beta) const
Act on a GridFunction.
Definition: boundary_operator.cpp:181
TranspositionMode
Enumeration determining how a discrete boundary operator is transformed before being applied...
Definition: transposition_mode.hpp:37
shared_ptr< const Space< BasisFunctionType > > range() const
Return a shared pointer to the range of the encapsulated abstract boundary operator.
Definition: boundary_operator.cpp:136
void holdWeakForm(bool value)
Specify whether the BoundaryOperator should prevent its weak form from being destroyed.
Definition: boundary_operator.cpp:170
Operator acting on functions defined on a surface.
Definition: boundary_operator.hpp:63
Abstract (non-discretized) boundary operator.
Definition: abstract_boundary_operator.hpp:90
shared_ptr< const Context< BasisFunctionType, ResultType > > context() const
Return a shared pointer to the stored Context object.
Definition: boundary_operator.cpp:96
Function defined on a grid.
Definition: assembled_potential_operator.hpp:34
void uninitialize()
Uninitialize the BoundaryOperator.
Definition: boundary_operator.cpp:73
shared_ptr< const AbstractBoundaryOperator< BasisFunctionType, ResultType > > abstractOperator() const
Return a shared pointer to the encapsulated abstract boundary operator.
Definition: boundary_operator.cpp:89
bool isWeakFormHeld() const
Return true if the BoundaryOperator should prevent its weak form from being destroyed.
Definition: boundary_operator.cpp:163
BoundaryOperator()
Construct an uninitialized BoundaryOperator.
Definition: boundary_operator.cpp:37
shared_ptr< const DiscreteBoundaryOperator< ResultType > > weakForm() const
Return a shared pointer to the weak form of the encapsulated abstract boundary operator.
Definition: boundary_operator.cpp:103
shared_ptr< const Space< BasisFunctionType > > domain() const
Return a shared pointer to the domain of the encapsulated abstract boundary operator.
Definition: boundary_operator.cpp:127
std::string label() const
Return the label of this BoundaryOperator.
Definition: boundary_operator.cpp:154
shared_ptr< const Space< BasisFunctionType > > dualToRange() const
Return a shared pointer to the space dual to the range of the encapsulated abstract boundary operator...
Definition: boundary_operator.cpp:145
bool isInitialized() const
Return true if the BoundaryOperator has been initialized, false otherwise.
Definition: boundary_operator.cpp:82