Generic multiplet object with overloaded arithmetic. More...
#include <VectorField.h>
Public Member Functions | |
| ScalarFieldMultiplet (const Tptr *in=0) | |
| Construct multiplet from an array of data sets (or default: initialize to null) More... | |
| ScalarFieldMultiplet (const GridInfo &gInfo, bool onGpu=false) | |
| Construct a multiplet with allocated data. More... | |
| Tptr & | operator[] (int i) |
| Retrieve a reference to the i'th component (no bound checks) | |
| const Tptr & | operator[] (int i) const |
| Retrieve a const reference to the i'th component (no bound checks) | |
| ScalarFieldMultiplet | clone () const |
| Clone data (note assignment will be reference for the actual data) | |
|
std::vector< typename T::DataType * > | data () |
| Get the component data pointers in an std::vector. | |
|
std::vector< const typename T::DataType * > | data () const |
| Get the component data pointers in an std::vector (const version) | |
|
std::vector< const typename T::DataType * > | const_data () const |
| Get the component data pointers in an std::vector (const version) | |
|
std::vector< typename T::DataType * > | dataGpu () |
| Get the component GPU data pointers in an std::vector. | |
|
std::vector< const typename T::DataType * > | dataGpu () const |
| Get the component GPU data pointers in an std::vector (const version) | |
|
std::vector< const typename T::DataType * > | const_dataGpu () const |
| Get the component GPU data pointers in an std::vector (const version) | |
|
std::vector< typename T::DataType * > | dataPref () |
|
std::vector< const typename T::DataType * > | dataPref () const |
|
std::vector< const typename T::DataType * > | const_dataPref () const |
| operator bool () const | |
| Cast to bool: true if all components are non-null. | |
| void | loadFromFile (const char *fileName) |
| Load all components from a single binary file. | |
| void | saveToFile (const char *fileName) const |
| Save all components from a single binary file. | |
Public Attributes | |
| std::vector< Tptr > | component |
| the array of components (also accessible via operator[]) | |
Generic multiplet object with overloaded arithmetic.
| T | ScalarFieldData or ScalarFieldTildeData |
| N | Number of elements in multiplet |
|
inline |
Construct multiplet from an array of data sets (or default: initialize to null)
| in | Pointer to array, or null to initialize each component to null |
|
inline |
Construct a multiplet with allocated data.
| gInfo | Simulation grid info / memory manager to use to allocate the data |
| onGpu | Boolean flag to indicate whether memory is on GPU |