AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
Operator module

Defines operators to be assembled in the matrix/vector. More...

Classes

class  GridFunctionOperatorBase< Derived, LC, GF >
 The main implementation of an CRTP-base class for operators using a grid-function coefficient to be used in an Assembler. More...
 
class  GridFunctionOperatorTransposed< Derived, Transposed >
 The transposed operator, implemented in term of its transposed by calling getElementMatrix with inverted arguments. More...
 
struct  PreGridFunctionOperator< Tag, PreGridFct, PQF >
 
class  LocalOperator< Derived, LC >
 The main implementation of an operator to be used in a Assembler. More...
 
class  ConvectionDiffusionOperator< LC, GridFctA, GridFctB, GridFctC, GridFctF, conserving >
 
struct  PreConvectionDiffusionOperator< PreGridFctA, PreGridFctB, PreGridFctC, PreGridFctF, c >
 
class  GridFunctionOperator< tag::divtestvec, LC, GridFct >
 first-order operator \( \langle\nabla\cdot\Psi, c\rangle \) More...
 
class  GridFunctionOperator< tag::divtestvec_trial, LC, GridFct >
 first-order operator \( \langle\nabla\cdot\Psi, c\,\phi\rangle \) More...
 
class  GridFunctionOperator< tag::gradtest, LC, GridFct >
 first-order operator \( \langle\nabla\psi, b\rangle \) More...
 
class  GridFunctionOperator< tag::gradtest_trial, LC, GridFct >
 first-order operator \( \langle\nabla\psi, \mathbf{b}\,\phi\rangle \) More...
 
class  GridFunctionOperator< tag::gradtest_trialvec, LC, GridFct >
 first-order operator \( \langle\nabla\psi, c\,\Phi\rangle \) More...
 
class  GridFunctionOperator< tag::partialtest, LC, GridFct >
 first-order operator \( \langle\partial_i\psi, c\rangle \) More...
 
class  GridFunctionOperator< tag::partialtest_trial, LC, GridFct >
 first-order operator \( \langle\partial_i\psi, c\,\phi\rangle \) More...
 
class  GridFunctionOperator< tag::test_divtrialvec, LC, GridFct >
 first-order operator \( \langle\psi, c\,\nabla\cdot\Phi\rangle \) More...
 
class  GridFunctionOperator< tag::test_gradtrial, LC, GridFct >
 first-order operator \( \langle\psi, \mathbf{b}\cdot\nabla\phi\rangle \) More...
 
class  GridFunctionOperator< tag::test_partialtrial, LC, GridFct >
 first-order operator \( \langle\psi, c\,\partial_i\phi\rangle \) More...
 
class  GridFunctionOperator< tag::testvec_gradtrial, LC, GridFct >
 first-order operator \( \langle\Psi, c\,\nabla\phi\rangle \) More...
 
class  GridFunctionOperator< tag::divtestvec_divtrialvec, LC, GridFct >
 second-order operator \( \langle\nabla\cdot\Psi, c\,\nabla\cdot\Phi\rangle \) More...
 
class  GridFunctionOperator< tag::gradtest_gradtrial, LC, GridFct >
 second-order operator \( \langle\nabla\psi, c\,\nabla\phi\rangle \), or \( \langle\nabla\psi, A\,\nabla\phi\rangle \) More...
 
class  GridFunctionOperator< tag::partialtest_partialtrial, LC, GridFct >
 second-order operator \( \langle\partial_i\psi, c\,\partial_j\phi\rangle \) More...
 
class  GridFunctionOperator< tag::stokes, LC, ViscosityExpr >
 Stokes operator \( \langle\nabla\mathbf{v}, \nu \nabla\mathbf{u}\rangle + \langle\nabla\cdot\mathbf{v}, p\rangle + \langle q, \langle\nabla\cdot\mathbf{u}\rangle \). More...
 
class  GridFunctionOperator< tag::test, LC, GridFct >
 zero-order vector-operator \( (c\, \psi) \) More...
 
class  GridFunctionOperator< tag::test_trial, LC, GridFct >
 zero-order operator \( \langle\psi, c\,\phi\rangle \) More...
 
class  GridFunctionOperator< tag::test_trialvec, LC, GridFct >
 zero-order operator \( \langle\psi, \mathbf{b}\cdot\Phi\rangle \) More...
 
class  GridFunctionOperator< tag::testvec, LC, GridFct >
 zero-order vector-operator \( (\mathbf{b}\cdot\Psi) \) More...
 
class  GridFunctionOperator< tag::testvec_trial, LC, GridFct >
 zero-order operator \( \langle\Psi, \mathbf{b}\,\phi\rangle \) More...
 
class  GridFunctionOperator< tag::testvec_trialvec, LC, GridFct >
 zero-order operator \( \langle\Psi, c\,\Phi\rangle \), or \( \langle\Psi, A\,\Phi\rangle \) More...
 

Typedefs

using LocalContext = LC
 The element or intersection the operator is assembled on.
 
using Element = typename ContextType::Entity
 The codim=0 grid entity.
 
using Geometry = typename Element::Geometry
 The geometry of the Element.
 

Functions

template<class Tag , class Expr , class... QuadratureArgs>
auto makeOperator (Tag tag, Expr &&expr, QuadratureArgs &&... args)
 Store tag and expression into a PreGridFunctionOperator to create a GridFunctionOperator.
 
template<class GridView >
void init (GridView const &gridView)
 Initialize the local operator on the current gridView.
 
void bind (Element const &element, Geometry const &geometry)
 Binds operator to element and geometry. More...
 
