DUNE PDELab (git)
dynamicpowernode.hh
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
Collect multiple instances of type T within a dune-typetree.
Definition: dynamicpowernode.hh:35
static const bool isPower
Mark this class as a power in the dune-typetree.
Definition: dynamicpowernode.hh:43
std::vector< ChildStorageType > NodeStorage
The type used for storing the children.
Definition: dynamicpowernode.hh:67
ChildConstStorageType childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition: dynamicpowernode.hh:110
const ChildType & child(std::size_t i) const
Returns the i-th child (const version).
Definition: dynamicpowernode.hh:87
std::shared_ptr< T > ChildStorageType
The storage type of each child.
Definition: dynamicpowernode.hh:61
DynamicPowerNode(T &t1, T &t2,...)
Initialize all children with the passed-in objects.
Definition: dynamicpowernode.hh:174
std::shared_ptr< const T > ChildConstStorageType
The const version of the storage type of each child.
Definition: dynamicpowernode.hh:64
DynamicPowerNode(NodeStorage children)
Initialize the DynamicPowerNode with a copy of the passed-in storage type.
Definition: dynamicpowernode.hh:167
DynamicPowerNodeTag NodeTag
The type tag that describes the node.
Definition: dynamicpowernode.hh:55
T ChildType
The type of each child.
Definition: dynamicpowernode.hh:58
void setChild(std::size_t i, ChildType &t)
Sets the i-th child to the passed-in value.
Definition: dynamicpowernode.hh:117
void setChild(std::size_t i, ChildStorageType st)
Sets the stored value representing the i-th child to the passed-in value.
Definition: dynamicpowernode.hh:131
DynamicPowerNode(std::size_t size)
Construct a node with the given number of children.
Definition: dynamicpowernode.hh:162
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition: dynamicpowernode.hh:46
void setChild(std::size_t i, ChildType &&t)
Store the passed value in i-th child.
Definition: dynamicpowernode.hh:124
ChildType & child(std::size_t i)
Returns the i-th child.
Definition: dynamicpowernode.hh:77
std::size_t degree() const
The number of children.
Definition: dynamicpowernode.hh:49
ChildStorageType childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition: dynamicpowernode.hh:97
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition: dynamicpowernode.hh:40
DynamicPowerNode()=delete
Traits for type conversions and type information.
std::shared_ptr< T > stackobject_to_shared_ptr(T &t)
Create a shared_ptr for a stack-allocated object.
Definition: shared_ptr.hh:72
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
STL namespace.
Tag designating a power node with runtime degree.
Definition: nodetags.hh:24
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 12, 23:30, 2024)