DUNE-ACFEM (unstable)

GridFunctions

Modules

 GridFunctionModules
 
 GridFunctionTests
 

Classes

class  Dune::ACFem::GridFunction::BindableTensorFunction< Expr, GridPart, AutoDiffOrder, IndeterminateId >
 Wrap a tensor into a Fem::BindableGridFunction. More...
 
class  Dune::ACFem::GridFunction::ElementMeasurePlaceholder< GridPart >
 A placeholder tensor which evaluates to the measure of the element after binding it. More...
 
class  Dune::ACFem::GridFunction::LocalFunctionPlaceholder< LocalFunction, IndeterminateId >
 A placeholder tensor which wraps a Dune::Fem LocalFunction. More...
 
struct  Dune::ACFem::GridFunction::IsLocalFunctionPlaceholder< T >
 std::true_type if T is a LocalFunctionPlaceholder. More...
 

Functions

template<class GridPart , class T , std::size_t MaxOrder = Policy::autoDiffLimit(), std::size_t IndeterminateId = Policy::indeterminateId(), std::enable_if_t<(IsTensor< T >::value &&!IsClosure< T >::value), int > = 0>
auto Dune::ACFem::GridFunction::gridFunction (const GridPart &gridPart, T &&t, IndexConstant< MaxOrder > maxOrder=IndexConstant< MaxOrder >{}, IndexConstant< IndeterminateId > id=IndexConstant< IndeterminateId >{})
 Generate a BindableGridFunction which wraps a copy of T. More...
 
template<class T , std::size_t MaxOrder = Policy::autoDiffLimit(), std::size_t IndeterminateId = Policy::indeterminateId(), std::enable_if_t<(IsTensor< T >::value &&IsGridPartProvider< T >::value), int > = 0>
auto Dune::ACFem::GridFunction::gridFunction (T &&t, IndexConstant< MaxOrder > maxOrder=IndexConstant< MaxOrder >{}, IndexConstant< IndeterminateId > id=IndexConstant< IndeterminateId >{})
 Generate a BindableGridFunction which wraps a copy of T. More...
 
template<class GridPart , class F , std::size_t MaxOrder = Policy::autoDiffLimit(), std::size_t IndeterminateId = Policy::indeterminateId(), std::enable_if_t<(!IsTensor< GridPart >::value &&!IsTensorOperand< F >::value &&!IsTensorFunction< F >::value &&!IsWrappableByConstLocalFunction< F >::value &&!IsWrappableByConstLocalFunction< GridPart >::value), int > = 0>
constexpr auto Dune::ACFem::GridFunction::gridFunction (const GridPart &gridPart, F &&f, IndexConstant< MaxOrder >=IndexConstant< MaxOrder >{}, IndexConstant< IndeterminateId >=IndexConstant< IndeterminateId >{})
 Generate a BindableGridFunction from a cooked lambda. More...
 
template<class GridPart >
auto Dune::ACFem::GridFunction::meshPenalty (const GridPart &gridPart)
 Create a penalty function diverging with the inverse element diameter towards infinity.
 
template<std::size_t Id, class Signature , class T , std::enable_if_t<(IsLocalFunctionPlaceholder< T >::value &&Id==std::decay_t< T >::indeterminateId()), int > = 0>
constexpr auto Dune::ACFem::GridFunction::doDerivative (T &&t, PriorityTag< 1 >)
 Geneate the apropriate LocalFunctionJacobianPlaceholder if differentiation w.r.t. More...
 
template<class F , std::size_t IndeterminateId = Policy::indeterminateId(), class Closure = Expressions::Closure, std::enable_if_t< IsConstLocalFunction< F >::value, int > = 0>
auto Dune::ACFem::GridFunction::localFunctionPlaceholder (F &&f, IndexConstant< IndeterminateId > id=IndexConstant< IndeterminateId >{}, Closure closure=Closure{})
 Generate a LocalFunctionPlaceholder for a Fem::ConstLocalFunction. More...
 

Detailed Description

Function Documentation

◆ doDerivative()

template<std::size_t Id, class Signature , class T , std::enable_if_t<(IsLocalFunctionPlaceholder< T >::value &&Id==std::decay_t< T >::indeterminateId()), int > = 0>
constexpr auto Dune::ACFem::GridFunction::doDerivative ( T &&  t,
PriorityTag< 1 >   
)
constexpr

Geneate the apropriate LocalFunctionJacobianPlaceholder if differentiation w.r.t.

Geneate the apropriate LocalFunctionHessianPlaceholder if differentiation w.r.t.

