BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType > Class Template Reference

#include <BaseLevelTGA.H>

Inheritance diagram for BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
class BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >

This base class implements the 2nd-order implicit L0-stable time integration algorithm developed by Twizell, Gumel, and Arigu for solving elliptic equations. It relies upon linear algebraic operations defined in the underlying Helmholtz operators.
Template Parameters:
LevelDataType The type used to store data at a grid level. This is usually LevelData<T>, where T is some cell-centered FArrayBox type.
FluxDataType The type used to store flux data at a grid level. This is usually an array box clas that stores fluxes.
FluxRegisterType The type used to store flux register data for interactions between different grid levels. This is usually a flux register class.

Public Member Functions

 BaseLevelTGA (const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRat, const ProblemDomain &a_level0Domain, RefCountedPtr< AMRLevelOpFactory< LevelDataType > > &a_opFact, const RefCountedPtr< AMRMultiGrid< LevelDataType > > &a_solver)
virtual ~BaseLevelTGA ()
 Destructor, called after destructors of BaseLevelTGA subclasses.
void updateSoln (LevelDataType &a_phiNew, LevelDataType &a_phiOld, LevelDataType &a_src, LevelData< FluxDataType > &a_flux, FluxRegisterType *a_fineFluxRegPtr, FluxRegisterType *a_crseFluxRegPtr, const LevelDataType *a_crsePhiOldPtr, const LevelDataType *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, bool a_rhsAlreadyKappaWeighted=false, int a_fluxStartComponent=0)
void computeDiffusion (LevelDataType &a_diffusiveTerm, LevelDataType &a_phiOld, LevelDataType &a_src, LevelData< FluxDataType > &a_flux, FluxRegisterType *a_fineFluxRegPtr, FluxRegisterType *a_crseFluxRegPtr, const LevelDataType *a_crsePhiOldPtr, const LevelDataType *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, bool a_rhsAlreadyKappaWeighted=false)

Protected Member Functions

virtual void setSourceGhostCells (LevelDataType &a_src, const DisjointBoxLayout &a_dbl, int a_level)=0

Protected Attributes

Real m_mu1
Real m_mu2
Real m_mu3
Real m_mu4
Real m_r1

Private Member Functions

void updateSolnWithTimeIndependentOp (LevelDataType &a_phiNew, LevelDataType &a_phiOld, LevelDataType &a_src, LevelData< FluxDataType > &a_flux, FluxRegisterType *a_fineFluxRegPtr, FluxRegisterType *a_crseFluxRegPtr, const LevelDataType *a_crsePhiOldPtr, const LevelDataType *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, int a_fluxStartComponent=0)
void updateSolnWithTimeDependentOp (LevelDataType &a_phiNew, LevelDataType &a_phiOld, LevelDataType &a_src, LevelData< FluxDataType > &a_flux, FluxRegisterType *a_fineFluxRegPtr, FluxRegisterType *a_crseFluxRegPtr, const LevelDataType *a_crsePhiOldPtr, const LevelDataType *a_crsePhiNewPtr, Real a_oldTime, Real a_crseOldTime, Real a_crseNewTime, Real a_dt, int a_level, bool a_zeroPhi=true, int a_fluxStartComponent=0)
BaseLevelTGAoperator= (const BaseLevelTGA &)
 BaseLevelTGA (const BaseLevelTGA &a_opin)
 BaseLevelTGA ()

Constructor & Destructor Documentation

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::BaseLevelTGA ( const Vector< DisjointBoxLayout > &  a_grids,
const Vector< int > &  a_refRat,
const ProblemDomain a_level0Domain,
RefCountedPtr< AMRLevelOpFactory< LevelDataType > > &  a_opFact,
const RefCountedPtr< AMRMultiGrid< LevelDataType > > &  a_solver 
) [inline]

Initializes the base class of a TGA time integrator. This must be called by any subclass of BaseLevelTGA.

