BISICLES AMR ice sheet model  0.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
AVCAMRPoissonOp Class Reference

#include <AVCAMRPoissonOp.H>

Inheritance diagram for AVCAMRPoissonOp:
Inheritance graph
[legend]
Collaboration diagram for AVCAMRPoissonOp:
Collaboration graph
[legend]

Public Member Functions

virtual void restrictResidual (LevelData< FArrayBox > &a_resCoarse, LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_rhsFine)
 
void finerOperatorChanged (const MGLevelOp< LevelData< FArrayBox > > &a_operator, int a_coarseningFactor)
 
LevelData< FArrayBox > & identityCoef ()
 Returns identity coefficient data. More...
 
void setBCoefInterpolator (RefCountedPtr< CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > > > &a_bCoefInterpolator)
 
LevelData< FluxBox > & BCoef ()
 Returns the B coefficient. More...
 
RefCountedPtr< CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > > > BCoefInterpolator ()
 
void setTime (Real a_time)
 
AVCAMRPoissonOp functions
 AVCAMRPoissonOp ()
 
virtual ~AVCAMRPoissonOp ()
 
virtual void residualI (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs, bool a_homogeneous=false)
 
virtual void preCond (LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_residual)
 
virtual void applyOpI (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi, bool a_homogeneous=false)
 
virtual void applyOpNoBoundary (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi)
 
virtual void setAlphaAndBeta (const Real &a_alpha, const Real &a_beta)
 For tga stuff. More...
 
virtual void setCoefs (const RefCountedPtr< LevelData< FArrayBox > > &a_aCoef, const RefCountedPtr< LevelData< FluxBox > > &a_bCoef, const Real &a_alpha, const Real &a_beta)
 Also calls reset lambda. More...
 
virtual void resetLambda ()
 Should be called before the relaxation parameter is needed. More...
 
virtual void computeLambda ()
 Compute lambda once alpha, aCoef, beta, bCoef are defined. More...
 
