#include <Operators_fwd.hpp>
Base class for a differential operator.
Also doubles as a one-element family.
Derived | Derived class inheriting, used for CRTP. |
Example of custom operator usage. Definition:
Usage:
See also custom_operators example in the examples suite.
Definition at line 33 of file Operators_fwd.hpp.
Public Member Functions | |
std::array< Derived, 1 > | operators () const |
Return an iterable of iterators represented by a family. More... | |
template<typename basis_t > | |
basis_t::scalar_t | apply (const basis_t &basis, int index, typename basis_t::vector_t point, const std::vector< typename basis_t::vector_t > &support, typename basis_t::scalar_t scale) const |
Apply this operator to a given basis function. More... | |
template<typename basis_t > | |
basis_t::scalar_t | applyAt0 (const basis_t &basis, int index, const std::vector< typename basis_t::vector_t > &support, typename basis_t::scalar_t scale) const |
Like apply, but with point equal to 0. More... | |
Public Types | |
typedef Derived | operator_t |
Type of the contained operators. More... | |
basis_t::scalar_t mm::Operator< Derived >::apply | ( | const basis_t & | basis, |
int | index, | ||
typename basis_t::vector_t | point, | ||
const std::vector< typename basis_t::vector_t > & | support, | ||
typename basis_t::scalar_t | scale | ||
) | const |
Apply this operator to a given basis function.
This function should be specialized (overloaded) for more concrete values of basis_t
in concrete classes inheriting form this one. It is intended that this function is never called but only serves as a default for demonstration purposes and better error messages.
basis_t | Basis type. |
basis | The basis \(b\) to apply the operator to. |
index | Which element of the basis to apply the operator to. |
point | At which aldeary shifted and translated point to apply the operator. |
support | Local support domain (already shifted and scaled). These are the values \((x-c)/s\) in the equation below. |
scale | Local scaling factor \(s\) |
index
-th basis function \(b_i\). The function returns \(L b_i((x-c)/s)\). Not that the operator \(L\) is usually something like "derivative wrt. x" and factors of \(s\) appear in the result. Definition at line 16 of file Operators.hpp.
basis_t::scalar_t mm::Operator< Derived >::applyAt0 | ( | const basis_t & | basis, |
int | index, | ||
const std::vector< typename basis_t::vector_t > & | support, | ||
typename basis_t::scalar_t | scale | ||
) | const |
Like apply, but with point equal to 0.
Definition at line 25 of file Operators.hpp.
|
inline |
Return an iterable of iterators represented by a family.
As this is a single operator, the family consists of itself only.
Definition at line 44 of file Operators_fwd.hpp.