Parameters:
a_grids The DisjointBoxLayout on which the TGA scheme is to operate.
a_refRatio An array containing the refinement ratios between the hierarchical AMR grid levels for the domain.
a_level0Domain The domain at the coarsest AMR grid level.
a_opFact A factory typename LevelDataTypehat is used to generate Helmholtz operators to be used by the scheme.
a_solver An AMR Multigrid solver for solving the linear systems at each stage of the TGA integration scheme.

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
virtual BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::~BaseLevelTGA (  )  [inline, virtual]

Destructor, called after destructors of BaseLevelTGA subclasses.

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::BaseLevelTGA ( const BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType > &  a_opin  )  [private]

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::BaseLevelTGA (  )  [private]


Member Function Documentation

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
void BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::updateSoln ( LevelDataType &  a_phiNew,
LevelDataType &  a_phiOld,
LevelDataType &  a_src,
LevelData< FluxDataType > &  a_flux,
FluxRegisterType *  a_fineFluxRegPtr,
FluxRegisterType *  a_crseFluxRegPtr,
const LevelDataType *  a_crsePhiOldPtr,
const LevelDataType *  a_crsePhiNewPtr,
Real  a_oldTime,
Real  a_crseOldTime,
Real  a_crseNewTime,
Real  a_dt,
int  a_level,
bool  a_zeroPhi = true,
bool  a_rhsAlreadyKappaWeighted = false,
int  a_fluxStartComponent = 0 
) [inline, virtual]

Integrates the helmholtz equation represented by this object, placing the new solution in a_phiNew.

Parameters:
a_phiNew The new solution (the value of phi at time n + 1) will be stored here.
a_phiOld The old solution (the value of phi at time n).
a_src The source term on the right hand side of the Helmholtz equation.
a_flux This will store the flux computed at the current grid level during the solution of the Helmholtz equation.
a_fineFluxRegPtr A pointer to the flux register representing the finer grid level adjacent to this one, or NULL if there is no finer grid level.
a_crseFluxRegPtr A pointer to the flux register representing the coarser grid level adjacent to this one, or NULL if there is no coarser grid level.
a_oldTime The time at the beginning of the integration step at the current grid level.
a_crseOldTime The time at the beginning of the integration step at the coarser adjacent grid level. This parameter is ignored if there is no coarser grid level.
a_crseNewTime The time at the end of the integration step at the coarser adjacent grid level. This parameter is ignored if there is no coarser grid level.
a_dt The size of the integration step at the current grid level.
a_level The current grid level.
a_zeroPhi If set to true, a_phiNew will be set to zero before the integration takes place. Otherwise, a_phiNew is assumed to be an initial estimate for the solution in the iterative linear solve.
a_fluxStartComponent An index identifying the component at which flux data begins within a_fineFluxRegPtr and a_crseFluxRegPtr.

Implements BaseLevelHeatSolver< LevelDataType, FluxDataType, FluxRegisterType >.

Referenced by BaseLevelTGA< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::computeDiffusion().

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
void BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::computeDiffusion ( LevelDataType &  a_diffusiveTerm,
LevelDataType &  a_phiOld,
LevelDataType &  a_src,
LevelData< FluxDataType > &  a_flux,
FluxRegisterType *  a_fineFluxRegPtr,
FluxRegisterType *  a_crseFluxRegPtr,
const LevelDataType *  a_crsePhiOldPtr,
const LevelDataType *  a_crsePhiNewPtr,
Real  a_oldTime,
Real  a_crseOldTime,
Real  a_crseNewTime,
Real  a_dt,
int  a_level,
bool  a_zeroPhi = true,
bool  a_rhsAlreadyKappaWeighted = false 
) [inline, virtual]

Computes the time-centered diffusion term L(phi). This can be used to find contributions to the solution from diffusion. The diffusion term is computed by computing a finite difference approximation for d phi/dt using the updated and original values of phi and the time step. Most of the arguments given here are passed along to updateSoln and retain their significance therein.

