chombo-discharge
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage Class Reference

Per-CDR-species scratch storage for the IMEX-SDC time stepper. More...

#include <CD_CdrPlasmaImExSdcStorage.H>

Public Member Functions

 CdrStorage ()
 Default constructor. Leaves all members uninitialised; call allocateStorage() after construction.
 
 CdrStorage (const RefCountedPtr< AmrMesh > &a_amr, const std::string &a_realm, const phase::which_phase a_phase, const int a_ncomp)
 Full constructor.
 
 ~CdrStorage ()
 Destructor.
 
void allocateStorage (const int a_p)
 Allocate all scratch arrays sized for p+1 SDC nodes.
 
void deallocateStorage ()
 Deallocate all scratch arrays.
 
EBAMRCellDatagetScratch ()
 Return the first cell-centered scratch array (one component).
 
EBAMRCellDatagetScratch2 ()
 Return the second cell-centered scratch array (one component).
 
EBAMRCellDatagetError ()
 Return the error estimator array (one component, cell-centered).
 
EBAMRCellDatagetGradient ()
 Return the cell-centered gradient storage (SpaceDim components).
 
EBAMRCellDatagetOld ()
 Return the "old solution" array used when subcycling is enabled.
 
EBAMRCellDatagetScratchD ()
 Return the SpaceDim-component cell-centered scratch array.
 
EBAMRCellDatagetDivF ()
 Return the divergence of the advective flux (cell-centered, one component).
 
Vector< EBAMRCellData > & getPhi ()
 Return the phi^k solution at all p+1 SDC nodes.
 
Vector< EBAMRCellData > & getFAR ()
 Return the explicit advection-reaction operator F_AR^k at all p+1 nodes.
 
Vector< EBAMRCellData > & getFD ()
 Return the implicit diffusion operator F_D^k at all p+1 nodes.
 
Vector< EBAMRCellData > & getF ()
 Return the combined operator F^k = F_AR^k + F_D^k at all p+1 nodes.
 
EBAMRIVDatagetEbScratch1 ()
 Return the first EB-centered scratch array (one component).
 
EBAMRIVDatagetEbScratchD ()
 Return the SpaceDim-component EB-centered scratch array.
 
EBAMRIVDatagetEbState ()
 Return the EB-centered species density (extrapolated from the cell center).
 
EBAMRIVDatagetEbVelo ()
 Return the EB-centered normal drift velocity.
 
EBAMRIVDatagetEbFlux ()
 Return the EB-centered boundary flux (outward positive).
 
EBAMRIVDatagetEbGrad ()
 Return the EB-centered normal density gradient.
 
EBAMRIFDatagetDomainState ()
 Return the domain-face-centered species density (extrapolated from the cell center).
 
EBAMRIFDatagetDomainVelo ()
 Return the domain-face-centered normal drift velocity.
 
EBAMRIFDatagetDomainFlux ()
 Return the domain-face-centered boundary flux (inward positive).
 
EBAMRIFDatagetDomainGrad ()
 Return the domain-face-centered normal density gradient.
 

Protected Attributes

std::string m_realm
 Realm on which storage is allocated.
 
RefCountedPtr< AmrMeshm_amr
 AMR mesh used for allocation.
 
phase::which_phase m_phase
 Phase on which storage is allocated.
 
int m_ncomp
 Number of scalar components (1 for CDR species).
 
int m_p
 Number of SDC subintervals (p+1 nodes).
 
bool m_subcycle
 If true, extra subcycling storage is allocated.
 
EBAMRCellData m_scratch
 First general-purpose cell-centered scratch array.
 
EBAMRCellData m_scratch2
 Second general-purpose cell-centered scratch array.
 
EBAMRCellData m_error
 Cell-centered error estimator: |phi^{k+1} - phi^k|.
 
EBAMRCellData m_gradient
 Cell-centered gradient of the species density (SpaceDim components).
 
EBAMRCellData m_old
 Cell-centered solution at the start of the step. Used for subcycling.
 
EBAMRCellData m_scratchD
 SpaceDim-component cell-centered scratch array.
 
EBAMRCellData m_divF
 Cell-centered divergence of the advective flux.
 
Vector< EBAMRCellDatam_phi
 phi^k at each of the p+1 SDC nodes. Index m ∈ [0, p].
 
Vector< EBAMRCellDatam_FAR
 Explicit advection-reaction operator F_AR(phi^k) at each node. Index m ∈ [0, p].
 
Vector< EBAMRCellDatam_FD
 Implicit diffusion operator F_D(phi^k) at each node. Index m ∈ [0, p].
 
Vector< EBAMRCellDatam_F
 Combined operator F = F_AR + F_D at each node. Index m ∈ [0, p].
 
EBAMRIVData m_scratchIVs
 EB-centered scalar scratch array (one component, e.g. for diffusion states).
 
EBAMRIVData m_scratchIVD
 EB-centered SpaceDim-component scratch array.
 
EBAMRIVData m_scratchIV1
 EB-centered species density extrapolated from the cell center.
 
EBAMRIVData m_scratchIV2
 EB-centered normal drift velocity component.
 
EBAMRIVData m_scratchIV3
 EB-centered boundary flux.
 
EBAMRIVData m_scratchIV4
 EB-centered normal density gradient.
 
EBAMRIFData m_scratchIF1
 Domain-face-centered species density extrapolated from the cell center.
 
