DUNE-ACFEM (unstable)

Convenience

Utility helper classes. More...

Classes

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::GeometryInformation< GridPart, codim >
 Export some hard-to-get-at things for geometries. 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...
 
class  Dune::ACFem::ScopedRedirect
 A class to redirect streams. More...
 
struct  Dune::ACFem::SolverSelector< DiscreteFunction, Model >
 Select one appropriate (linear) solver depending on whether the model is symmetric and/or semidefinite. More...
 
class  Dune::ACFem::TypeString< T >
 A class constructing the name of another type. More...
 

Enumerations

enum class  Dune::ACFem::SolverType
 Define some symbolic constants for SolverSelector and "parse" some preprocessort defines.
 

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<class Intersection >
bool Dune::ACFem::isDomainBoundary (const Intersection &intersection)
 Return true if at the global domain boundary.
 
template<class Intersection >
bool Dune::ACFem::isPeriodicBoundary (const Intersection &intersection)
 Return true if at a periodic boundary. More...
 
template<class Intersection >
bool Dune::ACFem::isProcessorBoundary (const Intersection &intersection)
 Retrun true if at the border to another computing note. More...
 
template<class Intersection >
bool Dune::ACFem::isInterior (const Intersection &intersection)
 Return true if there is a neighbor. More...
 
template<class T >
std::ostream & Dune::ACFem::operator<< (std::ostream &out, TypeString< T > &&t)
 Output operator for TypePrint tag-structure.
 
template<class T >
void Dune::ACFem::prettyPrint (T &&arg, std::ostream &out=std::cout, const bool newLine=true)
 Print something which shows the type that was passed to the function. More...
 
template<class Int , Int I0, Int... I>
std::ostream & Dune::ACFem::operator<< (std::ostream &out, Sequence< Int, I0, I... >)
 Print sequence.
 
template<bool I0, bool... I>
std::ostream & Dune::ACFem::operator<< (std::ostream &out, BoolSequence< I0, I... >)
 Print bool-sequence.
 
template<typename T >
std::string Dune::ACFem::objectToString (const T &something)
 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...
 
template<class T >
auto Dune::ACFem::typeString (T &&t, bool stripNameSpaces=true)
 Generator for TypeString. 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().

◆ isInterior()

template<class Intersection >
bool Dune::ACFem::isInterior ( const Intersection &  intersection)

Return true if there is a neighbor.

Note that this function will return false if there is a neighbor on another computing node, but ghost-cells are unavailable.

◆ isPeriodicBoundary()

template<class Intersection >
bool Dune::ACFem::isPeriodicBoundary ( const Intersection &  intersection)

Return true if at a periodic boundary.

Note that isInterior() will then also return true.

◆ isProcessorBoundary()

template<class Intersection >
bool Dune::ACFem::isProcessorBoundary ( const Intersection &  intersection)

Retrun true if at the border to another computing note.

Note that isInterior() may or may not return true int his case.

Referenced by Dune::ACFem::ParabolicEulerEstimator< OldSolutionFunction, TimeProvider, ImplicitModel, ExplicitModel, Norm >::estimateLocal().

◆ 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:91

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.

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.

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

◆ prettyPrint()

template<class T >
void Dune::ACFem::prettyPrint ( T &&  arg,
std::ostream &  out = std::cout,
const bool  newLine = true 
)

Print something which shows the type that was passed to the function.

Parameters
argDummy, unused.
[in]outostream object
[in]newLinePrint a new line after printing the type.

References Dune::ACFem::typeString().

◆ typeString()

template<class T >
auto Dune::ACFem::typeString ( T &&  t,
bool  stripNameSpaces = true 
)

Generator for TypeString.

Parameters
[in]tAn rvalue-reference of Type T. Only its type is used.
[in]stripNameSpacesStrip Dune::, ACFem:: and Fem:: namespace prefixes.

References Dune::ACFem::TypeString< T >::name().

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

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