DUNE-ACFEM (2.5.1)

Convenience

Utility helper classes. More...

Classes

struct  Dune::ACFem::LagrangeLeafFunctionSelector< Grid, FunctionSpace, PolOrder, family >
 Helper class which defines likey discrete function types. More...
 
struct  Dune::ACFem::DiscontinuousGalerkinLeafFunctionSelector< Grid, FunctionSpace, PolOrder, family >
 Helper class which defines likey discrete function types. More...
 
struct  Dune::ACFem::DiscontinuousLagrangeLeafFunctionSelector< Grid, FunctionSpace, PolOrder, family >
 Helper class which defines likey discrete function types. More...
 
struct  Dune::ACFem::ExtractFunctor< LocalArray, GlobalArray >
 A functor which extracts values from a global array and copies them to a local array. More...
 
struct  Dune::ACFem::ExtractFunctor< T *, GlobalArray >
 A functor which extracts values from a global array and copies them to a local array. More...
 
struct  Dune::ACFem::PairFunctor< FunctorOne, FunctorTwo >
 Generate a compound functor out of two functors. More...
 
struct  Dune::ACFem::TupleFunctor< Types >
 Generate a compound functor out of a tuple of functors. More...
 
class  Dune::ACFem::LocalObjectFactory< GlobalObject, LocalObject >
 Define a factory for a "local object" which has a constructor which accepts a single argument, a "global object". More...
 
class  Dune::ACFem::LocalObjectStack< Factory, Wrapper >
 Local object stack which (hopefully) efficiently caches local objects. More...
 
struct  Dune::ACFem::MutableLocalObjectStorageProvider< Storage >
 Provide a writable object stack for technical reasons. More...
 
struct  Dune::ACFem::MutableNoStorageProvider< Global >
 Provide a writable pseudo object stack which is only a reference to the global object. More...
 
struct  Dune::ACFem::SolverFamily
 Define some symbolic constants for SolverSelector and "parse" some preprocessort defines. More...
 
struct  Dune::ACFem::SolverSelector< DiscreteFunctionType, OperatorParts, family >
 Select one appropriate (linear) solver depending on whether the model is symmetric and/or semidefinite. More...
 

Functions

template<class FunctorOne , class FunctorTwo >
PairFunctor< FunctorOne, FunctorTwo > Dune::ACFem::makePairFunctor (FunctorOne &&func1, FunctorTwo &&func2)
 Combine two functors into one. More...
 
template<class... Types>
TupleFunctor< Types... > Dune::ACFem::makeTupleFunctor (Types &&... args)
 Combine several functors into one. More...
 
template<class Geometry >
Geometry::ctype Dune::ACFem::h2Estimate (const Geometry &geometry)
 Compute a rough estimate of the square of the diameter of the element's Geometry.
 
template<class Geometry >
Geometry::ctype Dune::ACFem::hEstimate (const Geometry &geometry)
 Compute a rough estimate of the diameter of the element's Geometry.
 
template<typename T >
bool Dune::ACFem::objectToString (const T &something, std::string &text)
 Convert any object which has an associated output stream operator "<<" to a string, return true on success and false on failure.
 
template<typename T >
bool Dune::ACFem::stringToObject (const std::string &text, T &something)
 Convert a string to any object with an associated input stream operator ">>", return true on success and false on failure.
 
static bool Dune::ACFem::checkParenthesis (const std::string &name, unsigned start, unsigned end)
 Check name for correct parenthesis. More...
 
static void Dune::ACFem::trimParenthesis (std::string &name)
 Remove any outer redundant parenthesis.
 
template<class DofMapper , int coDimension, class Functor >
void Dune::ACFem::mapEntityHierarchy (const DofMapper &mapper, const typename DofMapper::ElementType &element, int subIndex, const std::integral_constant< int, coDimension > &dummy, Functor f)
 Iterate over the entire sub-entity hierarchy below one given sub-entity (including the given one) and call the dof-mapper on each sub-entity in turn. More...
 
template<class DofMapper , class Intersection , class Functor >
void Dune::ACFem::mapEachFaceDof (const DofMapper &mapper, const Intersection &intersection, Functor f)
 Iterate over the codim-1 sub-entity hierarchy linked to the given intersection and call the dof-mapper on each sub-entity in turn. More...
 
template<class DofMapper , class Intersection , class LocalIndices , class GlobalIndices >
unsigned Dune::ACFem::mapFaceDofs (const DofMapper &mapper, const Intersection &intersection, LocalIndices &localIndices, GlobalIndices &globalIndices)
 Fetch all global DoFs of the codim-1 entity intersection belongs to. More...
 