Parameters:
a_diffusiveTerm The diffusion term L(phi) will be stored here.
a_phiOld The old solution (the value of phi at time n).
a_src The source term on the right hand side of the Helmholtz equation (used to fine the new value of phi).
a_fineFluxRegPtr A pointer to the flux register representing the finer grid level adjacent to this one, or NULL if there is no finer grid level.
a_crseFluxRegPtr A pointer to the flux register representing the coarser grid level adjacent to this one, or NULL if there is no coarser grid level.
a_crsePhiOldTime A pointer to the value of phi at the beginning of the integration step at the coarser grid level adjacent to this one, or NULL if there is no coarser grid level.
a_crsePhiNewTime A pointer to the value of phi at the end of the integration step at the coarser grid level adjacent to this one, or NULL if there is no coarser grid level.
a_oldTime The time at the beginning of the integration step at the current grid level.
a_crseOldTime The time at the beginning of the integration step at the coarser adjacent grid level. This parameter is ignored if there is no coarser grid level.
a_crseNewTime The time at the end of the integration step at the coarser adjacent grid level. This parameter is ignored if there is no coarser grid level.
a_dt The size of the integration step at the current grid level.
a_level The current grid level.
a_zeroPhi If set to true, the new value of phi will be set to zero before the integration takes place. Otherwise, it will be set to the value in a_diffusiveTerm.

Reimplemented from BaseLevelHeatSolver< LevelDataType, FluxDataType, FluxRegisterType >.

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
virtual void BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::setSourceGhostCells ( LevelDataType &  a_src,
const DisjointBoxLayout a_dbl,
int  a_level 
) [protected, pure virtual]

Sets the value of the source term in the Helmholtz equation on ghost cells. This method should be overridden by subclasses of BaseLevelTGA.

Parameters:
a_src The source term in the Helmholtz equation whose ghost cell values are to be set.
a_dbl The disjoint box layout that indexes a_src.
a_level The grid level at which the ghost cell values are to be set.

Implemented in LevelTGA, and EBLevelTGA.

Referenced by BaseLevelTGA< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSolnWithTimeDependentOp(), and BaseLevelTGA< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSolnWithTimeIndependentOp().

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
void BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::updateSolnWithTimeIndependentOp ( LevelDataType &  a_phiNew,
LevelDataType &  a_phiOld,
LevelDataType &  a_src,
LevelData< FluxDataType > &  a_flux,
FluxRegisterType *  a_fineFluxRegPtr,
FluxRegisterType *  a_crseFluxRegPtr,
const LevelDataType *  a_crsePhiOldPtr,
const LevelDataType *  a_crsePhiNewPtr,
Real  a_oldTime,
Real  a_crseOldTime,
Real  a_crseNewTime,
Real  a_dt,
int  a_level,
bool  a_zeroPhi = true,
int  a_fluxStartComponent = 0 
) [inline, private]

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
void BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::updateSolnWithTimeDependentOp ( LevelDataType &  a_phiNew,
LevelDataType &  a_phiOld,
LevelDataType &  a_src,
LevelData< FluxDataType > &  a_flux,
FluxRegisterType *  a_fineFluxRegPtr,
FluxRegisterType *  a_crseFluxRegPtr,
const LevelDataType *  a_crsePhiOldPtr,
const LevelDataType *  a_crsePhiNewPtr,
Real  a_oldTime,
Real  a_crseOldTime,
Real  a_crseNewTime,
Real  a_dt,
int  a_level,
bool  a_zeroPhi = true,
int  a_fluxStartComponent = 0 
) [inline, private]

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
BaseLevelTGA& BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::operator= ( const BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType > &   )  [private]


Member Data Documentation

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
Real BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::m_mu1 [protected]

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
Real BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::m_mu2 [protected]

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
Real BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::m_mu3 [protected]

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
Real BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::m_mu4 [protected]

template<class LevelDataType, class FluxDataType, class FluxRegisterType>
Real BaseLevelTGA< LevelDataType, FluxDataType, FluxRegisterType >::m_r1 [protected]


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

Generated on Tue Oct 17 03:26:56 2017 for Chombo + EB + MF by  doxygen 1.5.5