DUNE-ACFEM (unstable)

Dune::ACFem::ModelBase< DomainFunctionSpace, RangeFunctionSpace > Struct Template Reference

A structure defining some basic default types and methods. More...

#include <dune/acfem/models/modelbase.hh>

FunctionSpaceTypes

Forward some basic type from the supplied function-spaces to the model class.

Note that FunctionSpace is defined as a shortcut for RangeFunctionSpace in order to simplify the common case DomainFunctionSpace == RangeFunctionSpace.

template<class FunctionSpace >
using HessianRangeSelector = typename std::conditional< std::is_convertible< typename FunctionSpace::RangeType, typename FunctionSpace::HessianRangeType >::value, Fem::ExplicitFieldVector< typename FunctionSpace::HessianRangeType::value_type, FunctionSpace::dimRange >, typename FunctionSpace::HessianRangeType >::type
 The type returned by classifyBoundary().
 
using RangeFunctionSpaceType = RangeFunctionSpace
 The type returned by classifyBoundary().
 
using DomainFunctionSpaceType = DomainFunctionSpace
 The type returned by classifyBoundary().
 
using FunctionSpaceType = RangeFunctionSpaceType
 The type returned by classifyBoundary().
 
using DomainType = typename FunctionSpaceType::DomainType
 The type returned by classifyBoundary().
 
using RangeType = typename FunctionSpaceType::RangeType
 The type returned by classifyBoundary().
 
using JacobianRangeType = typename FunctionSpaceType::JacobianRangeType
 The type returned by classifyBoundary().
 
using HessianRangeType = HessianRangeSelector< FunctionSpaceType >
 The type returned by classifyBoundary().
 
using DomainFieldType = typename FunctionSpaceType::DomainFieldType
 The type returned by classifyBoundary().
 
using RangeFieldType = typename FunctionSpaceType::RangeFieldType
 The type returned by classifyBoundary().
 
using DomainRangeType = typename DomainFunctionSpaceType::RangeType
 The type returned by classifyBoundary().
 
using DomainDomainType = typename DomainFunctionSpaceType::DomainType
 The type returned by classifyBoundary().
 
using DomainJacobianRangeType = typename DomainFunctionSpaceType::JacobianRangeType
 The type returned by classifyBoundary().
 
using DomainHessianRangeType = HessianRangeSelector< DomainFunctionSpaceType >
 The type returned by classifyBoundary().
 
using DomainDomainFieldType = typename DomainFunctionSpaceType::DomainFieldType
 The type returned by classifyBoundary().
 
using DomainRangeFieldType = typename DomainFunctionSpaceType::RangeFieldType
 The type returned by classifyBoundary().
 
using RangeRangeType = typename RangeFunctionSpaceType::RangeType
 The type returned by classifyBoundary().
 
using RangeDomainType = typename RangeFunctionSpaceType::DomainType
 The type returned by classifyBoundary().
 
using RangeJacobianRangeType = typename RangeFunctionSpaceType::JacobianRangeType
 The type returned by classifyBoundary().
 
using RangeHessianRangeType = HessianRangeSelector< RangeFunctionSpaceType >
 The type returned by classifyBoundary().
 
using RangeDomainFieldType = typename RangeFunctionSpaceType::DomainFieldType
 The type returned by classifyBoundary().
 
using RangeRangeFieldType = typename RangeFunctionSpaceType::RangeFieldType
 The type returned by classifyBoundary().
 
using BoundaryConditionsType = std::pair< bool, std::bitset< dimRange > >
 The type returned by classifyBoundary().
 
static constexpr int dimDomain = FunctionSpaceType::dimDomain
 The type returned by classifyBoundary().
 
static constexpr int dimRange = FunctionSpaceType::dimRange
 The type returned by classifyBoundary().
 
static constexpr int domainDimDomain = DomainFunctionSpaceType::dimDomain
 The type returned by classifyBoundary().
 
static constexpr int domainDimRange = DomainFunctionSpaceType::dimRange
 
