|
| Field (const Field &)=delete |
|
Field & | operator= (const Field &)=delete |
|
| ~Field () |
|
const std::string & | name () const |
| Name of this field (including state information) More...
|
|
const std::string & | base_name () const |
| Base name (without state information) More...
|
|
unsigned | id () const |
| Unique integer identifier for this field. More...
|
|
int | num_comp () const |
| Number of components for this field. More...
|
|
const amrex::IntVect & | num_grow () const |
| Ghost cells. More...
|
|
int | num_time_states () const |
| Number of exact time states available for this field. More...
|
|
int | num_states () const |
| Number of states available for this field. More...
|
|
FieldLoc | field_location () const |
| Cell, node, or face centered field. More...
|
|
FieldState | field_state () const |
| State of this field instance. More...
|
|
FieldRepo & | repo () const |
| FieldRepo instance that manages this field. More...
|
|
bool & | fillpatch_on_regrid () |
|
bool | fillpatch_on_regrid () const |
|
bool | query_state (const FieldState fstate) const |
| Return true if the requested state exists for this field. More...
|
|
const amrex::GpuArray< BC, AMREX_SPACEDIM *2 > & | bc_type () const |
|
amrex::GpuArray< BC, AMREX_SPACEDIM *2 > & | bc_type () |
|
amrex::Vector< amrex::Vector< amrex::Real > > & | bc_values () |
| Return reference to the host view of BC values array. More...
|
|
amrex::Vector< amrex::BCRec > & | bcrec () const |
| Return reference to host view of BCRec array. More...
|
|
const amrex::GpuArray< const amrex::Real *, AMREX_SPACEDIM *2 > & | bc_values_device () const |
|
const amrex::Gpu::DeviceVector< amrex::BCRec > & | bcrec_device () const |
|
void | copy_bc_to_device () |
| Copy BC data from host to device. More...
|
|
bool | bc_initialized () const |
| Return flag indicating whether BCs have been initialized. More...
|
|
bool | has_fillpatch_op () const |
| Return a flag indicating whether a fillpatch Op has been registered. More...
|
|
void | set_default_fillpatch_bc (const SimTime &time, const amrex::BCType::mathematicalBndryTypes bctype=amrex::BCType::hoextrap) noexcept |
| Setup default BC conditions for fillpatch operations. More...
|
|
void | to_uniform_space () noexcept |
| Map field to the uniform mesh. More...
|
|
void | to_stretched_space () noexcept |
| Map field to the stretched mesh. More...
|
|
Field & | state (const FieldState fstate) |
| Return field at a different time state. More...
|
|
const Field & | state (const FieldState fstate) const |
|
amrex::MultiFab & | operator() (int lev) noexcept |
| Return MultiFab instance for a given level. More...
|
|
const amrex::MultiFab & | operator() (int lev) const noexcept |
|
amrex::Vector< amrex::MultiFab * > | vec_ptrs () noexcept |
| Return a vector of MultiFab pointers for all levels. More...
|
|
amrex::Vector< const amrex::MultiFab * > | vec_const_ptrs () const noexcept |
| Return vector of const MultiFab* for all levels. More...
|
|
void | advance_states () noexcept |
| Advance timestep for fields with multiple states. More...
|
|
void | copy_state (FieldState to_state, FieldState from_state) noexcept |
| Copy a user-specified "from_state" to "to_state". More...
|
|
Field & | create_state (const FieldState fstate) noexcept |
| Create a new time state after the field has been created. More...
|
|
void | setVal (amrex::Real value) noexcept |
| Set the field to a constant value at all levels. More...
|
|
void | setVal (amrex::Real value, int start_comp, int num_comp=1, int nghost=0) noexcept |
| Set specific components of a multi-component field to a given value. More...
|
|
void | setVal (const amrex::Vector< amrex::Real > &values, int nghost=0) noexcept |
| Set components to those in the vector for a multi-component field. More...
|
|
ViewField< Field > | subview (const int scomp=0, const int ncomp=1) |
| Return a sub-view of the Field instance. More...
|
|
template<typename T , class... Args> |
void | register_fill_patch_op (Args &&... args) |
| Register a custom fillpatch class instance for this field. More...
|
|
template<typename T , class... Args> |
void | register_custom_bc (Args &&... args) |
| Register a custom boundary conditions class. More...
|
|
void | fillpatch (amrex::Real time) noexcept |
|
void | fillpatch (amrex::Real time, amrex::IntVect ng) noexcept |
|
void | fillpatch_sibling_fields (amrex::Real time, amrex::IntVect ng, amrex::Array< Field *, AMREX_SPACEDIM > &fields) const noexcept |
|
void | fillphysbc (amrex::Real time) noexcept |
|
void | fillphysbc (amrex::Real time, amrex::IntVect ng) noexcept |
|
void | apply_bc_funcs (const FieldState rho_state) noexcept |
|
void | fillpatch (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost) noexcept |
|
void | fillpatch_from_coarse (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost) noexcept |
|
void | fillphysbc (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost) noexcept |
|
void | set_inflow (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost) noexcept |
|
void | fillpatch (int lev, amrex::Real time, amrex::MultiFab &mfab, const int nghost) noexcept |
|
void | fillpatch_from_coarse (int lev, amrex::Real time, amrex::MultiFab &mfab, int nghost) noexcept |
|
void | fillphysbc (int lev, amrex::Real time, amrex::MultiFab &mfab, int nghost) noexcept |
|
void | set_inflow (int lev, amrex::Real time, amrex::MultiFab &mfab, int nghost) noexcept |
|
bool & | in_uniform_space () |
|
bool | in_uniform_space () const |
|
Computational field.
This is an abstraction of a collection of MultiFabs over multiple levels, and allows operations on the field as a whole. The Field cannot be constructed directly but instead must be created using field creation functions in amr_wind::FieldRepo. This indirection is necessary to allow different parts of the code to hold a reference to the Field instance without having to worry about the changes in underlynig MultiFab data during regrid operations.
Field data is split into two groups: information that is unique to a particular field at a given time state, and data that is common to a given field with multiple timestates. The latter is held within amr_wind::FieldInfo object that is common to all time instances of a given Field (which are themselves Field instances). Different time instances of a Field can access other states through this FieldInfo instance, as well as access boundary conditions and fill patch operators applicable to all states.
As Field does not hold any data itself, but instead is just a thin wrapper to data held by amr_wind::FieldRepo, Field instance cannot be created directly. Instead the user must use amr_wind::FieldRepo::declare_field to create and initialize the field. This also ensures that the FieldInfo instance is managed properly during field creation. Once a field is created, the user can customize the behavior (e.g., registering fill patch operator, handling I/O on a per-field basis).