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

A list of DeriveRecs. More...

#include <AMReX_Derive.H>

Public Member Functions

 DeriveList ()=default
 The default constructor.
 
 ~DeriveList ()=default
 Destructor (defaulted to keep header-only implementation trivial).
 
 DeriveList (const DeriveList &)=delete
 Non-copyable registry; it owns pointers to callback records.
 
 DeriveList (DeriveList &&)=delete
 Non-movable because the registry’s entries self-register with static globals.
 
DeriveListoperator= (const DeriveList &)=delete
 Copy assignment disabled for the same reason as the copy constructor.
 
DeriveListoperator= (DeriveList &&)=delete
 Move assignment disabled to avoid dangling pointers inside DeriveRec entries.
 
bool canDerive (const std::string &name) const
 Determines whether quantity identified by name is registered.
 
const DeriveRecget (const std::string &name) const
 Access the particular record in registry.
 
void add (const std::string &name, IndexType result_type, int nvar_derive, DeriveFunc der_func, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 Register a new derived quantity backed by a DeriveFunc.
 
void add (const std::string &name, IndexType result_type, int nvar_derive, DeriveFunc3D der_func_3d, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 DeriveFunc3D variant (parameters mirror the DeriveFunc version).
 
void add (const std::string &name, IndexType result_type, int nvar_derive, const DeriveFuncFab &der_func_fab, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 DeriveFuncFab variant (parameters mirror the DeriveFunc version).
 
void add (const std::string &name, IndexType result_type, int nvar_derive, const DeriveFuncMF &der_func_mf, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 DeriveFuncMF variant (parameters mirror the DeriveFunc version).
 
void add (const std::string &name, IndexType result_type, int nvar_derive, const DeriveRec::DeriveBoxMap &box_map=&DeriveRec::TheSameBox)
 Register a placeholder record without attaching a callable yet.
 
void add (const std::string &name, IndexType res_typ, int nvar_derive, Vector< std::string > const &vars, DeriveFunc der_func, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 Register a derived quantity and supply per-component names up front.
 
void add (const std::string &name, IndexType res_typ, int nvar_derive, Vector< std::string > const &vars, DeriveFunc3D der_func_3d, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 Named-component variant using DeriveFunc3D callbacks.
 
void add (const std::string &name, IndexType res_typ, int nvar_derive, Vector< std::string > const &vars, const DeriveFuncFab &der_func_fab, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 Named-component variant using DeriveFuncFab callbacks.
 
void add (const std::string &name, IndexType res_typ, int nvar_derive, Vector< std::string > const &vars, const DeriveFuncMF &der_func_mf, const DeriveRec::DeriveBoxMap &bx_map, Interpolater *interp=&pc_interp)
 Named-component variant using DeriveFuncMF callbacks.
 
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.
 
std::list< DeriveRec > & dlist ()
 Mutable access to the underlying list of records.
 
void clear ()
 Remove all registered derived records.
 

Detailed Description

A list of DeriveRecs.

DeriveList manages and provides access to the list of DeriveRecs.

Constructor & Destructor Documentation

◆ DeriveList() [1/3]

amrex::DeriveList::DeriveList ( )
default

The default constructor.

◆ ~DeriveList()

amrex::DeriveList::~DeriveList ( )
default

Destructor (defaulted to keep header-only implementation trivial).

◆ DeriveList() [2/3]

amrex::DeriveList::DeriveList ( const DeriveList )
delete

Non-copyable registry; it owns pointers to callback records.

◆ DeriveList() [3/3]

amrex::DeriveList::DeriveList ( DeriveList &&  )
delete

Non-movable because the registry’s entries self-register with static globals.

Member Function Documentation

◆ add() [1/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  res_typ,
int  nvar_derive,
Vector< std::string > const &  vars,
const DeriveFuncFab der_func_fab,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

Named-component variant using DeriveFuncFab callbacks.

◆ add() [2/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  res_typ,
int  nvar_derive,
Vector< std::string > const &  vars,
const DeriveFuncMF der_func_mf,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

Named-component variant using DeriveFuncMF callbacks.

◆ add() [3/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  res_typ,
int  nvar_derive,
Vector< std::string > const &  vars,
DeriveFunc  der_func,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

Register a derived quantity and supply per-component names up front.

Parameters
nameDerived quantity name.
res_typIndex type describing the derived FAB layout.
nvar_deriveNumber of components produced.
varsComponent names (size nvar_derive).
der_funcFunction pointer to invoke.
bx_mapMapping from destination boxes to source boxes.
interpInterpolater used on finer levels.

◆ add() [4/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  res_typ,
int  nvar_derive,
Vector< std::string > const &  vars,
DeriveFunc3D  der_func_3d,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

Named-component variant using DeriveFunc3D callbacks.

◆ add() [5/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  result_type,
int  nvar_derive,
const DeriveFuncFab der_func_fab,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

DeriveFuncFab variant (parameters mirror the DeriveFunc version).

◆ add() [6/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  result_type,
int  nvar_derive,
const DeriveFuncMF der_func_mf,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

DeriveFuncMF variant (parameters mirror the DeriveFunc version).

◆ add() [7/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  result_type,
int  nvar_derive,
const DeriveRec::DeriveBoxMap box_map = &DeriveRec::TheSameBox 
)

Register a placeholder record without attaching a callable yet.

Parameters
nameDerived quantity name.
result_typeIndex type describing the derived FAB layout.
nvar_deriveNumber of components produced.
box_mapMapping from destination boxes to required source boxes.

◆ add() [8/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  result_type,
int  nvar_derive,
DeriveFunc  der_func,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

Register a new derived quantity backed by a DeriveFunc.

Parameters
nameDerived quantity name.
result_typeIndex type describing the derived FAB layout.
nvar_deriveNumber of components produced.
der_funcFunction pointer to invoke.
bx_mapMapping from destination boxes to required source boxes.
interpInterpolater used on finer levels (defaults to piecewise-constant).

◆ add() [9/9]

void amrex::DeriveList::add ( const std::string &  name,
IndexType  result_type,
int  nvar_derive,
DeriveFunc3D  der_func_3d,
const DeriveRec::DeriveBoxMap bx_map,
Interpolater interp = &pc_interp 
)

DeriveFunc3D variant (parameters mirror the DeriveFunc version).

◆ addComponent()

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

Parameters
nameDerived quantity being augmented.
d_listDescriptor registry providing metadata.
state_indxState descriptor index supplying data.
s_compStarting component within that descriptor.
n_compNumber of components included in the range.

◆ canDerive()

bool amrex::DeriveList::canDerive ( const std::string &  name) const

Determines whether quantity identified by name is registered.

Parameters
nameDerived quantity name.

◆ clear()

void amrex::DeriveList::clear ( )
inline

Remove all registered derived records.

◆ dlist()

std::list< DeriveRec > & amrex::DeriveList::dlist ( )

Mutable access to the underlying list of records.

◆ get()

const DeriveRec * amrex::DeriveList::get ( const std::string &  name) const

Access the particular record in registry.

Parameters
nameDerived quantity name.

◆ operator=() [1/2]

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

Copy assignment disabled for the same reason as the copy constructor.

◆ operator=() [2/2]

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

Move assignment disabled to avoid dangling pointers inside DeriveRec entries.


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