DUNE PDELab (git)

Dune::PDELab::CompositeGridFunction< Children > Class Template Reference

composite functions More...

#include <dune/pdelab/common/function.hh>

Public Types

typedef BaseT::template Child< 0 >::Type::GridViewType GridViewType
 record the GridView
 
typedef CompositeNodeTag NodeTag
 The type tag that describes a CompositeNode.
 
typedef std::tuple< std::shared_ptr< Children >... > NodeStorage
 The type used for storing the children.
 
typedef std::tuple< Children... > ChildTypes
 A tuple storing the types of all children.
 

Public Member Functions

template<typename TT >
void setTime (TT time)
 Set the time in all leaf nodes of this function tree.
 
 CompositeGridFunction (T0 &t0, T1 &t1,...)
 Initialize all children. More...
 
Child Access
Child< k >::Type & child (index_constant< k >={})
 Returns the k-th child. More...
 
const Child< k >::Type & child (index_constant< k >={}) const
 Returns the k-th child (const version). More...
 
std::shared_ptr< typename Child< k >::Type > childStorage (index_constant< k >={})
 Returns the storage of the k-th child. More...
 
std::shared_ptr< const typename Child< k >::Type > childStorage (index_constant< k >={}) const
 Returns the storage of the k-th child (const version). More...
 
void setChild (typename Child< k >::Type &child, index_constant< k >={})
 Sets the k-th child to the passed-in value.
 
void setChild (typename Child< k >::Type &&child, index_constant< k >={})
 Store the passed value in k-th child.
 
void setChild (std::shared_ptr< typename Child< k >::Type > child, index_constant< k >={})
 Sets the storage of the k-th child to the passed-in value.
 
const NodeStoragenodeStorage () const
 
Nested Child Access
ImplementationDefinedchild (Indices... indices)
 Returns the child given by the list of indices. More...
 
const ImplementationDefinedchild (Indices... indices)
 Returns the child given by the list of indices. More...
 

Static Public Attributes

static const bool isLeaf
 Mark this class as non leaf in the dune-typetree.
 
static const bool isPower
 Mark this class as a non power in the dune-typetree.
 
static const bool isComposite
 Mark this class as a composite in the dune-typetree.
 

Detailed Description

template<typename... Children>
class Dune::PDELab::CompositeGridFunction< Children >

composite functions

Collect instances of possibly different function types Tn within a GridFunctionTree. This implements a GridFunctionTree

Template Parameters
TnThe base types. Tn==EmptyChild means that slot n is unused. Currently, up to 9 slots are supported, making 8 the maximum n.

Constructor & Destructor Documentation

◆ CompositeGridFunction()

template<typename... Children>
Dune::PDELab::CompositeGridFunction< Children >::CompositeGridFunction ( T0 &  t0,
T1 &  t1,
  ... 
)
inline

Initialize all children.

Parameters
t0The initializer for the first child.
t1The initializer for the second child.
...more initializers

The actual number of arguments for this constructor corresponds to the number of slots used in the template parameter list of the class.

Member Function Documentation

◆ child() [1/4]

Child< k >::Type & Dune::TypeTree::CompositeNode< Children >::child ( index_constant< k >  = {})
inlineinherited

Returns the k-th child.

Returns
a reference to the k-th child.

◆ child() [2/4]

const Child< k >::Type & Dune::TypeTree::CompositeNode< Children >::child ( index_constant< k >  = {}) const
inlineinherited

Returns the k-th child (const version).

Returns
a const reference to the k-th child.

◆ child() [3/4]

ImplementationDefined & Dune::TypeTree::CompositeNode< Children >::child ( Indices...  indices)
inlineinherited

Returns the child given by the list of indices.

This method simply forwards to the freestanding function child(). See that function for further information.

◆ child() [4/4]

const ImplementationDefined & Dune::TypeTree::CompositeNode< Children >::child ( Indices...  indices)
inlineinherited

Returns the child given by the list of indices.

This method simply forwards to the freestanding function child(). See that function for further information.

◆ childStorage() [1/2]

std::shared_ptr< typename Child< k >::Type > Dune::TypeTree::CompositeNode< Children >::childStorage ( index_constant< k >  = {})
inlineinherited

Returns the storage of the k-th child.

Returns
a copy of the object storing the k-th child.

◆ childStorage() [2/2]

std::shared_ptr< const typename Child< k >::Type > Dune::TypeTree::CompositeNode< Children >::childStorage ( index_constant< k >  = {}) const
inlineinherited

Returns the storage of the k-th child (const version).

Returns
a copy of the object storing the k-th child.

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.111.3 (Nov 23, 23:29, 2024)