static constexpr int rangeDimDomain = RangeFunctionSpaceType::dimDomain
 The type returned by classifyBoundary().
 
static constexpr int rangeDimRange = RangeFunctionSpaceType::dimRange
 
std::string name () const
 Print a descriptive name for debugging and output.
 
template<class Entity >
void bind (const Entity &entity)
 Bind to the given entity. More...
 
void unbind ()
 Unbind from the previously bound entity. More...
 
template<class Intersection >
auto classifyBoundary (const Intersection &intersection)
 Bind to the given intersection and classify the components w.r.t. More...
 

Detailed Description

template<class DomainFunctionSpace, class RangeFunctionSpace = DomainFunctionSpace>
struct Dune::ACFem::ModelBase< DomainFunctionSpace, RangeFunctionSpace >

A structure defining some basic default types and methods.

All models "must" inherit from this class.

Member Function Documentation

◆ bind()

template<class DomainFunctionSpace , class RangeFunctionSpace = DomainFunctionSpace>
template<class Entity >
void Dune::ACFem::ModelBase< DomainFunctionSpace, RangeFunctionSpace >::bind ( const Entity &  entity)
inline

Bind to the given entity.

Parameters
[in]entityThe entity to bind to.
Warning
Calling any other method without first binding the model results in undefined behaviour.
Models needing this method need to reimplement it. This is just here to obey the "bindable" interface of Dune::Fem.

◆ classifyBoundary()

template<class DomainFunctionSpace , class RangeFunctionSpace = DomainFunctionSpace>
template<class Intersection >
auto Dune::ACFem::ModelBase< DomainFunctionSpace, RangeFunctionSpace >::classifyBoundary ( const Intersection &  intersection)
inline

Bind to the given intersection and classify the components w.r.t.

to the kind of applicable boundary conditions.

Warning
Note that prior to calling this function the model has to be bound to the inside entity of the given intersection. Failing to do so generates undefined behaviour.
The result of calling the other boundary related methods without binding to an intersection is undefined.
If RESULT.first is false, then the result of calling any of the other boundary related functions is undefined. Philosophically, they should return 0 in this case, but in order to have decent performance they give a damn and just don't care.
If RESULT.first is true, then still you cannot rely on user-friendly behaviour:
  • only if the respective bit of RESULT.second is set to 1, then the Dirichlet value in this compoment is well-defined.
  • only if the respective bit of RESULT.second is set to 0, then the Robin value in this component is well defined.
Parameters
[in]intersectionThe intersection to bind to.
Returns
A tuple. First component is a bool which is true iff any of the boundary related data functions would result in non trivial results. Second component is a bitset of size dimRange which is true if the given component of the system is subject to Dirichlet boundary conditions and false if it is subject to Robin or Neumann boundary conditions. If first is false then the contents of the bitset is undefined.

◆ unbind()

template<class DomainFunctionSpace , class RangeFunctionSpace = DomainFunctionSpace>
void Dune::ACFem::ModelBase< DomainFunctionSpace, RangeFunctionSpace >::unbind ( )
inline

Unbind from the previously bound entity.

Warning
Calling this method on an unbound model may cause undefined behaviour.
Models needing this method need to reimplement it. This is just here to obey the "bindable" interface of Dune::Fem.

Member Data Documentation

◆ domainDimRange

template<class DomainFunctionSpace , class RangeFunctionSpace = DomainFunctionSpace>
constexpr int Dune::ACFem::ModelBase< DomainFunctionSpace, RangeFunctionSpace >::domainDimRange = DomainFunctionSpaceType::dimRange
staticconstexpr

◆ rangeDimRange

template<class DomainFunctionSpace , class RangeFunctionSpace = DomainFunctionSpace>
constexpr int Dune::ACFem::ModelBase< DomainFunctionSpace, RangeFunctionSpace >::rangeDimRange = RangeFunctionSpaceType::dimRange
staticconstexpr

The documentation for this struct was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)