Implements operators for intuitive equation notation. More...
Classes | |
class | mm::ExplicitOperators< shape_storage_type > |
A class for evaluating typical operators needed in spatial discretization. More... | |
class | mm::ExplicitVectorOperators< shape_storage_type > |
A class for evaluating typical operators needed in spatial discretization. More... | |
class | mm::ImplicitOperators< shape_storage_type, matrix_type, rhs_type > |
This class represents implicit operators that fill given matrix M and right hand side rhs with appropriate coefficients approximating differential operators with shape functions from given shape storage ss. More... | |
class | mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type > |
This class represents implicit vector operators that fill given matrix M and right hand side rhs with appropriate coefficients approximating differential operators with shape functions from given shape storage ss. More... | |
class | mm::RaggedShapeStorage< vec_t, OpFamilies > |
Efficiently stores shape functions of different lengths. More... | |
class | mm::ShapeStorage< Derived, vec_t, OpFamilies > |
Shape storage base class. More... | |
class | mm::UniformShapeStorage< vec_t, OpFamilies > |
Efficiently stores shape functions of uniform length. More... | |
Functions | |
template<typename approx_t , typename shape_storage_t , typename ... OpFamilies> | |
void | mm::computeShapes (const DomainDiscretization< typename approx_t::vector_t > &domain, approx_t approx, const indexes_t &indexes, const std::tuple< OpFamilies... > &operators, shape_storage_t *storage) |
Computes shape functions (stencil weights) for given nodes using support domains from domain and approximations provided by approx . More... | |
Implements operators for intuitive equation notation.
Shapes defined by the approximation can be computed with computeShapes functions, which has built in parallelization.
Computed stencil weights / shape functions are stored in ShapeStorage and can be used to construct operators. These operators enable an intuitive and expressive syntax which directly corresponds to the mathematics notation.
For implicit operators, one simply writes the equations:
Explicit operators can be applied directly to scalar or vector fields:
void mm::computeShapes | ( | const DomainDiscretization< typename approx_t::vector_t > & | domain, |
approx_t | approx, | ||
const indexes_t & | indexes, | ||
const std::tuple< OpFamilies... > & | operators, | ||
shape_storage_t * | storage | ||
) |
Computes shape functions (stencil weights) for given nodes using support domains from domain
and approximations provided by approx
.
The computed shapes are stored in storage
.
approx_t | Type of the approximation engine to use. Must satisfy the Approximation engine concept. |
shape_storage_t | Type of the shape storage. Must satisfy the Shape storage concept. |
OpFamilies | A list of operator families for which to compute the shapes. The families must satisfy the Operator family concept. The family types must be unique. |
[in] | domain | Domain discretization for which to compute the shape functions. |
[in] | approx | Approximation engine specifying the shape computation procedure. |
[in] | indexes | A set of indexes for which to compute the shape functions. Common values are domain.all(), domain.interior(), domain.boundary(). |
[in] | operators | Object representing operator families. |
[out] | storage | An object for storing the shape functions. The object is filled during computation, but must be appropriately reserved before computing shapes, by using ShapeStorage::resize. |
-fopenmp
, for ICC: -openmp
.Usage example:
Usage with (dummy) custom operator: