AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Field is an abstract base class which provides the following: More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/mint/mesh/Field.hpp>
Public Member Functions | |
Field ()=delete | |
Default constructor. Disabled. More... | |
Virtual methods | |
virtual | ~Field () |
Destructor. More... | |
virtual IndexType | getNumTuples () const =0 |
Returns the number of tuples associated with this field. More... | |
virtual IndexType | getNumComponents () const =0 |
Returns the number of components associated with this field. More... | |
virtual IndexType | getCapacity () const =0 |
Returns the total number of tuples this Field instance can hold. More... | |
virtual void | resize (IndexType newNumTuples)=0 |
Resizes the Field such that it can store the given number of tuples. More... | |
virtual void | emplace (IndexType pos, IndexType n_tuples)=0 |
Inserts n_tuples with the default value at the given position. More... | |
virtual void | reserve (IndexType newCapacity)=0 |
Increase the Field capacity to hold the given number of tuples. More... | |
virtual void | shrink ()=0 |
Shrinks the field capacity to be equal to the number of tuples. More... | |
virtual double | getResizeRatio () const =0 |
Return the resize ratio of this field. More... | |
virtual void | setResizeRatio (double ratio)=0 |
Set the resize ratio of this field. More... | |
virtual bool | isExternal () const =0 |
Return true iff the field is stored in an external buffer. More... | |
virtual bool | isInSidre () const =0 |
Return true iff the field is stored in sidre. More... | |
Attribute get/set Methods | |
int | getType () const |
Returns the type of the field. More... | |
const std::string & | getName () const |
Returns the name of the field. More... | |
int | getBasis () const |
Returns the basis associated with this field. More... | |
void | setBasis (int fe_basis) |
Sets the finite element basis associated with this field. More... | |
Static Public Member Functions | |
Static Methods | |
template<typename T > | |
static T * | getDataPtr (Field *field) |
Returns raw pointer to the field data. More... | |
template<typename T > | |
static const T * | getDataPtr (const Field *field) |
Protected Member Functions | |
Field (const std::string &name, int type) | |
Custom constructor to call from a derived class. More... | |
Protected Attributes | |
std::string | m_name |
int | m_type |
int | m_basis |
Field is an abstract base class which provides the following:
|
delete |
Default constructor. Disabled.
Referenced by axom::mint::FieldVariable< T >::FieldVariable().
|
inlinevirtual |
Destructor.
References emplace(), getCapacity(), getNumComponents(), getNumTuples(), getResizeRatio(), isExternal(), isInSidre(), reserve(), resize(), setResizeRatio(), and shrink().
|
inlineprotected |
Custom constructor to call from a derived class.
[in] | name | the name associated with this field instance. |
[in] | type | the field type. |
References m_name, m_type, SLIC_ERROR_IF, and axom::mint::UNDEFINED_FIELD_TYPE.
|
pure virtual |
Returns the number of tuples associated with this field.
Implemented in axom::mint::FieldVariable< T >.
Referenced by axom::mint::FieldData::getFieldPtr(), and ~Field().
|
pure virtual |
Returns the number of components associated with this field.
Implemented in axom::mint::FieldVariable< T >.
Referenced by axom::mint::FieldData::getFieldPtr(), and ~Field().
|
pure virtual |
Returns the total number of tuples this Field instance can hold.
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
|
pure virtual |
Resizes the Field such that it can store the given number of tuples.
[in] | newNumTuples | the number of tuples of this Field instance. |
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
Inserts n_tuples with the default value at the given position.
[in] | pos | the position of the insert. |
[in] | n_tuples | the number of tuples to insert. |
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
|
pure virtual |
Increase the Field capacity to hold the given number of tuples.
[in] | newCapacity | number of tuples to reserve memory for. |
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
|
pure virtual |
Shrinks the field capacity to be equal to the number of tuples.
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
|
pure virtual |
Return the resize ratio of this field.
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
|
pure virtual |
Set the resize ratio of this field.
[in] | ratio | the new resize ratio. |
Implemented in axom::mint::FieldVariable< T >.
Referenced by axom::mint::FieldData::createField(), and ~Field().
|
pure virtual |
Return true iff the field is stored in an external buffer.
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
|
pure virtual |
Return true iff the field is stored in sidre.
Implemented in axom::mint::FieldVariable< T >.
Referenced by ~Field().
|
inline |
Returns the type of the field.
References m_type.
Referenced by getDataPtr().
|
inline |
|
inline |
Returns the basis associated with this field.
References m_basis.
|
inline |
Sets the finite element basis associated with this field.
[in] | fe_basis | the finite element basis |
setBasis()
References getDataPtr(), m_basis, MINT_NUM_BASIS_TYPES, and SLIC_ASSERT.
|
inlinestatic |
Returns raw pointer to the field data.
T | the field data type, e.g., double, int, etc. |
References axom::mint::FieldVariable< T >::getFieldVariablePtr(), getType(), SLIC_ASSERT, SLIC_ERROR_IF, axom::mint::field_traits< FieldType >::type(), and axom::mint::UNDEFINED_FIELD_TYPE.
Referenced by setBasis().
|
inlinestatic |
|
protected |
|
protected |
the field type
Referenced by Field(), axom::mint::FieldVariable< T >::FieldVariable(), and getType().
|
protected |
associated finite element basis with the field.
Referenced by getBasis(), and setBasis().