#include "modules/PanNDE/include/Field.hpp"
Public Types | |
enum | FieldType { NODE =0, CELL =1, CONSTANT =2 } |
Public Member Functions | |
virtual FieldType | type ()=0 |
virtual std::shared_ptr< PanNDE::Mesh > | mesh ()=0 |
virtual double * | data ()=0 |
virtual double & | at (int index)=0 |
virtual double | atCell (int cidx)=0 |
virtual double | atNode (int nidx)=0 |
virtual int32_t | size ()=0 |
virtual void | mapFrom (std::shared_ptr< PanNDE::Field > other)=0 |
virtual void | mapFrom (PanNDE::Field *other)=0 |
Defines the expected characteristics of a field attached to a mesh.
|
pure virtual |
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 |
Implemented in HostData::HostField.
|
pure virtual |
|
pure virtual |
|
pure virtual |
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())
Implemented in HostData::HostField.
|
pure virtual |
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.
Implemented in HostData::HostField.
|
pure virtual |
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
|
pure virtual |
get the mesh to which the field is attached
Implemented in HostData::HostField.
|
pure virtual |
get the number of values in the underlying data array
Implemented in HostData::HostField.
|
pure virtual |
get the type of field, i.e., how the data is stored (Cell/Nodal)
Implemented in HostData::HostField.