A class to contain the data and executors for a field and define some basic operations.
More...
|
| Field (const Executor &exec, size_t size) |
| Create an uninitialized Field with a given size on an executor.
|
|
| Field (const Executor &exec, const ValueType *in, size_t size, Executor hostExec=SerialExecutor()) |
| Create a Field with a given size from existing memory on an executor.
|
|
| Field (const Executor &exec, size_t size, ValueType value) |
| Create a Field with a given size on an executor and uniform value.
|
|
| Field (const Executor &exec, std::vector< ValueType > in) |
| Create a Field from a given vector of values on an executor.
|
|
| Field (const Executor &exec, const Field< ValueType > &in) |
| Create a Field as a copy of a Field on a specified executor.
|
|
| Field (const Field< ValueType > &rhs) |
| Copy constructor, creates a new field with the same size and data as the parsed field.
|
|
| Field (Field< ValueType > &&rhs) noexcept |
| Move constructor, moves the data from the parsed field to the new field.
|
|
| ~Field () |
| Destroy the Field object.
|
|
template<typename func > |
void | apply (func f) |
| applies a functor, transformation, to the field
|
|
Field< ValueType > | copyToExecutor (Executor dstExec) const |
| Copies the data to a new field on a specific executor.
|
|
Field< ValueType > | copyToHost () const |
| Returns a copy of the field back to the host.
|
|
void | copyToHost (Field< ValueType > &result) |
| Copies the data (from anywhere) to a parsed host field.
|
|
KOKKOS_INLINE_FUNCTION ValueType & | operator[] (const size_t i) |
| Subscript operator.
|
|
KOKKOS_INLINE_FUNCTION const ValueType & | operator[] (const size_t i) const |
| Subscript operator.
|
|
KOKKOS_INLINE_FUNCTION ValueType & | operator() (const size_t i) |
| Function call operator.
|
|
KOKKOS_INLINE_FUNCTION const ValueType & | operator() (const size_t i) const |
| Function call operator.
|
|
void | operator= (const ValueType &rhs) |
| Assignment operator, Sets the field values to that of the passed value.
|
|
void | operator= (const Field< ValueType > &rhs) |
| Assignment operator, Sets the field values to that of the parsed field.
|
|
Field< ValueType > & | operator+= (const Field< ValueType > &rhs) |
| Arithmetic add operator, addition of a second field.
|
|
Field< ValueType > & | operator-= (const Field< ValueType > &rhs) |
| Arithmetic subtraction operator, subtraction by a second field.
|
|
Field< ValueType > | operator* (const Field< scalar > &rhs) |
| Arithmetic multiply operator, multiply by a second field.
|
|
Field< ValueType > | operator* (const scalar rhs) |
| Arithmetic multiply operator, multiplies every cell in the field by a scalar.
|
|
void | resize (const size_t size) |
| Resizes the field to a new size.
|
|
ValueType * | data () |
| Direct access to the underlying field data.
|
|
const ValueType * | data () const |
| Direct access to the underlying field data.
|
|
const Executor & | exec () const |
| Gets the executor associated with the field.
|
|
size_t | size () const |
| Gets the size of the field.
|
|
bool | empty () const |
| Checks if the field is empty.
|
|
std::span< ValueType > | span () &&=delete |
|
std::span< const ValueType > | span () const &&=delete |
|
std::span< ValueType > | span () & |
| Gets the field as a span.
|
|
std::span< const ValueType > | span () const & |
| Gets the field as a span.
|
|
std::span< ValueType > | span (std::pair< size_t, size_t > range) &&=delete |
|
std::span< const ValueType > | span (std::pair< size_t, size_t > range) const &&=delete |
|
std::span< ValueType > | span (std::pair< size_t, size_t > range) & |
| Gets a sub view of the field as a span.
|
|
std::span< const ValueType > | span (std::pair< size_t, size_t > range) const & |
| Gets a sub view of the field as a span.
|
|
std::pair< size_t, size_t > | range () const |
| Gets the range of the field.
|
|
template<typename ValueType>
class NeoFOAM::Field< ValueType >
A class to contain the data and executors for a field and define some basic operations.
Definition at line 48 of file field.hpp.