DUNE-ACFEM (unstable)
A default implementation for bulk block constraints. More...
#include <dune/acfem/operators/constraints/bulkblockconstraints.hh>
Public Member Functions | |
BulkBlockConstraints (const DiscreteFunctionSpaceType &space) | |
Construct an empty operator. | |
virtual void | update () const =0 |
Update the set of constrained DoFs and their prescirbed DoF-values. More... | |
virtual void | updateValues () const |
Only update the prescribed values. More... | |
template<class DomainDiscreteFunction , class RangeDiscreteFunction > | |
void | operator() (const DomainDiscreteFunction &u, RangeDiscreteFunction &w) const |
Apply the operator to the given argument. More... | |
template<class DomainDiscreteFunction , class JacobianOperator > | |
void | jacobian (const DomainDiscreteFunction &u, JacobianOperator &jOp) const |
The Jacobian of the operator. More... | |
template<class DomainDiscreteFunction , class JacobianOperator > | |
void | applyToOperator (const DomainDiscreteFunction &u, JacobianOperator &jOp) const |
Dune::Fem compat. | |
template<class DomainDiscreteFunction > | |
void | constrain (DomainDiscreteFunction &w) const |
The solution operator; unconditionally install the given constraints into the argument. More... | |
template<class DomainDiscreteFunction > | |
void | zeroConstrain (DomainDiscreteFunction &w) const |
Unconditionally set the values of all masked DoFs to zero. | |
size_t | size () const |
Return the number of constrained scalar DoFs. | |
void | reset () const |
Delete the cached "sequence" of the underlying discrete space. More... | |
Detailed Description
class Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >
A default implementation for bulk block constraints.
BulkBlockConstraints maintain a flag vector of masked-out DoFs and a DiscreteFunction which contains the values the masked-out DoFs are constrained to. Despite their name currently this class also serves as base for the DirichletBlockConstraints class. The implementation should be fairly efficient, but at the cost of the memory overhead caused by storing the constaint-values in an ordinary Dune::Fem::DiscreteFunction. We only implement the differentiable variant which needs a JacobianOperator (typically a matrix-class) as template argument.
Member Function Documentation
◆ constrain()
|
inline |
The solution operator; unconditionally install the given constraints into the argument.
This "solves"
\[ w - g = 0 \]
for w.
References Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::checkUpdate(), and Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::size().
◆ jacobian()
|
inline |
The Jacobian of the operator.
As the operator acts as identity minus affine offset, the Jacobian acts as identity. The methods does not alter any lines of jOp
except for the "active" DoFs. The method handles slave-DoFs correctly in parallel runs.
References Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::checkUpdate(), and Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::size().
Referenced by Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::applyToOperator().
◆ operator()()
|
inline |
Apply the operator to the given argument.
This operates as an affine linear operator which computes
w = u - g
where g defines the target constraints values. The operator acts only on the given subset of "active" DoFs (e.g. the boundary DoFs) and leaves all other values of w alone.
References Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::checkUpdate(), and Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::size().
◆ reset()
|
inline |
Delete the cached "sequence" of the underlying discrete space.
The next call to checkUpdate() will then trigger an update of mask and values.
Referenced by Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::updateValues().
◆ update()
|
pure virtual |
Update the set of constrained DoFs and their prescirbed DoF-values.
It is up to the implementation to decide how this could be done ... ;)
Implemented in Dune::ACFem::DirichletConstraints< DiscreteFunctionSpace, Model, void, std::enable_if_t< true &&IsPDEModel< Model >::value &&!HasEmptySupport< Model >::value > >, and Dune::ACFem::DirichletConstraints< DiscreteFunctionSpace, BoundaryValues, Indicator, std::enable_if_t<(IsWrappableByConstLocalFunction< BoundaryValues >::value &&IsBoundaryIndicator< Indicator >::value &&!IndicatorTraits< Indicator >::emptySupport)> >.
References Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::communicate().
Referenced by Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::checkUpdate(), and Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::updateValues().
◆ updateValues()
|
inlinevirtual |
Only update the prescribed values.
The default implementation is to reset the space-sequence and simply update values and mask. Individual implementation may want to handle this more efficiently.
References Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::reset(), and Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::update().
The documentation for this class was generated from the following file:
- dune/acfem/operators/constraints/bulkblockconstraints.hh