EBAMRIFData m_scratchIF2
 Domain-face-centered normal drift velocity component.
 
EBAMRIFData m_scratchIF3
 Domain-face-centered boundary flux.
 
EBAMRIFData m_scratchIF4
 Domain-face-centered normal density gradient.
 

Detailed Description

Per-CDR-species scratch storage for the IMEX-SDC time stepper.

Holds all AMR data arrays needed to advance a single CDR species through the SDC integration: the phi^k solution at each of the p+1 quadrature nodes, the explicit advection-reaction operator F_AR^k, the implicit diffusion operator F_D^k, the combined operator F^k = F_AR^k + F_D^k, and auxiliary arrays for gradient computation, EB/domain state extrapolation, and error estimation.

Constructor & Destructor Documentation

◆ CdrStorage()

CdrPlasmaImExSdcStepper::CdrStorage::CdrStorage ( const RefCountedPtr< AmrMesh > &  a_amr,
const std::string a_realm,
const phase::which_phase  a_phase,
const int  a_ncomp 
)

Full constructor.

Parameters
[in]a_amrAMR mesh used to allocate data.
[in]a_realmRealm on which storage is allocated.
[in]a_phasePhase on which storage is allocated.
[in]a_ncompNumber of components (1 for scalar CDR species).

Member Function Documentation

◆ allocateStorage()

void CdrPlasmaImExSdcStepper::CdrStorage::allocateStorage ( const int  a_p)

Allocate all scratch arrays sized for p+1 SDC nodes.

Parameters
[in]a_pNumber of SDC subintervals.

◆ getDivF()

EBAMRCellData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getDivF ( )
inline

Return the divergence of the advective flux (cell-centered, one component).

Returns
Reference to m_divF.

◆ getDomainFlux()

EBAMRIFData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getDomainFlux ( )
inline

Return the domain-face-centered boundary flux (inward positive).

Returns
Reference to m_scratchIF3.

◆ getDomainGrad()

EBAMRIFData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getDomainGrad ( )
inline

Return the domain-face-centered normal density gradient.

Returns
Reference to m_scratchIF4.

◆ getDomainState()

EBAMRIFData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getDomainState ( )
inline

Return the domain-face-centered species density (extrapolated from the cell center).

Returns
Reference to m_scratchIF1.

◆ getDomainVelo()

EBAMRIFData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getDomainVelo ( )
inline

Return the domain-face-centered normal drift velocity.

Returns
Reference to m_scratchIF2.

◆ getEbFlux()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getEbFlux ( )
inline

Return the EB-centered boundary flux (outward positive).

Returns
Reference to m_scratchIV3.

◆ getEbGrad()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getEbGrad ( )
inline

Return the EB-centered normal density gradient.

Returns
Reference to m_scratchIV4.

◆ getEbScratch1()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getEbScratch1 ( )
inline

Return the first EB-centered scratch array (one component).

Used for diffusion-related EB quantities.

Returns
Reference to m_scratchIVs.

◆ getEbScratchD()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getEbScratchD ( )
inline

Return the SpaceDim-component EB-centered scratch array.

Returns
Reference to m_scratchIVD.

◆ getEbState()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getEbState ( )
inline

Return the EB-centered species density (extrapolated from the cell center).

Returns
Reference to m_scratchIV1.

◆ getEbVelo()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getEbVelo ( )
inline

Return the EB-centered normal drift velocity.

Returns
Reference to m_scratchIV2.

◆ getError()

EBAMRCellData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getError ( )
inline

Return the error estimator array (one component, cell-centered).

Stores |phi^{k+1} - phi^k| after each correction sweep.

Returns
Reference to m_error.

◆ getF()

Vector< EBAMRCellData > & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getF ( )
inline

Return the combined operator F^k = F_AR^k + F_D^k at all p+1 nodes.

Returns
Reference to m_F. Entry m holds F(phi^k_m).

◆ getFAR()

Vector< EBAMRCellData > & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getFAR ( )
inline

Return the explicit advection-reaction operator F_AR^k at all p+1 nodes.

Returns
Reference to m_FAR. Entry m holds F_AR(phi^k_m).

◆ getFD()

Vector< EBAMRCellData > & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getFD ( )
inline

Return the implicit diffusion operator F_D^k at all p+1 nodes.

Returns
Reference to m_FD. Entry m holds F_D(phi^k_m).

◆ getGradient()

EBAMRCellData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getGradient ( )
inline

Return the cell-centered gradient storage (SpaceDim components).

Returns
Reference to m_gradient.

◆ getOld()

EBAMRCellData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getOld ( )
inline

Return the "old solution" array used when subcycling is enabled.

Returns
Reference to m_old.

◆ getPhi()

Vector< EBAMRCellData > & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getPhi ( )
inline

Return the phi^k solution at all p+1 SDC nodes.

Returns
Reference to m_phi. Entry m holds phi^k at node m.

◆ getScratch()

EBAMRCellData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getScratch ( )
inline

Return the first cell-centered scratch array (one component).

Returns
Reference to m_scratch.

◆ getScratch2()

EBAMRCellData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getScratch2 ( )
inline

Return the second cell-centered scratch array (one component).

Returns
Reference to m_scratch2.

◆ getScratchD()

EBAMRCellData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::CdrStorage::getScratchD ( )
inline

Return the SpaceDim-component cell-centered scratch array.

Used for intermediate vector quantities such as velocity-weighted states.

Returns
Reference to m_scratchD.

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