virtual void reflux (const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, LevelData< FArrayBox > &a_residual, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
 

Public Attributes

RefCountedPtr< LevelData< FArrayBox > > m_aCoef
 Identity operator spatially varying coefficient storage (cell-centered) — if you change this call resetLambda() More...
 
RefCountedPtr< LevelData< FluxBox > > m_bCoef
 Laplacian operator spatially varying coefficient storage (face-centered) — if you change this call resetLambda() More...
 
LevelData< FArrayBox > m_lambda
 Reciprocal of the diagonal entry of the operator matrix. More...
 

Protected Member Functions

virtual void levelGSRB (LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
 
virtual void levelMultiColor (LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
 
virtual void looseGSRB (LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
 
virtual void overlapGSRB (LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
 
virtual void levelGSRBLazy (LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
 
virtual void levelJacobi (LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs)
 
virtual void getFlux (FArrayBox &a_flux, const FArrayBox &a_data, const FluxBox &a_bCoef, const Box &a_facebox, int a_dir, int a_ref=1) const
 computes flux over face-centered a_facebox. More...
 
void computeOperatorNoBCs (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi)
 utility function which computes operator after all bc's have been set More...
 

Protected Attributes

LayoutData< CFIVS > m_loCFIVS [SpaceDim]
 
LayoutData< CFIVS > m_hiCFIVS [SpaceDim]
 
RefCountedPtr< CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > > > m_bCoefInterpolator
 
Real m_time
 
bool m_lambdaNeedsResetting
 

Detailed Description

Operator for solving variable-coefficient (alpha * aCoef(x) * I - beta * Div( bCoef(x) . Grad)) phi = rho over an AMR hierarchy. Similar to VCAMRPoissonOp2 but bCoef(x) is a tensor, b_ij = p + q n_i n_j + r m_i m_j. As a result, the stencil fills the whole cube surrounding a cell (9pt rather than 5pt in 2D, etc)

Constructor & Destructor Documentation

◆ AVCAMRPoissonOp()

AVCAMRPoissonOp::AVCAMRPoissonOp ( )
inline

◆ ~AVCAMRPoissonOp()

virtual AVCAMRPoissonOp::~AVCAMRPoissonOp ( )
inlinevirtual

Member Function Documentation

◆ applyOpI()

void AVCAMRPoissonOp::applyOpI ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_phi,
bool  a_homogeneous = false 
)
virtual

References applyOpNoBoundary().

Referenced by ~AVCAMRPoissonOp().

◆ applyOpNoBoundary()

void AVCAMRPoissonOp::applyOpNoBoundary ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_phi 
)
virtual

References m_aCoef.

Referenced by applyOpI(), and ~AVCAMRPoissonOp().

◆ BCoef()

LevelData<FluxBox>& AVCAMRPoissonOp::BCoef ( )
inline

Returns the B coefficient.

References m_bCoef.

◆ BCoefInterpolator()

RefCountedPtr<CoefficientInterpolator<LevelData<FluxBox>, LevelData<FArrayBox> > > AVCAMRPoissonOp::BCoefInterpolator ( )
inline

References m_bCoefInterpolator, and setTime().

◆ computeLambda()

void AVCAMRPoissonOp::computeLambda ( )
virtual

Compute lambda once alpha, aCoef, beta, bCoef are defined.

References m_aCoef, m_lambda, and resetLambda().

Referenced by AVCAMRPoissonOpFactory::AMRnewOp(), AVCAMRPoissonOpFactory::MGnewOp(), and ~AVCAMRPoissonOp().

◆ computeOperatorNoBCs()

void AVCAMRPoissonOp::computeOperatorNoBCs ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_phi 
)
protected

utility function which computes operator after all bc's have been set

◆ finerOperatorChanged()

void AVCAMRPoissonOp::finerOperatorChanged ( const MGLevelOp< LevelData< FArrayBox > > &  a_operator,
int  a_coarseningFactor 
)

This is called on multigrid operators when their AMR operators are altered.

References m_aCoef, m_bCoef, and m_lambdaNeedsResetting.

Referenced by AVCAMRPoissonOpFactory::refToFiner(), and ~AVCAMRPoissonOp().

◆ getFlux()

void AVCAMRPoissonOp::getFlux ( FArrayBox &  a_flux,
const FArrayBox &  a_data,
const FluxBox &  a_bCoef,
const Box &  a_facebox,
int  a_dir,
int  a_ref = 1 
) const
protectedvirtual

computes flux over face-centered a_facebox.

References setTime().

Referenced by reflux().

◆ identityCoef()

LevelData<FArrayBox>& AVCAMRPoissonOp::identityCoef ( )
inline

Returns identity coefficient data.

References m_aCoef.

◆ levelGSRB()

void AVCAMRPoissonOp::levelGSRB ( LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs 
)
protectedvirtual

References m_aCoef, m_lambda, and resetLambda().

◆ levelGSRBLazy()

void AVCAMRPoissonOp::levelGSRBLazy ( LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs 
)
protectedvirtual

◆ levelJacobi()

void AVCAMRPoissonOp::levelJacobi ( LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs 
)
protectedvirtual

References m_lambda, and resetLambda().

◆ levelMultiColor()

void AVCAMRPoissonOp::levelMultiColor ( LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs 
)
protectedvirtual

◆ looseGSRB()

void AVCAMRPoissonOp::looseGSRB ( LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs 
)
protectedvirtual

References m_aCoef, m_lambda, and resetLambda().

◆ overlapGSRB()

void AVCAMRPoissonOp::overlapGSRB ( LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs 
)
protectedvirtual

◆ preCond()

void AVCAMRPoissonOp::preCond ( LevelData< FArrayBox > &  a_correction,
const LevelData< FArrayBox > &  a_residual 
)
virtual

References m_bCoef, m_lambda, relax, and resetLambda().

Referenced by ~AVCAMRPoissonOp().

◆ reflux()

void AVCAMRPoissonOp::reflux ( const LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_phi,
LevelData< FArrayBox > &  a_residual,
AMRLevelOp< LevelData< FArrayBox > > *  a_finerOp 
)
virtual

References getFlux(), and m_bCoef.

Referenced by ~AVCAMRPoissonOp().

◆ resetLambda()

void AVCAMRPoissonOp::resetLambda ( )
virtual

Should be called before the relaxation parameter is needed.

References m_lambda, and m_lambdaNeedsResetting.

Referenced by computeLambda(), levelGSRB(), levelJacobi(), looseGSRB(), preCond(), and ~AVCAMRPoissonOp().

◆ residualI()

void AVCAMRPoissonOp::residualI ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs,
bool  a_homogeneous = false 
)
virtual

References m_aCoef.

Referenced by ~AVCAMRPoissonOp().

◆ restrictResidual()

void AVCAMRPoissonOp::restrictResidual ( LevelData< FArrayBox > &  a_resCoarse,
LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_rhsFine 
)
virtual

calculate restricted residual a_resCoarse[2h] = I[h->2h] (rhsFine[h] - L[h](phiFine[h])

Referenced by ~AVCAMRPoissonOp().

◆ setAlphaAndBeta()

void AVCAMRPoissonOp::setAlphaAndBeta ( const Real &  a_alpha,
const Real &  a_beta 
)
virtual

For tga stuff.

References m_lambdaNeedsResetting.

Referenced by ~AVCAMRPoissonOp().

◆ setBCoefInterpolator()

void AVCAMRPoissonOp::setBCoefInterpolator ( RefCountedPtr< CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > > > &  a_bCoefInterpolator)
inline

Sets up a model that modifies b coefficient data when the operator's time is set.

Parameters
a_bCoefInterpolatorA CoefficientInterpolator that will be used to compute the b coefficient at specific times.

References m_bCoefInterpolator.

◆ setCoefs()

void AVCAMRPoissonOp::setCoefs ( const RefCountedPtr< LevelData< FArrayBox > > &  a_aCoef,
const RefCountedPtr< LevelData< FluxBox > > &  a_bCoef,
const Real &  a_alpha,
const Real &  a_beta 
)
virtual

Also calls reset lambda.

References m_aCoef, m_bCoef, and m_lambdaNeedsResetting.

Referenced by ~AVCAMRPoissonOp().

◆ setTime()

void AVCAMRPoissonOp::setTime ( Real  a_time)

Sets the time centering of the operator. This interpolates b coefficient data at the given time if an interpolator is set.

References m_bCoef, m_bCoefInterpolator, m_lambdaNeedsResetting, and m_time.

Referenced by BCoefInterpolator(), and getFlux().

Member Data Documentation

◆ m_aCoef

RefCountedPtr<LevelData<FArrayBox> > AVCAMRPoissonOp::m_aCoef

◆ m_bCoef

RefCountedPtr<LevelData<FluxBox> > AVCAMRPoissonOp::m_bCoef

Laplacian operator spatially varying coefficient storage (face-centered) — if you change this call resetLambda()

Referenced by AVCAMRPoissonOpFactory::AMRnewOp(), BCoef(), AVCAMRPoissonOpFactory::define(), finerOperatorChanged(), AVCAMRPoissonOpFactory::MGnewOp(), preCond(), reflux(), setCoefs(), and setTime().

◆ m_bCoefInterpolator

RefCountedPtr<CoefficientInterpolator<LevelData<FluxBox>, LevelData<FArrayBox> > > AVCAMRPoissonOp::m_bCoefInterpolator
protected

◆ m_hiCFIVS

LayoutData<CFIVS> AVCAMRPoissonOp::m_hiCFIVS[SpaceDim]
protected

◆ m_lambda

LevelData<FArrayBox> AVCAMRPoissonOp::m_lambda

Reciprocal of the diagonal entry of the operator matrix.

Referenced by computeLambda(), levelGSRB(), levelJacobi(), looseGSRB(), preCond(), and resetLambda().

◆ m_lambdaNeedsResetting

bool AVCAMRPoissonOp::m_lambdaNeedsResetting
protected

◆ m_loCFIVS

LayoutData<CFIVS> AVCAMRPoissonOp::m_loCFIVS[SpaceDim]
protected

◆ m_time

Real AVCAMRPoissonOp::m_time
protected

Referenced by setTime().


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