Field is an abstract base class which provides the following:
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/mint/mesh/Field.hpp>
|
| Field (const std::string &name, int type) |
| Custom constructor to call from a derived class. More...
|
|
Field is an abstract base class which provides the following:
- A type-agnostic wrapper for FieldVariable< T > objects, which are templated on the underlying field type, e.g., double, int, etc.
- A unified interface to access Fields regardless of type
- The ability to store fields of different types in a FieldData container.
- See also
- FieldVariable
-
FieldData
◆ Field() [1/2]
axom::mint::Field::Field |
( |
| ) |
|
|
delete |
Default constructor. Disabled.
◆ ~Field()
virtual axom::mint::Field::~Field |
( |
| ) |
|
|
inlinevirtual |
◆ Field() [2/2]
axom::mint::Field::Field |
( |
const std::string & |
name, |
|
|
int |
type |
|
) |
| |
|
inlineprotected |
Custom constructor to call from a derived class.
- Parameters
-
[in] | name | the name associated with this field instance. |
[in] | type | the field type. |
- Precondition
- name.empty() == false
-
type >= 0 && type < NUMBER_OF_FIELD_TYPES
- See also
- FieldType for a list of supported field types.
References m_name, m_type, SLIC_ERROR_IF, and axom::mint::UNDEFINED_FIELD_TYPE.
◆ getNumTuples()
virtual IndexType axom::mint::Field::getNumTuples |
( |
| ) |
const |
|
pure virtual |
Returns the number of tuples associated with this field.
- Returns
- N the number of tuples of this field.
- Postcondition
- N >= 0
Implemented in axom::mint::FieldVariable< T >.
◆ getNumComponents()
virtual IndexType axom::mint::Field::getNumComponents |
( |
| ) |
const |
|
pure virtual |
Returns the number of components associated with this field.
- Returns
- N the number of components of this field.
- Postcondition
- N >= 1
Implemented in axom::mint::FieldVariable< T >.
◆ getCapacity()
virtual IndexType axom::mint::Field::getCapacity |
( |
| ) |
const |
|
pure virtual |
◆ resize()
virtual void axom::mint::Field::resize |
( |
IndexType |
newNumTuples | ) |
|
|
pure virtual |
Resizes the Field such that it can store the given number of tuples.
- Parameters
-
[in] | newNumTuples | the number of tuples of this Field instance. |
- Note
- Reallocation is done only if the new size exceeds the capacity.
Implemented in axom::mint::FieldVariable< T >.
◆ emplace()
Inserts n_tuples with the default value at the given position.
- Parameters
-
[in] | pos | the position of the insert. |
[in] | n_tuples | the number of tuples to insert. |
- Note
- The values at pos and above are shifted up and the new tuples have the default values.
- See also
- FieldVariable
Implemented in axom::mint::FieldVariable< T >.
◆ reserve()
virtual void axom::mint::Field::reserve |
( |
IndexType |
newCapacity | ) |
|
|
pure virtual |
Increase the Field capacity to hold the given number of tuples.
- Parameters
-
[in] | newCapacity | number of tuples to reserve memory for. |
- Note
- if newCapacity < getCapacity() this method returns immediately.
Implemented in axom::mint::FieldVariable< T >.
◆ shrink()
virtual void axom::mint::Field::shrink |
( |
| ) |
|
|
pure virtual |
◆ getResizeRatio()
virtual double axom::mint::Field::getResizeRatio |
( |
| ) |
const |
|
pure virtual |
◆ setResizeRatio()
virtual void axom::mint::Field::setResizeRatio |
( |
double |
ratio | ) |
|
|
pure virtual |
◆ isExternal()
virtual bool axom::mint::Field::isExternal |
( |
| ) |
const |
|
pure virtual |
◆ isInSidre()
virtual bool axom::mint::Field::isInSidre |
( |
| ) |
const |
|
pure virtual |
◆ getType()
int axom::mint::Field::getType |
( |
| ) |
const |
|
inline |
Returns the type of the field.
- Returns
- t the type of the field.
- Postcondition
- t < NUMBER_OF_FIELD_TYPES
- See also
- FieldTypes
References m_type.
◆ getName()
const std::string& axom::mint::Field::getName |
( |
| ) |
const |
|
inline |
Returns the name of the field.
- Returns
- name the name of the field.
References m_name.
◆ getBasis()
int axom::mint::Field::getBasis |
( |
| ) |
const |
|
inline |
Returns the basis associated with this field.
- Returns
- basis the basis associated with this field.
- Precondition
- fe_basis >= 0 && fe_basis < MINT_NUM_BASIS_TYPES
References m_basis.
◆ setBasis()
void axom::mint::Field::setBasis |
( |
int |
fe_basis | ) |
|
|
inline |
Sets the finite element basis associated with this field.
- Parameters
-
[in] | fe_basis | the finite element basis |
- Note
- A field is not associated with basis type by default. The caller must explicitly associate a field with a basis by calling
setBasis()
- Precondition
- fe_basis >= 0 && fe_basis < MINT_NUM_BASIS_TYPES
- See also
- FEBasisTypes for a list of supported basis.
References m_basis, MINT_NUM_BASIS_TYPES, and SLIC_ASSERT.
◆ getDataPtr() [1/2]
template<typename T >
T * axom::mint::Field::getDataPtr |
( |
Field * |
field | ) |
|
|
inlinestatic |
◆ getDataPtr() [2/2]
template<typename T >
const T * axom::mint::Field::getDataPtr |
( |
const Field * |
field | ) |
|
|
inlinestatic |
◆ m_name
std::string axom::mint::Field::m_name |
|
protected |
◆ m_type
int axom::mint::Field::m_type |
|
protected |
◆ m_basis
int axom::mint::Field::m_basis |
|
protected |
associated finite element basis with the field.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/mint/mesh/Field.hpp