DUNE-ACFEM (unstable)

Dune::ACFem::DirichletConstraints< DiscreteFunctionSpace, Model, void, std::enable_if_t< true &&IsPDEModel< Model >::value &&!HasEmptySupport< Model >::value > > Class Template Reference

Implementation of Dirichlet constraints given a PDE-model. More...

#include <dune/acfem/operators/constraints/dirichletconstraints.hh>

+ Collaboration diagram for Dune::ACFem::DirichletConstraints< DiscreteFunctionSpace, Model, void, std::enable_if_t< true &&IsPDEModel< Model >::value &&!HasEmptySupport< Model >::value > >:

Public Types

typedef DiscreteFunctionSpaceType::GridType GridType
 type of grid
 

Public Member Functions

void update () const
 Rebuild everything in case the sequence number of the underlying space has changed, i.e. More...
 
size_t size () const
 Return the number of constrained scalar DoFs.
 
template<class DomainDiscreteFunction , class JacobianOperator >
void jacobian (const DomainDiscreteFunction &u, JacobianOperator &jOp) const
 The Jacobian of the operator. More...
 
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.
 
virtual void communicate () const
 Communicate the mask-values and the Dirichlet values as needed.
 
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...
 

Protected Member Functions

void updateBoundaryValues () const
 Update the flag vector and interpolate the boundary values.
 
void checkUpdate () const
 Update mask and values if the underlying space has changed.
 
virtual void communicate () const
 Communicate the mask-values and the Dirichlet values as needed.
 

Detailed Description

template<class DiscreteFunctionSpace, class Model>
class Dune::ACFem::DirichletConstraints< DiscreteFunctionSpace, Model, void, std::enable_if_t< true &&IsPDEModel< Model >::value &&!HasEmptySupport< Model >::value > >

Implementation of Dirichlet constraints given a PDE-model.

Member Function Documentation

◆ constrain() [1/2]

template<class DiscreteFunctionSpace , template< class T, class Alloc=std::allocator< T > > class MaskStorage = std::vector>
template<class DomainDiscreteFunction >
void Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::constrain ( DomainDiscreteFunction &  w) const
inlineinherited

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().

◆ constrain() [2/2]

template<class DiscreteFunctionSpace , class Model >
template<class DomainDiscreteFunction >
void Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::constrain ( class DomainDiscreteFunction  )
inline

The solution operator; unconditionally install the given constraints into the argument.

This "solves"

\[ w - g = 0 \]

for w.

◆ jacobian() [1/2]

template<class DiscreteFunctionSpace , template< class T, class Alloc=std::allocator< T > > class MaskStorage = std::vector>
template<class DomainDiscreteFunction , class JacobianOperator >
void Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::jacobian ( const DomainDiscreteFunction &  u,
JacobianOperator &  jOp 
) const
inlineinherited

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().

◆ jacobian() [2/2]

template<class DiscreteFunctionSpace , class Model >
template<class DomainDiscreteFunction , class JacobianOperator >
void Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::jacobian ( class DomainDiscreteFunction  ,
class JacobianOperator   
)
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.

◆ operator()()

template<class DiscreteFunctionSpace , template< class T, class Alloc=std::allocator< T > > class MaskStorage = std::vector>
template<class DomainDiscreteFunction , class RangeDiscreteFunction >
void Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::operator() ( const DomainDiscreteFunction &  u,
RangeDiscreteFunction &  w 
) const
inlineinherited

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()

template<class DiscreteFunctionSpace , template< class T, class Alloc=std::allocator< T > > class MaskStorage = std::vector>
void Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::reset ( ) const
inlineinherited

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()

template<class DiscreteFunctionSpace , class Model >
void Dune::ACFem::DirichletConstraints< DiscreteFunctionSpace, Model, void, std::enable_if_t< true &&IsPDEModel< Model >::value &&!HasEmptySupport< Model >::value > >::update ( ) const
inlinevirtual

Rebuild everything in case the sequence number of the underlying space has changed, i.e.

after mesh adaptation.

Implements Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >.

◆ updateValues()

template<class DiscreteFunctionSpace , template< class T, class Alloc=std::allocator< T > > class MaskStorage = std::vector>
virtual void Dune::ACFem::BulkBlockConstraints< DiscreteFunctionSpace, MaskStorage >::updateValues ( ) const
inlinevirtualinherited

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:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 25, 22:37, 2024)