/home/runner/work/amr-wind/amr-wind/amr-wind/core/FieldRepo.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
Loading...
Searching...
No Matches
FieldRepo.H
Go to the documentation of this file.
Definition Field.H:116
Definition FieldRepo.H:86
void clear_level(int lev)
Remove a level during regrid.
Definition FieldRepo.cpp:77
int num_fields() const noexcept
Number of fields registered in the database.
Definition FieldRepo.H:364
std::unique_ptr< ScratchField > create_scratch_field(const std::string &name, const int ncomp=1, const int nghost=0, const FieldLoc floc=FieldLoc::CELL) const
Definition FieldRepo.cpp:302
IntField & get_int_field(const int field_id) const
Definition FieldRepo.H:291
Field & declare_xf_field(const std::string &name, const int ncomp=1, const int ngrow=0, const int nstates=1)
Definition FieldRepo.H:182
~FieldRepo()=default
std::unique_ptr< IntScratchField > create_int_scratch_field_on_host(const std::string &name, const int ncomp=1, const int nghost=0, const FieldLoc floc=FieldLoc::CELL) const
Definition FieldRepo.cpp:368
const amrex::AmrCore & m_mesh
Reference to the mesh instance.
Definition FieldRepo.H:439
std::unordered_map< std::string, size_t > m_int_fid_map
Map of integer field name to unique integer ID for lookups.
Definition FieldRepo.H:455
bool m_is_initialized
Flag indicating if mesh is available to allocate field data.
Definition FieldRepo.H:458
Field & declare_field(const std::string &name, const int ncomp=1, const int ngrow=0, const int nstates=1, const FieldLoc floc=FieldLoc::CELL)
Definition FieldRepo.cpp:83
amrex::Vector< std::unique_ptr< IntField > > m_int_field_vec
Reference to integer field instances identified by unique integer.
Definition FieldRepo.H:449
Field & get_field(const std::string &name, const FieldState fstate=FieldState::New) const
Definition FieldRepo.cpp:149
FieldRepo & operator=(const FieldRepo &)=delete
int num_active_levels() const noexcept
Total number of levels currently active in the AMR mesh.
Definition FieldRepo.H:361
amrex::MultiFab & get_multifab(const unsigned fid, const int lev) noexcept
Definition FieldRepo.H:389
amrex::Vector< std::unique_ptr< Field > > m_field_vec
References to field instances identified by unique integer.
Definition FieldRepo.H:446
amrex::Vector< std::unique_ptr< LevelDataHolder > > m_leveldata
Definition FieldRepo.H:443
void make_new_level_from_scratch(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)
Definition FieldRepo.cpp:12
bool int_field_exists(const std::string &name, const FieldState fstate=FieldState::New) const
Query if an integer field exists.
Definition FieldRepo.cpp:293
Field & declare_nd_field(const std::string &name, const int ncomp=1, const int ngrow=0, const int nstates=1)
Definition FieldRepo.H:167
amrex::Vector< Field * > declare_face_normal_field(const amrex::Vector< std::string > &names, const int ncomp=1, const int ngrow=0, const int nstates=1)
Definition FieldRepo.H:225
const amrex::FabFactory< amrex::FArrayBox > & factory(int lev) const noexcept
Return factory instance at a given level.
Definition FieldRepo.H:377
Field & declare_zf_field(const std::string &name, const int ncomp=1, const int ngrow=0, const int nstates=1)
Definition FieldRepo.H:212
Field & get_mesh_mapping_det_j(FieldLoc floc) const
Definition FieldRepo.cpp:190
FieldRepo(const FieldRepo &)=delete
std::unordered_map< std::string, size_t > m_fid_map
Map of field name to unique integer ID for lookups.
Definition FieldRepo.H:452
Field & declare_yf_field(const std::string &name, const int ncomp=1, const int ngrow=0, const int nstates=1)
Definition FieldRepo.H:197
IntField & get_int_field(const std::string &name, const FieldState fstate=FieldState::New) const
Return a reference to an integer field.
Definition FieldRepo.cpp:276
void allocate_field_data(int lev, const Field &field, LevelDataHolder &level_data, const amrex::FabFactory< amrex::FArrayBox > &factory)
Allocate field data for a single level outside of regrid.
Definition FieldRepo.cpp:431
bool field_exists(const std::string &name, const FieldState fstate=FieldState::New) const
Definition FieldRepo.cpp:215
IntField & declare_int_field(const std::string &name, const int ncomp=1, const int ngrow=0, const int nstates=1, const FieldLoc floc=FieldLoc::CELL)
Definition FieldRepo.cpp:223
amrex::iMultiFab & get_int_fab(const unsigned fid, const int lev) noexcept
Definition FieldRepo.H:401
Field & get_mesh_mapping_field(FieldLoc floc) const
Definition FieldRepo.cpp:165
void make_new_level_from_coarse(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)
Definition FieldRepo.cpp:29
const amrex::Vector< std::unique_ptr< Field > > & fields() const
Return list of fields registered (for unit-test purposes only)
Definition FieldRepo.H:370
Field & create_state(Field &field, const FieldState fstate)
Create a new state for a field.
Definition FieldRepo.cpp:496
Field & declare_cc_field(const std::string &name, const int ncomp=1, const int ngrow=0, const int nstates=1)
Definition FieldRepo.H:152
const amrex::AmrCore & mesh() const
Return a reference to the underlying AMR mesh instance.
Definition FieldRepo.H:358
void remake_level(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)
Definition FieldRepo.cpp:53
std::unique_ptr< ScratchField > create_scratch_field_on_host(const std::string &name, const int ncomp=1, const int nghost=0, const FieldLoc floc=FieldLoc::CELL) const
Definition FieldRepo.cpp:334
void advance_states() noexcept
Advance all fields with more than one timestate to the new timestep.
Definition FieldRepo.cpp:401
Definition IntField.H:20
Definition BCInterface.cpp:7
Definition console_io.cpp:25
Definition FieldRepo.H:36
amrex::Vector< amrex::iMultiFab > m_int_fabs
int fabs for all known fields at this level
Definition FieldRepo.H:45
std::unique_ptr< amrex::FabFactory< amrex::FArrayBox > > m_factory
Factory for creating new FABs.
Definition FieldRepo.H:42
amrex::Vector< amrex::MultiFab > m_mfabs
real multifabs for all the known fields at this level
Definition FieldRepo.H:40
std::unique_ptr< amrex::FabFactory< amrex::IArrayBox > > m_int_fact
Definition FieldRepo.H:46
Generated by 1.12.0