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

Surface charge solver scratch storage for the IMEX-SDC time stepper. More...

#include <CD_CdrPlasmaImExSdcStorage.H>

Public Member Functions

 SigmaStorage ()
 Default constructor. Leaves all members uninitialised; call allocateStorage() after construction.
 
 SigmaStorage (const RefCountedPtr< AmrMesh > &a_amr, const std::string &a_realm, const phase::which_phase a_phase, const int a_ncomp)
 Full constructor.
 
 ~SigmaStorage ()
 Destructor.
 
void allocateStorage (const int a_p)
 Allocate surface charge scratch storage for p+1 SDC nodes.
 
void deallocateStorage ()
 Deallocate all surface charge scratch storage.
 
EBAMRIVDatagetScratch ()
 Return the general-purpose EB-centered scratch array.
 
EBAMRIVDatagetError ()
 Return the surface charge error estimator: |sigma^{k+1} - sigma^k|.
 
Vector< EBAMRIVData > & getSigmaSolver ()
 Return sigma^k at all p+1 SDC nodes.
 
Vector< EBAMRIVData > & getFnew ()
 Return the new (current-sweep) flux operator slopes at all p+1 nodes.
 
Vector< EBAMRIVData > & getFold ()
 Return the lagged (previous-sweep) flux operator slopes at all p+1 nodes.
 

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 surface charge).
 
int m_p
 Number of SDC subintervals.
 
EBAMRIVData m_scratch
 General-purpose EB-centered scratch array.
 
EBAMRIVData m_error
 Surface charge error estimator: |sigma^{k+1} - sigma^k|.
 
Vector< EBAMRIVDatam_sigma
 sigma^k at each of the p+1 SDC nodes. Index m ∈ [0, p].
 
Vector< EBAMRIVDatam_Fnew
 New (current-sweep) flux operator slopes at each node. Index m ∈ [0, p].
 
Vector< EBAMRIVDatam_Fold
 Lagged (previous-sweep) flux operator slopes at each node. Index m ∈ [0, p].
 

Detailed Description

Surface charge solver scratch storage for the IMEX-SDC time stepper.

Holds sigma^k at each SDC node plus the new and lagged flux operator values needed for the SDC correction sweeps, and an error estimator.

Constructor & Destructor Documentation

◆ SigmaStorage()

CdrPlasmaImExSdcStepper::SigmaStorage::SigmaStorage ( 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 surface charge).

Member Function Documentation

◆ allocateStorage()

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

Allocate surface charge scratch storage for p+1 SDC nodes.

Parameters
[in]a_pNumber of SDC subintervals.

◆ getError()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::SigmaStorage::getError ( )
inline

Return the surface charge error estimator: |sigma^{k+1} - sigma^k|.

Returns
Reference to m_error.

◆ getFnew()

Vector< EBAMRIVData > & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::SigmaStorage::getFnew ( )
inline

Return the new (current-sweep) flux operator slopes at all p+1 nodes.

Returns
Reference to m_Fnew. Entry m holds F_{sigma,new}^k at node m.

◆ getFold()

Vector< EBAMRIVData > & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::SigmaStorage::getFold ( )
inline

Return the lagged (previous-sweep) flux operator slopes at all p+1 nodes.

Returns
Reference to m_Fold. Entry m holds F_{sigma,old}^{k-1} at node m.

◆ getScratch()

EBAMRIVData & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::SigmaStorage::getScratch ( )
inline

Return the general-purpose EB-centered scratch array.

Returns
Reference to m_scratch.

◆ getSigmaSolver()

Vector< EBAMRIVData > & Physics::CdrPlasma::CdrPlasmaImExSdcStepper::SigmaStorage::getSigmaSolver ( )
inline

Return sigma^k at all p+1 SDC nodes.

Returns
Reference to m_sigma. Entry m holds sigma^k at node m.

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