AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Abstract base class for a Set of entities in a simulation. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/slam/Set.hpp>
Public Types | |
using | PositionType = PosType |
using | ElementType = ElemType |
Public Member Functions | |
virtual | ~Set ()=default |
virtual ElementType | at (PositionType) const =0 |
Random access to the entities of the set. More... | |
virtual AXOM_HOST_DEVICE PositionType | size () const =0 |
Get the number of entities in the set. More... | |
virtual bool | isSubset () const =0 |
Determines if the Set is a Subset of another set. More... | |
virtual bool | isValid (bool verboseOutput=false) const =0 |
Checks whether the set is valid. More... | |
virtual AXOM_HOST_DEVICE bool | empty () const =0 |
Checks if there are any elements in the set – equivalent to: set.size() == 0. More... | |
Abstract base class for a Set of entities in a simulation.
This class defines the minimal required API for a slam Set, a container class for a set of entities in a simulation. Each entity has an index.
Examples of sets include:
Examples of subsets include:
Note: Elements of a set do not necessarily need explicit indices. E.g. if we have a contiguous range of elements (or slices of contiguous ranges), they can be implicitly encoded.
Thus, we can have
The interface is for constant access to the elements.
using axom::slam::Set< PosType, ElemType >::PositionType = PosType |
using axom::slam::Set< PosType, ElemType >::ElementType = ElemType |
|
virtualdefault |
|
pure virtual |
Random access to the entities of the set.
The | index of the desired element |
Implemented in axom::slam::NullSet< SetPosition, SetElement >, axom::slam::NullSet< slam::DefaultPositionType, slam::DefaultElementType >, and axom::slam::DynamicSet< PositionType, ElementType >.
|
pure virtual |
Get the number of entities in the set.
Implemented in axom::slam::NullSet< PosType, ElemType >, axom::slam::NullSet< SetPosition, SetElement >, axom::slam::NullSet< slam::DefaultPositionType, slam::DefaultElementType >, axom::slam::DynamicSet< PosType, ElemType, SizePolicy >, and axom::slam::DynamicSet< PositionType, ElementType >.
|
pure virtual |
Determines if the Set is a Subset of another set.
Implemented in axom::slam::NullSet< PosType, ElemType >, axom::slam::NullSet< SetPosition, SetElement >, axom::slam::NullSet< slam::DefaultPositionType, slam::DefaultElementType >, axom::slam::DynamicSet< PosType, ElemType, SizePolicy >, and axom::slam::DynamicSet< PositionType, ElementType >.
|
pure virtual |
Checks whether the set is valid.
Implemented in axom::slam::DynamicSet< PosType, ElemType, SizePolicy >, and axom::slam::DynamicSet< PositionType, ElementType >.
|
pure virtual |
Checks if there are any elements in the set – equivalent to: set.size() == 0.
Implemented in axom::slam::NullSet< PosType, ElemType >, axom::slam::NullSet< SetPosition, SetElement >, axom::slam::NullSet< slam::DefaultPositionType, slam::DefaultElementType >, axom::slam::DynamicSet< PosType, ElemType, SizePolicy >, and axom::slam::DynamicSet< PositionType, ElementType >.