the correct indetermiante id is attempted.

◆ gridFunction() [1/3]

template<class GridPart , class F , std::size_t MaxOrder = Policy::autoDiffLimit(), std::size_t IndeterminateId = Policy::indeterminateId(), std::enable_if_t<(!IsTensor< GridPart >::value &&!IsTensorOperand< F >::value &&!IsTensorFunction< F >::value &&!IsWrappableByConstLocalFunction< F >::value &&!IsWrappableByConstLocalFunction< GridPart >::value), int > = 0>
constexpr auto Dune::ACFem::GridFunction::gridFunction ( const GridPart &  gridPart,
F &&  f,
IndexConstant< MaxOrder >  = IndexConstant<MaxOrder>{},
IndexConstant< IndeterminateId >  = IndexConstant<IndeterminateId>{} 
)
constexpr

Generate a BindableGridFunction from a cooked lambda.

Parameters
gridPartThe grid the function will live on.
fA callable. f must accept a single argument which is a placeholder for the indeterminate, e.g. in order to generate a function which represents the Euclidean norm one could code like follows:
auto myFct = gridFunction(gridPart,[](auto&& X) {
return sqrt(inner(X, X));
});
auto gridFunction(const GridPart &gridPart, T &&t, IndexConstant< MaxOrder > maxOrder=IndexConstant< MaxOrder >{}, IndexConstant< IndeterminateId > id=IndexConstant< IndeterminateId >{})
Generate a BindableGridFunction which wraps a copy of T.
Definition: gridfunction.hh:23
auto inner(T1 &&t1, T2 &&t2)
"scalar product"
Definition: expressions.hh:154
Parameters
MaxOrderThe maximum order of FAD (Forward Auto Diff) derivatives provided.
IndeterminateIdThe id of the indeterminate for the "world" variable. Defaults to 0.

◆ gridFunction() [2/3]

template<class GridPart , class T , std::size_t MaxOrder = Policy::autoDiffLimit(), std::size_t IndeterminateId = Policy::indeterminateId(), std::enable_if_t<(IsTensor< T >::value &&!IsClosure< T >::value), int > = 0>
auto Dune::ACFem::GridFunction::gridFunction ( const GridPart &  gridPart,
T &&  t,
IndexConstant< MaxOrder >  maxOrder = IndexConstant< MaxOrder >{},
IndexConstant< IndeterminateId >  id = IndexConstant< IndeterminateId >{} 
)

Generate a BindableGridFunction which wraps a copy of T.

Closure trampoline in order to ease type-deduction.

Non-tensor operand trampoline.

Referenced by Dune::ACFem::GridFunction::BindableTensorFunction< Expr, GridPart, AutoDiffOrder, IndeterminateId >::operator[]().

◆ gridFunction() [3/3]

template<class T , std::size_t MaxOrder = Policy::autoDiffLimit(), std::size_t IndeterminateId = Policy::indeterminateId(), std::enable_if_t<(IsTensor< T >::value &&IsGridPartProvider< T >::value), int > = 0>
auto Dune::ACFem::GridFunction::gridFunction ( T &&  t,
IndexConstant< MaxOrder >  maxOrder = IndexConstant<MaxOrder>{},
IndexConstant< IndeterminateId >  id = IndexConstant<IndeterminateId>{} 
)

Generate a BindableGridFunction which wraps a copy of T.

This version is for the case that the to-be-wrapped tensor expression contains placeholders with grid-parts.

◆ localFunctionPlaceholder()

template<class F , std::size_t IndeterminateId = Policy::indeterminateId(), class Closure = Expressions::Closure, std::enable_if_t< IsConstLocalFunction< F >::value, int > = 0>
auto Dune::ACFem::GridFunction::localFunctionPlaceholder ( F &&  f,
IndexConstant< IndeterminateId >  id = IndexConstant<IndeterminateId>{},
Closure  closure = Closure{} 
)

Generate a LocalFunctionPlaceholder for a Fem::ConstLocalFunction.

Pipe F through constLocalFunction() if it is not already a Fem::ConstLocalFunction.

Parameters
[in]fThe local function to wrap. cvr qualifications are captured by the generated expressions.
[in]idThe id of the indeterminate tensor the placeholder is assumed to depend on. The derivative method is overloaded such that the derivative w.r.t. to IndeterminateId will generate the placeholder tensor which takes its values from the jacobian() method of the wrapped LocalFunction.
Returns
A LocalFunctionPlaceholder tensor which stores f as copy if it was an rvalue reference or as the respective reference type if it was an lvalue reference type.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)