#include "modules/HostData/include/HostField.hpp"
Public Types | |
enum | FieldType { NODE =0, CELL =1, CONSTANT =2 } |
![]() | |
enum | FieldType { NODE =0, CELL =1, CONSTANT =2 } |
Public Member Functions | |
PanNDE::Field::FieldType | type () override |
std::shared_ptr< PanNDE::Mesh > | mesh () override |
double * | data () override |
double & | at (int index) override |
double | atCell (int cidx) override |
double | atNode (int nidx) override |
int32_t | size () override |
void | mapFrom (std::shared_ptr< PanNDE::Field > other) override |
void | mapFrom (PanNDE::Field *other) override |
HostField (std::shared_ptr< PanNDE::Mesh > mesh, PanNDE::Field::FieldType tp) | |
HostField (PanNDE::Mesh *mesh, PanNDE::Field::FieldType tp) | |
![]() | |
virtual void | mapFrom (std::shared_ptr< PanNDE::Field > other)=0 |
Implements the expected characteristics of a field attached to a mesh.
|
inline |
constructor
mesh | mesh on which the field is attached |
tp | field type |
|
inline |
constructor
mesh | mesh on which the field is attached |
tp | field type |
|
inlineoverridevirtual |
get the value by reference at the index. the index corresponds to the mesh index based on the whether the field is cell or node centered.
index | location index of the value desired |
Implements PanNDE::Field.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
get the pointer to underlying data array. This should be used with caution, and only when low level access is necessary (e.g., there is a need for a memcpy())
Implements PanNDE::Field.
|
inlineoverridevirtual |
map data from other field into this field. This should copy if the other field is of the same type (cell/node), and this should map the data if the other is not the same type. This solution is not the preferred solution as it does not use a smart pointer.
Implements PanNDE::Field.
|
inlineoverride |
map data from other field into this field. This should copy if the other field is of the same type (cell/node), and this should map the data if the other is not the same type
|
inlineoverridevirtual |
get the mesh to which the field is attached
Implements PanNDE::Field.
|
inlineoverridevirtual |
get the number of values in the underlying data array
Implements PanNDE::Field.
|
inlineoverridevirtual |
get the type of field, i.e., how the data is stored (Cell/Nodal)
Implements PanNDE::Field.