void unbind ()
 Unbinds operator from element.
 
template<class CG , class RN , class CN , class Mat >
void calculateElementMatrix (CG const &contextGeo, RN const &rowNode, CN const &colNode, Mat &elementMatrix)
 Assemble a local element matrix on the element that is bound. More...
 
template<class CG , class Node , class Vec >
void calculateElementVector (CG const &contextGeo, Node const &node, Vec &elementVector)
 Assemble a local element vector on the element that is bound. More...
 
Derived & derived ()
 
Derived const & derived () const
 
template<class GridView >
void init_impl (GridView const &)
 
template<class Element , class Geometry >
void bind_impl (Element const &, Geometry const &)
 
void unbind_impl ()
 
template<class RN , class CN >
int getDegree (int derivOrder, int coeffDegree, RN const &rowNode, CN const &colNode) const
 Return the quadrature degree for a matrix operator. More...
 
template<class Node >
int getDegree (int derivOrder, int coeffDegree, Node const &node) const
 Return the quadrature degree for a vector operator. More...
 
template<class Derived , class LC , class GV >
auto makeLocalOperator (LocalOperator< Derived, LC > const &localOp, GV const &)
 Generate a LocalOperator from a PreOperator. More...
 
template<class PreGridFctA , class PreGridFctB , class PreGridFctC , class PreGridFctF , bool conserving = true>
auto convectionDiffusion (PreGridFctA const &gridFctA, PreGridFctB const &gridFctB, PreGridFctC const &gridFctC, PreGridFctF const &gridFctF, bool_t< conserving >={})
 
template<class Context , class... T, class GridView >
auto makeLocalOperator (PreConvectionDiffusionOperator< T... > pre, GridView const &gridView)
 
template<class Expr , class... QuadratureArgs>
auto fot (Expr &&expr, tag::grad_test, QuadratureArgs &&... args)
 Create a first-order term with derivative on trial-function.
 
template<class Expr , class... QuadratureArgs>
auto fot (Expr &&expr, tag::partial_test t, QuadratureArgs &&... args)
 Create a first-order term with derivative on trial-function.
 
template<class Expr , class... QuadratureArgs>
auto fot (Expr &&expr, tag::grad_trial, QuadratureArgs &&... args)
 Create a first-order term with derivative on test-function.
 
template<class Expr , class... QuadratureArgs>
auto fot (Expr &&expr, tag::partial_trial t, QuadratureArgs &&... args)
 Create a first-order term with derivative on trial-function.
 
template<class Expr , class... QuadratureArgs>
auto sot (Expr &&expr, QuadratureArgs &&... args)
 Create a second-order term.
 
template<class Expr , class... QuadratureArgs>
auto sot_ij (Expr &&expr, std::size_t comp_test, std::size_t comp_trial, QuadratureArgs &&... args)
 Create a second-order term of partial derivatives.
 
template<class Expr , class... QuadratureArgs>
auto zot (Expr &&expr, QuadratureArgs &&... args)
 Create a zero-order term.
 

Variables

bool isSimplex_ = false
 
bool isAffine_ = false
 
bool bound_ = false
 

Detailed Description

Defines operators to be assembled in the matrix/vector.

An Operator is a class providing methods necessary for assembling:

Function Documentation

◆ bind()

void bind ( Element const &  element,
Geometry const &  geometry 
)
inline

Binds operator to element and geometry.

Binding an operator to the currently visited element in grid traversal. Since all operators need geometry information, the Element::Geometry object geometry is created once, during grid traversal, and passed in.

By default, it binds the localFct_ to the element.

◆ calculateElementMatrix()

void calculateElementMatrix ( CG const &  contextGeo,
RN const &  rowNode,
CN const &  colNode,
Mat &  elementMatrix 
)
inline

Assemble a local element matrix on the element that is bound.

Parameters
contextGeoContainer for geometry related data, ContextGeometry
rowNodeThe node of the test-basis
colNodeThe node of the trial-basis
elementMatrixThe output element matrix

◆ calculateElementVector()

void calculateElementVector ( CG const &  contextGeo,
Node const &  node,
Vec &  elementVector 
)
inline

Assemble a local element vector on the element that is bound.

Parameters
contextGeoContainer for geometry related data ContextGeometry
nodeThe node of the test-basis
elementVectorThe output element vector

◆ getDegree() [1/2]

int getDegree ( int  derivOrder,
int  coeffDegree,
RN const &  rowNode,
CN const &  colNode 
) const
inlineprotected

Return the quadrature degree for a matrix operator.

The quadrature degree that is necessary, to integrate the expression multiplied with (possibly derivatives of) shape functions. Thus it needs the order of derivatives, this operator implements.

Template Parameters
RNRowNode
CNColNode

Referenced by GridFunctionOperatorBase< GridFunctionOperator< tag::test_gradtrial, LC, GridFct >, LC, GridFct >::getQuadratureRule().

◆ getDegree() [2/2]

int getDegree ( int  derivOrder,
int  coeffDegree,
Node const &  node 
) const
inlineprotected

Return the quadrature degree for a vector operator.

The quadrature degree that is necessary, to integrate the expression multiplied with (possibly derivatives of) shape functions. Thus it needs the order of derivatives, this operator implements.

◆ makeLocalOperator()

auto AMDiS::makeLocalOperator ( LocalOperator< Derived, LC > const &  localOp,
GV const &   
)

Generate a LocalOperator from a PreOperator.

Template Parameters
DerivedImplementation of LocalOperator
LCLocalContext
GVGridView