Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::DeriveRec Class Reference

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.
 

Public Member Functions

 ~DeriveRec ()
 The destructor.
 
 DeriveRec (DeriveRec const &)=delete
 
 DeriveRec (DeriveRec &&)=delete
 
DeriveRecoperator= (DeriveRec const &)=delete
 
DeriveRecoperator= (DeriveRec &&)=delete
 
const std::string & name () const noexcept
 The name of the derived type.
 
const std::string & variableName (int comp) const noexcept
 The names of components.
 
IndexType deriveType () const noexcept
 The IndexType of the derived type.
 
DeriveFunc derFunc () const noexcept
 The DeriveFunc used to calculate the derived type.
 
DeriveFunc3D derFunc3D () const noexcept
 
DeriveFuncFab derFuncFab () const noexcept
 
DeriveFuncMF derFuncMF () const noexcept
 
DeriveBoxMap boxMap () const noexcept
 Maps state data box to derived data box.
 
Interpolaterinterp () const noexcept
 Type of interpolater to use in computing derived type.
 
int numDerive () const noexcept
 Number of components in the derived type.
 
int numRange () const noexcept
 Number of different chunks of state data needed for derived type.
 
int numState () const noexcept
 Total number of state variables needed for derived type.
 
const intgetBC () const noexcept
 The boundary conditions.
 
const intgetBC3D () 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.
 
 DeriveRec (std::string name, IndexType result_type, int nvar_derive, DeriveFunc der_func, DeriveBoxMap box_map, Interpolater *interp=&pc_interp)
 Constructor.
 
 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.
 
 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.
 
 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
 

Friends

class DeriveList
 

Detailed Description

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 ...

Member Typedef Documentation

◆ DeriveBoxMap

using amrex::DeriveRec::DeriveBoxMap = std::function<Box(const Box&)>

A pointer to function taking and returning a Box.

Constructor & Destructor Documentation

◆ ~DeriveRec()

amrex::DeriveRec::~DeriveRec ( )

The destructor.

◆ DeriveRec() [1/11]

amrex::DeriveRec::DeriveRec ( DeriveRec const &  )
delete

◆ DeriveRec() [2/11]

amrex::DeriveRec::DeriveRec ( DeriveRec &&  )
delete

◆ DeriveRec() [3/11]

amrex::DeriveRec::DeriveRec ( std::string  name,
IndexType  result_type,
int  nvar_derive,
DeriveFunc  der_func,
DeriveBoxMap  box_map,
Interpolater interp = &pc_interp 
)

Constructor.

Parameters
name
result_type
nvar_derive
der_func
box_map
interp

◆ DeriveRec() [4/11]

amrex::DeriveRec::DeriveRec ( std::string  name,
IndexType  result_type,
int  nvar_derive,
DeriveFunc3D  der_func_3d,
DeriveBoxMap  box_map,
Interpolater interp = &pc_interp 
)

◆ DeriveRec() [5/11]

amrex::DeriveRec::DeriveRec ( std::string  name,
IndexType  result_type,
int  nvar_derive,
DeriveFuncFab  der_func_fab,
DeriveBoxMap  box_map,
Interpolater interp = &pc_interp 
)

◆ DeriveRec() [6/11]

amrex::DeriveRec::DeriveRec ( std::string  name,
IndexType  result_type,
int  nvar_derive,
DeriveFuncMF  der_func_mf,
DeriveBoxMap  box_map,
Interpolater interp = &pc_interp 
)

◆ DeriveRec() [7/11]

amrex::DeriveRec::DeriveRec ( std::string  name,
IndexType  result_type,
int  nvar_derive,
DeriveRec::DeriveBoxMap  box_map 
)

Constructor without a Fortran function.

Parameters
name
result_type
nvar_derive
box_map

◆ DeriveRec() [8/11]

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.

Parameters
name
result_type
nvar_derive
var_names
der_func
box_map
interp

◆ DeriveRec() [9/11]

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 
)

◆ DeriveRec() [10/11]

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 
)

◆ DeriveRec() [11/11]

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 
)

Member Function Documentation

◆ addRange()

void amrex::DeriveRec::addRange ( const DescriptorList d_list,
int  state_indx,
int  src_comp,
int  num_comp 
)

◆ boxMap()

DeriveRec::DeriveBoxMap amrex::DeriveRec::boxMap ( ) const
noexcept

Maps state data box to derived data box.

◆ buildBC()

void amrex::DeriveRec::buildBC ( const DescriptorList d_list)

◆ buildBC3D()

void amrex::DeriveRec::buildBC3D ( const DescriptorList d_list)

◆ derFunc()

DeriveFunc amrex::DeriveRec::derFunc ( ) const
noexcept

The DeriveFunc used to calculate the derived type.

◆ derFunc3D()

DeriveFunc3D amrex::DeriveRec::derFunc3D ( ) const
noexcept

◆ derFuncFab()

DeriveFuncFab amrex::DeriveRec::derFuncFab ( ) const
noexcept

◆ derFuncMF()

DeriveFuncMF amrex::DeriveRec::derFuncMF ( ) const
noexcept

◆ deriveType()

IndexType amrex::DeriveRec::deriveType ( ) const
noexcept

The IndexType of the derived type.

◆ getBC()

const int * amrex::DeriveRec::getBC ( ) const
noexcept

The boundary conditions.

◆ getBC3D()

const int * amrex::DeriveRec::getBC3D ( ) const
noexcept

◆ getRange()

void amrex::DeriveRec::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.

Parameters
k
state_indx
src_comp
num_comp

◆ GrowBoxByOne()

Box amrex::DeriveRec::GrowBoxByOne ( const Box box)
staticnoexcept

◆ interp()

Interpolater * amrex::DeriveRec::interp ( ) const
noexcept

Type of interpolater to use in computing derived type.

◆ name()

const std::string & amrex::DeriveRec::name ( ) const
noexcept

The name of the derived type.

◆ numDerive()

int amrex::DeriveRec::numDerive ( ) const
noexcept

Number of components in the derived type.

◆ numRange()

int amrex::DeriveRec::numRange ( ) const
noexcept

Number of different chunks of state data needed for derived type.

◆ numState()

int amrex::DeriveRec::numState ( ) const
noexcept

Total number of state variables needed for derived type.

◆ operator=() [1/2]

DeriveRec & amrex::DeriveRec::operator= ( DeriveRec &&  )
delete

◆ operator=() [2/2]

DeriveRec & amrex::DeriveRec::operator= ( DeriveRec const &  )
delete

◆ TheSameBox()

Box amrex::DeriveRec::TheSameBox ( const Box box)
staticnoexcept

◆ variableName()

const std::string & amrex::DeriveRec::variableName ( int  comp) const
noexcept

The names of components.

Parameters
comp

Friends And Related Symbol Documentation

◆ DeriveList

friend class DeriveList
friend

The documentation for this class was generated from the following files: