Derived Type Record. More...
#include <AMReX_Derive.H>
Classes | |
struct | StateRange |
An element of a linked list to point to state quantities in AmrLevels. More... | |
Public Types | |
using | DeriveBoxMap = std::function< Box(const Box &)> |
A pointer to function taking and returning a Box. More... | |
Public Member Functions | |
~DeriveRec () | |
The destructor. More... | |
DeriveRec (DeriveRec const &)=delete | |
DeriveRec (DeriveRec &&)=delete | |
DeriveRec & | operator= (DeriveRec const &)=delete |
DeriveRec & | operator= (DeriveRec &&)=delete |
const std::string & | name () const noexcept |
The name of the derived type. More... | |
const std::string & | variableName (int comp) const noexcept |
The names of components. More... | |
IndexType | deriveType () const noexcept |
The IndexType of the derived type. More... | |
DeriveFunc | derFunc () const noexcept |
The DeriveFunc used to calculate the derived type. More... | |
DeriveFunc3D | derFunc3D () const noexcept |
DeriveFuncFab | derFuncFab () const noexcept |
DeriveFuncMF | derFuncMF () const noexcept |
DeriveBoxMap | boxMap () const noexcept |
Maps state data box to derived data box. More... | |
Interpolater * | interp () const noexcept |
Type of interpolater to use in computing derived type. More... | |
int | numDerive () const noexcept |
Number of components in the derived type. More... | |
int | numRange () const noexcept |
Number of different chunks of state data needed for derived type. More... | |
int | numState () const noexcept |
Total number of state variables needed for derived type. More... | |
const int * | getBC () const noexcept |
The boundary conditions. More... | |
const int * | getBC3D () const noexcept |
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 to calculate the derived quantity. More... | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, DeriveFunc der_func, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
Constructor. More... | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, DeriveFunc3D der_func_3d, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, DeriveFuncFab der_func_fab, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, DeriveFuncMF der_func_mf, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, DeriveRec::DeriveBoxMap box_map) | |
Constructor without a Fortran function. More... | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, Vector< std::string > const &var_names, DeriveFunc der_func, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
Constructor. More... | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, Vector< std::string > const &var_names, DeriveFunc3D der_func_3d, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, Vector< std::string > const &var_names, DeriveFuncFab der_func_fab, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
DeriveRec (std::string name, IndexType result_type, int nvar_derive, Vector< std::string > const &var_names, DeriveFuncMF der_func_mf, DeriveBoxMap box_map, Interpolater *interp=&pc_interp) | |
void | addRange (const DescriptorList &d_list, int state_indx, int src_comp, int num_comp) |
void | buildBC (const DescriptorList &d_list) |
void | buildBC3D (const DescriptorList &d_list) |
Static Public Member Functions | |
static Box | TheSameBox (const Box &box) noexcept |
static Box | GrowBoxByOne (const Box &box) noexcept |
Private Attributes | |
std::string | derive_name |
Name of derived quantity. More... | |
Vector< std::string > | variable_names |
Names of derived variables. More... | |
IndexType | der_type |
Type of derived quantity. More... | |
int | n_derive = 0 |
Number of components in derived quantity. More... | |
DeriveFunc | func = nullptr |
Function that computes derived quantity from state variables. More... | |
DeriveFunc3D | func_3d = nullptr |
DeriveFuncFab | func_fab = nullptr |
DeriveFuncMF | func_mf = nullptr |
Interpolater * | mapper = nullptr |
Interpolater for mapping crse grid derived data to finer levels. More... | |
DeriveBoxMap | bx_map = nullptr |
Box mapper that specifies constituent region given derived region. More... | |
int | n_state = 0 |
Total number of state variables. More... | |
int | nsr = 0 |
Number of state ranges. More... | |
StateRange * | rng = nullptr |
List of state data subranges required to derive given quantity. More... | |
int * | bcr = nullptr |
Array of bndry types. More... | |
int * | bcr3D = nullptr |
Friends | |
class | DeriveList |
Derived Type Record.
Computes quantities derived from state data.
DeriveRec is designed to compute quantities which can be derived from the state data contained in AmrLevel and its derivatives. Some examples might be kinetic energy, vorticity, concentration gradients ...
using amrex::DeriveRec::DeriveBoxMap = std::function<Box(const Box&)> |
A pointer to function taking and returning a Box.
amrex::DeriveRec::~DeriveRec | ( | ) |
The destructor.
|
delete |
|
delete |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
DeriveFunc | der_func, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
Constructor.
name | |
result_type | |
nvar_derive | |
der_func | |
box_map | |
interp |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
DeriveFunc3D | der_func_3d, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
DeriveFuncFab | der_func_fab, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
DeriveFuncMF | der_func_mf, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
DeriveRec::DeriveBoxMap | box_map | ||
) |
Constructor without a Fortran function.
name | |
result_type | |
nvar_derive | |
box_map |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
Vector< std::string > const & | var_names, | ||
DeriveFunc | der_func, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
Constructor.
name | |
result_type | |
nvar_derive | |
var_names | |
der_func | |
box_map | |
interp |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
Vector< std::string > const & | var_names, | ||
DeriveFunc3D | der_func_3d, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
Vector< std::string > const & | var_names, | ||
DeriveFuncFab | der_func_fab, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
amrex::DeriveRec::DeriveRec | ( | std::string | name, |
IndexType | result_type, | ||
int | nvar_derive, | ||
Vector< std::string > const & | var_names, | ||
DeriveFuncMF | der_func_mf, | ||
DeriveBoxMap | box_map, | ||
Interpolater * | interp = &pc_interp |
||
) |
void amrex::DeriveRec::addRange | ( | const DescriptorList & | d_list, |
int | state_indx, | ||
int | src_comp, | ||
int | num_comp | ||
) |
|
noexcept |
Maps state data box to derived data box.
void amrex::DeriveRec::buildBC | ( | const DescriptorList & | d_list | ) |
void amrex::DeriveRec::buildBC3D | ( | const DescriptorList & | d_list | ) |
|
noexcept |
The DeriveFunc used to calculate the derived type.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
The IndexType of the derived type.
|
noexcept |
The boundary conditions.
|
noexcept |
Sets state_indx, src_comp and num_comp for the kth range (or chunk) of state data components needed to calculate the derived quantity.
k | |
state_indx | |
src_comp | |
num_comp |
|
noexcept |
Type of interpolater to use in computing derived type.
|
noexcept |
The name of the derived type.
|
noexcept |
Number of components in the derived type.
|
noexcept |
Number of different chunks of state data needed for derived type.
|
noexcept |
Total number of state variables needed for derived type.
|
noexcept |
The names of components.
comp |
|
friend |
|
private |
Array of bndry types.
|
private |
|
private |
Box mapper that specifies constituent region given derived region.
|
private |
Type of derived quantity.
|
private |
Name of derived quantity.
|
private |
Function that computes derived quantity from state variables.
|
private |
|
private |
|
private |
|
private |
Interpolater for mapping crse grid derived data to finer levels.
|
private |
Number of components in derived quantity.
|
private |
Total number of state variables.
|
private |
Number of state ranges.
|
private |
List of state data subranges required to derive given quantity.
|
private |
Names of derived variables.