3#include <AMReX_Config.H>
48 const int* lo,
const int* hi,
49 const int* domain_lo,
const int* domain_hi,
53 const int* level,
const int* grid_no) ;
79 const amrex::Real* compdat,
const int* clo,
const int* chi,
const int* ncomp,
80 const int* lo,
const int* hi,
81 const int* domain_lo,
const int* domain_hi,
85 const int* level,
const int* grid_no) ;
137 [[nodiscard]]
const std::string&
name () const noexcept;
144 [[nodiscard]] const std::
string&
variableName (
int comp) const noexcept;
172 [[nodiscard]]
int numDerive () const noexcept;
177 [[nodiscard]]
int numRange () const noexcept;
182 [[nodiscard]]
int numState () const noexcept;
187 [[nodiscard]] const
int*
getBC () const noexcept;
188 [[nodiscard]] const
int*
getBC3D () const noexcept;
203 int& num_comp) const;
271 Vector<std::
string> const& var_names,
279 Vector<std::
string> const& var_names,
287 Vector<std::
string> const& var_names,
295 Vector<std::
string> const& var_names,
320 std::string derive_name;
354 int* bcr3D =
nullptr;
383 [[nodiscard]]
bool canDerive (
const std::string& name)
const;
390 [[nodiscard]]
const DeriveRec*
get (
const std::string& name)
const;
402 void add (
const std::string& name,
409 void add (
const std::string& name,
416 void add (
const std::string& name,
423 void add (
const std::string& name,
438 void add (
const std::string& name,
454 void add (
const std::string& name,
462 void add (
const std::string& name,
470 void add (
const std::string& name,
478 void add (
const std::string& name,
501 [[nodiscard]] std::list<DeriveRec>&
dlist ();
507 std::list<DeriveRec> lst;
#define AMREX_ARLIM_P(x)
Definition AMReX_ArrayLim.H:30
A list of DeriveRecs.
Definition AMReX_Derive.H:364
DeriveList(DeriveList &&)=delete
DeriveList()=default
The default constructor.
void add(const std::string &name, IndexType result_type, int nvar_derive, DeriveFunc der_func, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
Adds another entry to the registry.
Definition AMReX_Derive.cpp:378
std::list< DeriveRec > & dlist()
Definition AMReX_Derive.cpp:480
const DeriveRec * get(const std::string &name) const
Access the particular record in registry.
Definition AMReX_Derive.cpp:505
DeriveList & operator=(const DeriveList &)=delete
void clear()
Definition AMReX_Derive.H:503
bool canDerive(const std::string &name) const
Determines whether quantity identified by <name> is in the registry.
Definition AMReX_Derive.cpp:486
DeriveList(const DeriveList &)=delete
void addComponent(const std::string &name, const DescriptorList &d_list, int state_indx, int s_comp, int n_comp)
Adds another StateRange to the DeriveRec identified by <name>.
Definition AMReX_Derive.cpp:524
Derived Type Record.
Definition AMReX_Derive.H:109
IndexType deriveType() const noexcept
The IndexType of the derived type.
Definition AMReX_Derive.cpp:187
int numState() const noexcept
Total number of state variables needed for derived type.
Definition AMReX_Derive.cpp:241
DeriveFunc3D derFunc3D() const noexcept
Definition AMReX_Derive.cpp:199
const std::string & name() const noexcept
The name of the derived type.
Definition AMReX_Derive.cpp:181
int numDerive() const noexcept
Number of components in the derived type.
Definition AMReX_Derive.cpp:229
void getRange(int k, int &state_indx, int &src_comp, int &num_comp) const
Sets state_indx, src_comp and num_comp for the kth range (or chunk) of state data components needed t...
Definition AMReX_Derive.cpp:295
const std::string & variableName(int comp) const noexcept
The names of components.
Definition AMReX_Derive.cpp:368
void buildBC(const DescriptorList &d_list)
Definition AMReX_Derive.cpp:314
~DeriveRec()
The destructor.
Definition AMReX_Derive.cpp:162
DeriveFuncMF derFuncMF() const noexcept
Definition AMReX_Derive.cpp:211
const int * getBC3D() const noexcept
Definition AMReX_Derive.cpp:254
DeriveFunc derFunc() const noexcept
The DeriveFunc used to calculate the derived type.
Definition AMReX_Derive.cpp:193
static Box GrowBoxByOne(const Box &box) noexcept
Definition AMReX_Derive.cpp:16
DeriveRec & operator=(DeriveRec const &)=delete
void addRange(const DescriptorList &d_list, int state_indx, int src_comp, int num_comp)
Definition AMReX_Derive.cpp:261
std::function< Box(const Box &)> DeriveBoxMap
A pointer to function taking and returning a Box.
Definition AMReX_Derive.H:118
static Box TheSameBox(const Box &box) noexcept
Definition AMReX_Derive.cpp:10
DeriveBoxMap boxMap() const noexcept
Maps state data box to derived data box.
Definition AMReX_Derive.cpp:217
DeriveRec(DeriveRec &&)=delete
DeriveRec(DeriveRec const &)=delete
const int * getBC() const noexcept
The boundary conditions.
Definition AMReX_Derive.cpp:247
int numRange() const noexcept
Number of different chunks of state data needed for derived type.
Definition AMReX_Derive.cpp:235
Interpolater * interp() const noexcept
Type of interpolater to use in computing derived type.
Definition AMReX_Derive.cpp:223
void buildBC3D(const DescriptorList &d_list)
Definition AMReX_Derive.cpp:338
DeriveFuncFab derFuncFab() const noexcept
Definition AMReX_Derive.cpp:205
Definition AMReX_StateDescriptor.H:437
A Fortran Array of REALs.
Definition AMReX_FArrayBox.H:231
Rectangular problem domain geometry.
Definition AMReX_Geometry.H:74
Virtual base class for interpolaters.
Definition AMReX_Interpolater.H:22
A collection (stored as an array) of FArrayBox objects.
Definition AMReX_MultiFab.H:40
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:28
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:79
Definition AMReX_Amr.cpp:49
void(*)(amrex::Real *data, const int *dlo, const int *dhi, const int *nvar, const amrex::Real *compdat, const int *clo, const int *chi, const int *ncomp, const int *lo, const int *hi, const int *domain_lo, const int *domain_hi, const amrex::Real *delta, const amrex::Real *xlo, const amrex::Real *time, const amrex::Real *dt, const int *bcrec, const int *level, const int *grid_no) DeriveFunc3D
This is dimension agnostic. For example, dlo always has three elements.
Definition AMReX_Derive.H:85
std::function< void(amrex::MultiFab &der_mf, int dcomp, int ncomp, const amrex::MultiFab &data_mf, const amrex::Geometry &geomdata, amrex::Real time, const int *bcrec, int level)> DeriveFuncMF
Definition AMReX_Derive.H:94
BoxND< 3 > Box
Box is an alias for amrex::BoxND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:30
void(*)(amrex::Real *data, const int &, const int &, const int &, const int &, const int &, const int &, const int *nvar, const amrex::Real *compdat, const int &, const int &, const int &, const int &, const int &, const int &, const int *ncomp, const int *lo, const int *hi, const int *domain_lo, const int *domain_hi, const amrex::Real *delta, const amrex::Real *xlo, const amrex::Real *time, const amrex::Real *dt, const int *bcrec, const int *level, const int *grid_no) DeriveFunc
Type of extern "C" function called by DeriveRec to compute derived quantity.
Definition AMReX_Derive.H:53
std::function< void(const amrex::Box &bx, amrex::FArrayBox &derfab, int dcomp, int ncomp, const amrex::FArrayBox &datafab, const amrex::Geometry &geomdata, amrex::Real time, const int *bcrec, int level)> DeriveFuncFab
Definition AMReX_Derive.H:90
PCInterp pc_interp
CONSTRUCT A GLOBAL OBJECT OF EACH VERSION.
Definition AMReX_Interpolater.cpp:35
An element of a linked list to point to state quantities in AmrLevels.
Definition AMReX_Derive.H:310
int typ
Definition AMReX_Derive.H:311
int nc
Definition AMReX_Derive.H:313
StateRange * next
Definition AMReX_Derive.H:314
int sc
Definition AMReX_Derive.H:312