Detailed Description

Utility helper classes.

Function Documentation

◆ checkParenthesis()

static bool Dune::ACFem::checkParenthesis ( const std::string &  name,
unsigned  start,
unsigned  end 
)
inlinestatic

Check name for correct parenthesis.

We simply do +- book-keeping for parenthesis, if the count drops below 0 the syntax is not correct, if the count is larger than 0 at the end then the expression it is also not correct. This is only a helper in order to remove the outer-most parenthesis. Provided that the original syntax was correct, it is ok to remove the outer most enclosing parenthesis if this function returns true.

Referenced by Dune::ACFem::trimParenthesis().

◆ makePairFunctor()

template<class FunctorOne , class FunctorTwo >
PairFunctor<FunctorOne, FunctorTwo> Dune::ACFem::makePairFunctor ( FunctorOne &&  func1,
FunctorTwo &&  func2 
)

Combine two functors into one.

Can be used like

blockMapper_.mapEach(entity, makePairFunctor(functor1, functor2));
PairFunctor< FunctorOne, FunctorTwo > makePairFunctor(FunctorOne &&func1, FunctorTwo &&func2)
Combine two functors into one.
Definition: functor.hh:87

See also makeTupleFunctor().

◆ makeTupleFunctor()

template<class... Types>
TupleFunctor<Types...> Dune::ACFem::makeTupleFunctor ( Types &&...  args)

Combine several functors into one.

Can be used like

 blockMapper_.mapEach(entity, makeTupleFunctor(functor1, functor2, ..., functorN));

◆ mapEachFaceDof()

template<class DofMapper , class Intersection , class Functor >
void Dune::ACFem::mapEachFaceDof ( const DofMapper &  mapper,
const Intersection &  intersection,
Functor  f 
)

Iterate over the codim-1 sub-entity hierarchy linked to the given intersection and call the dof-mapper on each sub-entity in turn.

Parameters
[in]mapperThe DoF-mapper to use, for example space_.blockMapper().
[in]intersectionThe intersection carrying the sub-entity information. The mapper will all DoFs attached to intersection.inside() (and all its sub-entities).
[in]fA Functor, generally any callable object with operator() will do (lambda will do).
Note
Also in the non-conforming case all DoFs on the sub-entity are mapped. The point is that the intersection knows the index of the codim-1 sub-entity in the bulk entity and therefore acts as a convenient parameter-transport structure here.

References Dune::ACFem::mapEntityHierarchy().

Referenced by Dune::ACFem::mapFaceDofs().

◆ mapEntityHierarchy()

template<class DofMapper , int coDimension, class Functor >
void Dune::ACFem::mapEntityHierarchy ( const DofMapper &  mapper,
const typename DofMapper::ElementType &  element,
int  subIndex,
const std::integral_constant< int, coDimension > &  dummy,
Functor  f 
)

Iterate over the entire sub-entity hierarchy below one given sub-entity (including the given one) and call the dof-mapper on each sub-entity in turn.

Parameters
[in]mapperThe block-mapper in use.
[in]elementThe bulk (i.e. co-dimension 0) element.
[in]subIndexThe index of the sub-element where the mapping shall occur.
[in]dummyCo-dimension dummy in order to enable arguemnt-dependent lookup (C++ compiler).
[in]fFunctor or generally: callable object. Lambdas will do. The calling convention is not fixed in the type, but we expect a callable with signature f(localDof, globalDof).
Note
Side-effects as implemented by f.

Referenced by Dune::ACFem::mapEachFaceDof().

◆ mapFaceDofs()

template<class DofMapper , class Intersection , class LocalIndices , class GlobalIndices >
unsigned Dune::ACFem::mapFaceDofs ( const DofMapper &  mapper,
const Intersection &  intersection,
LocalIndices &  localIndices,
GlobalIndices &  globalIndices 
)

Fetch all global DoFs of the codim-1 entity intersection belongs to.

This function will construct an array with the global DoFs as well as the local mapping to the local DoFs of the bulk-entity.

Parameters
[in]mapperThe DoF-mapper to use.
[in]intersectionThe intersection carrying the sub-entity information. The mapper will all DoFs attached to intersection.inside() (and all its sub-entities).
[out]localIndiceslocalIndices[i] is the local DoF-number with respect to the bulk-entities basis-function set.

@parma[out] globalIndices The global index corresponding to localIndices[i].

Returns
The number of DoFs attached to the given face.

References Dune::ACFem::mapEachFaceDof().

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 14, 22:29, 2024)