Proto
3.2
|
Abstract Box-Scope Operator. More...
#include <Proto_BoxOp.H>
Public Types | |
typedef BoxData< T, C_STATE, MEM > | StateData |
typedef BoxData< T, C_AUX, MEM > | AuxData |
Public Member Functions | |
BoxOp () | |
Default Constructor. More... | |
BoxOp (const DisjointBoxLayout &a_layout, const LevelIndex &a_index, T a_dx) | |
Non-Trivial Isotropic Constructor. More... | |
BoxOp (const DisjointBoxLayout &a_layout, const LevelIndex &a_index, Array< T, DIM > a_dx) | |
Non-Trivial Anisotropic Constructor. More... | |
BoxOp (BoxOp< T, C_STATE, C_AUX, MEM > &&a_bop)=default | |
BoxOp< T, C_STATE, C_AUX, MEM > & | operator= (BoxOp< T, C_STATE, C_AUX, MEM > &&a_bop)=default |
void | define (const DisjointBoxLayout &a_layout, const LevelIndex &a_index, T a_dx) |
Lazy Isotropic Constructor. More... | |
void | define (const DisjointBoxLayout &a_layout, const LevelIndex &a_index, Array< T, DIM > a_dx) |
Lazy Anisotropic Constructor. More... | |
virtual void | init () |
Initialize. More... | |
virtual T | spectralRadius () const |
Spectral Radius (User Defined) More... | |
virtual void | operator() (StateData &a_output, const StateData &a_state, const AuxData &a_aux, T a_scale=1.0) const |
Apply (In Place) More... | |
virtual void | operator() (StateData &a_output, const StateData &a_state, T a_scale=1.0) const |
Apply (In Place) More... | |
virtual void | operator() (StateData &a_output, Array< StateData, DIM > &a_fluxes, const StateData &a_state, const AuxData &a_aux, T a_scale=1.0) const |
Apply (In Place, Flux Output) More... | |
virtual void | operator() (StateData &a_output, Array< StateData, DIM > &a_fluxes, const StateData &a_state, T a_scale=1.0) const |
Apply (In Place, Flux Output) More... | |
virtual StateData | operator() (const StateData &a_state, const AuxData &a_aux, Box a_range, T a_scale=1.0) const |
Apply (Out of Place) More... | |
virtual StateData | operator() (const StateData &a_state, Box a_range, T a_scale=1.0) const |
Apply (Out of Place) More... | |
void | applyBC (Array< StateData, DIM > &a_fluxes, const StateData &a_state) const |
Apply All Boundary Conditions. More... | |
virtual void | applyBC (Array< StateData, DIM > &a_fluxes, const StateData &a_state, Face a_face) const |
Apply User Specified Boundary Condition. More... | |
virtual void | flux (StateData &a_flux, const StateData &a_state, const AuxData &a_aux, int a_dir) const |
User Defined Flux. More... | |
virtual void | flux (StateData &a_flux, const StateData &a_state, int a_dir) const |
User Defined Flux. More... | |
virtual void | source (StateData &a_source, const StateData &a_state, const AuxData &a_aux) const |
User Defined Source. More... | |
virtual void | source (StateData &a_source, const StateData &a_state) const |
User Defined Source. More... | |
virtual void | diag (StateData &a_diag, const StateData &a_state, const AuxData &a_aux) const |
User Defined Diagonal. More... | |
virtual void | diag (StateData &a_diag, const StateData &a_state) const |
User Defined Diagonal. More... | |
void | setDiagScale (T a_value) |
TODO: not implemented (see MMB version which has this implemented) More... | |
void | setFluxScale (T a_value) |
Set Flux Term Scaling. More... | |
void | setTime (T a_time) |
Set Time. More... | |
void | setRKStage (unsigned int a_stage) |
Set Runge Kutta Stage. More... | |
T | diagScale () const |
Read Diagonal Term Scaling. More... | |
T | fluxScale () const |
Read Flux Term Scaling. More... | |
unsigned int | RKStage () const |
Read Flux Term Scaling. More... | |
T | time () const |
Get Time. More... | |
Array< T, DIM > | dx () const |
Get Grid Spacing. More... | |
T | dxMin () const |
Get Min Grid Spacing. More... | |
T | dxMax () const |
Get Max Grid Spacing. More... | |
const LevelIndex & | index () const |
Get Index. More... | |
const DisjointBoxLayout & | layout () const |
Get Layout. More... | |
const Box & | box () const |
Get Box. More... | |
Static Public Member Functions | |
static constexpr unsigned int | numState () |
Get Number of State Variables. More... | |
static constexpr unsigned int | numAux () |
Get Number of Auxiliary Variables. More... | |
Protected Attributes | |
T | m_scaleDiag |
T | m_scaleFlux |
T | m_time |
unsigned int | m_RKStage |
LevelIndex | m_index |
DisjointBoxLayout | m_layout |
bool | m_definedSrce |
bool | m_definedFlux |
Array< T, DIM > | m_dx |
Abstract Box-Scope Operator.
BoxOp is the class from which all operators on single patches, levels of patches, and AMR hierarchies are derived. Representable operators are of the form:
L(phi, rho) = d*D(phi, rho)*I + f*[Div(F(phi, rho)) + S(phi, rho)] L: Full Operator phi: State Variables rho: Auxiliary Variables D: Diagonal Component of L F: Flux Component of L S: Source Component of L I: Identity d: Diagonal Term Scaling f: Flux and Source Term Scaling
TODO: potentially template the op on the data-holder itself (e.g. BoxData) for additional flexibility.
T | Datatype of the data holder (e.g. int, double, etc.) |
C_STATE | Number of state variables |
C_AUX | Number of auxiliary (non-state) variables |
MEM | Proto::MemType of the data holder |
typedef BoxData<T, C_STATE, MEM> Proto::BoxOp< T, C_STATE, C_AUX, MEM >::StateData |
typedef BoxData<T, C_AUX, MEM> Proto::BoxOp< T, C_STATE, C_AUX, MEM >::AuxData |
|
inline |
Default Constructor.
Referenced by Proto::BoxOp< T, C_STATE, C_AUX, MEM >::box().
|
inline |
Non-Trivial Isotropic Constructor.
dx | Grid spacing |
|
inline |
Non-Trivial Anisotropic Constructor.
dx | Grid spacing |
|
inlinedefault |
|
inlinestatic |
Get Number of State Variables.
Allows C_STATE to be known after template parameter binding
|
inlinestatic |
Get Number of Auxiliary Variables.
Allows C_AUX to be known after template parameter binding
|
inlinedefault |
|
inline |
Lazy Isotropic Constructor.
dx | Grid spacing |
|
inline |
Lazy Anisotropic Constructor.
dx | Grid spacing |
|
inlinevirtual |
Initialize.
User defined function that is called inside of define. Useful for caching things like Stencil instances.
Reimplemented in Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >.
|
inlinevirtual |
Spectral Radius (User Defined)
Approximate spectral radius of the operator. Not required, but Needed for iterative solvers.
Reimplemented in Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >.
References Proto::BoxOp< T, C_STATE, C_AUX, MEM >::operator()().
|
inlinevirtual |
Apply (In Place)
Compute L(phi, rho)
output | Evaluated operator (output) |
state | State variables |
aux | Auxiliary variables |
Referenced by Proto::BoxOp< T, C_STATE, C_AUX, MEM >::spectralRadius().
|
inlinevirtual |
Apply (In Place)
Compute L(phi)
output | Evaluated operator (output) |
state | State variables |
Reimplemented in Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >.
|
inlinevirtual |
Apply (In Place, Flux Output)
Compute L(phi, rho)
output | Evaluated operator (output) |
state | State variables |
aux | Auxiliary variables |
|
inlinevirtual |
Apply (In Place, Flux Output)
Compute L(phi)
output | Evaluated operator (output) |
state | State variables |
Reimplemented in Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >.
|
inlinevirtual |
Apply (Out of Place)
Compute L(phi, rho).
state | State variables |
aux | Auxiliary variables |
range | Range of the output data |
|
inlinevirtual |
Apply (Out of Place)
Compute L(phi)
state | State variables |
range | Range of the output data |
Reimplemented in Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >.
|
inline |
Apply All Boundary Conditions.
|
inlinevirtual |
Apply User Specified Boundary Condition.
Reimplemented in Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >.
|
inlinevirtual |
User Defined Flux.
Compute F(phi, rho) in the direction dir
flux | Computed flux (output) |
state | State variables |
aux | Auxiliary variables |
dir | Direction in [0, DIM) |
Referenced by Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >::applyBC().
|
inlinevirtual |
User Defined Flux.
Compute F(phi) in the direction dir
flux | Computed flux (output) |
state | State variables |
dir | Direction in [0, DIM) |
|
inlinevirtual |
User Defined Source.
Compute S(phi, rho)
source | Computed flux (output) |
state | State variables |
aux | Auxiliary variables |
Referenced by Proto::MBBoxOp< T, MAP, C_STATE, C_AUX, MEM >::applyBC().
|
inlinevirtual |
User Defined Source.
Compute S(phi)
source | Computed flux (output) |
state | State variables |
|
inlinevirtual |
User Defined Diagonal.
Compute D(phi, rho)
diag | Computed flux (output) |
state | State variables |
aux | Auxiliary variables |
|
inlinevirtual |
User Defined Diagonal.
Compute D(phi)
diag | Computed flux (output) |
state | State variables |
|
inline |
TODO: not implemented (see MMB version which has this implemented)
Set Diagonal Term Scaling.
Set Diagonal Term Scaling Sets the value of d
|
inline |
Set Flux Term Scaling.
Sets the value of f
|
inline |
Set Time.
|
inline |
Set Runge Kutta Stage.
|
inline |
Read Diagonal Term Scaling.
References Proto::BoxOp< T, C_STATE, C_AUX, MEM >::m_scaleDiag.
|
inline |
Read Flux Term Scaling.
References Proto::BoxOp< T, C_STATE, C_AUX, MEM >::m_scaleFlux.
|
inline |
Read Flux Term Scaling.
References Proto::BoxOp< T, C_STATE, C_AUX, MEM >::m_RKStage.
|
inline |
Get Time.
References Proto::BoxOp< T, C_STATE, C_AUX, MEM >::dx(), and Proto::BoxOp< T, C_STATE, C_AUX, MEM >::m_time.
|
inline |
Get Grid Spacing.
Referenced by Proto::BoxOp< T, C_STATE, C_AUX, MEM >::time().
|
inline |
Get Min Grid Spacing.
|
inline |
Get Max Grid Spacing.
Get Grid Spacing.
|
inline |
Get Index.
References Proto::BoxOp< T, C_STATE, C_AUX, MEM >::m_index.
|
inline |
Get Layout.
References Proto::BoxOp< T, C_STATE, C_AUX, MEM >::m_layout.
|
inline |
|
protected |
DEPRECATED Mapped Multiblock Utilities
Referenced by Proto::BoxOp< T, C_STATE, C_AUX, MEM >::diagScale().
|
protected |
Referenced by Proto::BoxOp< T, C_STATE, C_AUX, MEM >::fluxScale().
|
protected |
Referenced by Proto::BoxOp< T, C_STATE, C_AUX, MEM >::time().
|
protected |
Referenced by Proto::BoxOp< T, C_STATE, C_AUX, MEM >::RKStage().
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |