/home/runner/work/amr-wind/amr-wind/amr-wind/core/Field.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
Loading...
Searching...
No Matches
Field.H
Go to the documentation of this file.
Definition FieldBCOps.H:32
Definition FieldFillPatchOps.H:39
Definition Field.H:116
bool query_state(const FieldState fstate) const
Return true if the requested state exists for this field.
Definition Field.H:165
void copy_state(FieldState to_state, FieldState from_state) noexcept
Copy a user-specified "from_state" to "to_state".
Definition Field.cpp:321
void set_inflow_sibling_fields(const int lev, const amrex::Real time, const amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > mfabs) noexcept
Definition Field.cpp:290
void set_inout_bndry()
Set the inout_bndry flag.
Definition Field.H:404
void set_inflow(const int lev, const amrex::Real time, amrex::MultiFab &mfab, const int nghost) noexcept
Definition Field.H:388
amrex::Vector< const amrex::MultiFab * > vec_const_ptrs() const noexcept
Return vector of const MultiFab* for all levels.
Definition Field.cpp:153
~Field()
bool has_inout_bndry() const
Check if any of the boundaries is a mass-inflow-outflow.
Definition Field.H:401
const amrex::Gpu::DeviceVector< amrex::BCRec > & bcrec_device() const
Definition Field.H:196
ViewField< Field > subview(const int scomp=0, const int ncomp=1)
Definition Field.H:296
int num_time_states() const
Number of exact time states available for this field.
Definition Field.H:140
FieldLoc field_location() const
Cell, node, or face centered field.
Definition Field.H:153
unsigned id() const
Unique integer identifier for this field.
Definition Field.H:131
const std::string & base_name() const
Base name (without state information)
Definition Field.H:128
void fillpatch_from_coarse(const int lev, const amrex::Real time, amrex::MultiFab &mfab, const int nghost) noexcept
Definition Field.H:370
const amrex::GpuArray< const amrex::Real *, AMREX_SPACEDIM *2 > & bc_values_device() const
Definition Field.H:191
Field & create_state(const FieldState fstate) noexcept
Create a new time state after the field has been created.
Definition Field.cpp:333
std::shared_ptr< FieldInfo > m_info
Common data for all field states.
Definition Field.H:421
FieldRepo & repo() const
FieldRepo instance that manages this field.
Definition Field.H:159
void set_default_fillpatch_bc(const SimTime &time, const amrex::BCType::mathematicalBndryTypes bctype=amrex::BCType::hoextrap) noexcept
Definition Field.cpp:377
const amrex::GpuArray< BC, AMREX_SPACEDIM *2 > & bc_type() const
Definition Field.H:171
int num_states() const
Number of states available for this field.
Definition Field.H:143
Field(const Field &)=delete
void register_fill_patch_op(Args &&... args)
Definition Field.H:306
FieldState field_state() const
State of this field instance.
Definition Field.H:156
void fillpatch_sibling_fields(const amrex::Real time, const amrex::IntVect ng, amrex::Array< Field *, AMREX_SPACEDIM > &fields) const noexcept
Definition Field.cpp:211
amrex::Vector< amrex::Vector< amrex::Real > > & bc_values()
Return reference to the host view of BC values array.
Definition Field.H:182
const std::string & name() const
Name of this field (including state information)
Definition Field.H:125
void fillphysbc(const int lev, const amrex::Real time, amrex::MultiFab &mfab, const int nghost) noexcept
Definition Field.H:379
bool bc_initialized() const
Return flag indicating whether BCs have been initialized.
Definition Field.H:208
void fillpatch(const int lev, const amrex::Real time, amrex::MultiFab &mfab, const int nghost) noexcept
Definition Field.H:361
int num_comp() const
Number of components for this field.
Definition Field.H:134
amrex::Vector< amrex::MultiFab * > vec_ptrs() noexcept
Return a vector of MultiFab pointers for all levels.
Definition Field.cpp:142
void setVal(amrex::Real value) noexcept
Set the field to a constant value at all levels.
Definition Field.cpp:343
bool m_inout_bndry
Flag to indicate whether any of the boundaries is mass-inflow-outflow.
Definition Field.H:437
bool m_mesh_mapped
Flag to track mesh mapping (to uniform space) of field.
Definition Field.H:434
FieldRepo & m_repo
Reference to the FieldRepository instance.
Definition Field.H:415
Field & state(const FieldState fstate)
Return field at a different time state.
Definition Field.cpp:114
void set_inflow(const int lev, const amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost) noexcept
Definition Field.cpp:277
amrex::Vector< amrex::BCRec > & bcrec() const
Return reference to host view of BCRec array.
Definition Field.H:188
void fillpatch_from_coarse(const int lev, const amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost) noexcept
Definition Field.cpp:179
void apply_bc_funcs(const FieldState rho_state) noexcept
Definition Field.cpp:269
Field & operator=(const Field &)=delete
void advance_states() noexcept
Advance timestep for fields with multiple states.
Definition Field.cpp:302
bool has_fillpatch_op() const
Return a flag indicating whether a fillpatch Op has been registered.
Definition Field.H:211
Definition FieldRepo.H:86
Definition SimTime.H:30
Definition ViewField.H:24
Definition BCInterface.cpp:7
Definition console_io.cpp:25
Definition Field.H:29
FieldLoc m_floc
Cell, node, face centered field type.
Definition Field.H:61
void copy_bc_to_device() noexcept
Copy the BC information to device data structures.
Definition Field.cpp:62
FieldInfo(std::string basename, const int ncomp, const int ngrow, const int nstates, const FieldLoc floc)
Definition Field.cpp:12
amrex::Vector< amrex::Vector< amrex::Real > > m_bc_values
Definition Field.H:66
std::string m_basename
Field name without state information.
Definition Field.H:49
int m_nstates
Number of states available for this field.
Definition Field.H:58
std::unique_ptr< FieldFillPatchOpsBase > m_fillpatch_op
Function that handles filling patch and physics BC data for this field.
Definition Field.H:78
bool m_bc_copied_to_device
Flag indicating whether BCs have been initialized and copied to device.
Definition Field.H:84
amrex::GpuArray< BC, AMREX_SPACEDIM *2 > m_bc_type
Definition Field.H:65
amrex::GpuArray< const amrex::Real *, AMREX_SPACEDIM *2 > m_bc_values_d
Definition Field.H:67
bool bc_initialized()
Check indicating whether BCs are being set to sane values.
Definition Field.cpp:39
amrex::Vector< Field * > m_states
Vector holding references to available states for this field.
Definition Field.H:75
static constexpr int max_field_states
Maximum number of states allowed for a field.
Definition Field.H:31
amrex::Vector< std::unique_ptr< FieldBCIface > > m_bc_func
Custom boundary condition actions for this field.
Definition Field.H:81
amrex::Gpu::DeviceVector< amrex::Real > m_bc_values_dview
Definition Field.H:68
~FieldInfo()
int m_ncomp
Number of components (Scalar = 1, Vector = 2, etc.)
Definition Field.H:52
amrex::Gpu::DeviceVector< amrex::BCRec > m_bcrec_d
Definition Field.H:71
Generated by 1.12.0