Chombo + EB  3.0
Public Member Functions | List of all members
ResistivityOp Class Reference

#include <ResistivityOp.H>

Inheritance diagram for ResistivityOp:
Inheritance graph
[legend]

Public Member Functions

virtual void setAlphaAndBeta (const Real &a_alpha, const Real &a_beta)
 
virtual void diagonalScale (LevelData< FArrayBox > &a_rhs, bool a_kappaWeighted)
 
virtual void diagonalScale (LevelData< FArrayBox > &a_rhs)
 
virtual void divideByIdentityCoef (LevelData< FArrayBox > &a_rhs)
 
virtual ~ResistivityOp ()
 
virtual void getFlux (FluxBox &a_flux, const LevelData< FArrayBox > &a_data, const Box &a_grid, const DataIndex &a_dit, Real a_scale)
 
 ResistivityOp (const DisjointBoxLayout &a_grids, const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoar, const RefCountedPtr< LevelData< FluxBox > > &a_eta, Real a_alpha, Real a_beta, int a_refToFine, int a_refToCoar, const ProblemDomain &a_domain, const Real &a_dxLevel, const Real &a_dxCoar, BCFunc a_bc)
 
virtual void residual (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 applyOp (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 create (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
 
virtual void createCoarsened (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs, const int &a_refRat)
 
void reflux (const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, LevelData< FArrayBox > &residual, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
 
void getFlux (FArrayBox &a_flux, const FArrayBox &a_data, const FArrayBox &a_gradData, const FArrayBox &a_etaFace, const Box &a_facebox, int a_dir, int ref=1)
 
void computeOperatorNoBCs (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_phi)
 utility function which computes operator after all bc's have been set More...
 
virtual void assign (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
 
virtual Real dotProduct (const LevelData< FArrayBox > &a_1, const LevelData< FArrayBox > &a_2)
 
virtual void incr (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_x, Real a_scale)
 
virtual void axby (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_x, const LevelData< FArrayBox > &a_y, Real a, Real b)
 
virtual void scale (LevelData< FArrayBox > &a_lhs, const Real &a_scale)
 
virtual Real norm (const LevelData< FArrayBox > &a_x, int a_ord)
 
virtual void setToZero (LevelData< FArrayBox > &a_x)
 
MGLevelOp functions
virtual void relax (LevelData< FArrayBox > &a_e, const LevelData< FArrayBox > &a_residual, int iterations)
 
virtual void createCoarser (LevelData< FArrayBox > &a_coarse, const LevelData< FArrayBox > &a_fine, bool ghosted)
 
virtual void restrictResidual (LevelData< FArrayBox > &a_resCoarse, LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_rhsFine)
 
virtual void prolongIncrement (LevelData< FArrayBox > &a_phiThisLevel, const LevelData< FArrayBox > &a_correctCoarse)
 
- Public Member Functions inherited from LevelTGAHelmOp< LevelData< FArrayBox >, FluxBox >
 LevelTGAHelmOp ()
 
 LevelTGAHelmOp (bool a_isTimeIndependent)
 
virtual ~LevelTGAHelmOp ()
 Destructor. More...
 
- Public Member Functions inherited from TGAHelmOp< LevelData< FArrayBox > >
 TGAHelmOp ()
 
 TGAHelmOp (bool a_isTimeDependent)
 
virtual ~TGAHelmOp ()
 Destructor. More...
 
virtual void kappaScale (LevelData< FArrayBox > &a_rhs)
 for eb only. kappa weight the rhs but do not multiply by the identity coefficient More...
 
virtual void setTime (Real a_time)
 
virtual void setTime (Real a_oldTime, Real a_mu, Real a_dt)
 
bool isTimeDependent () const
 Returns true if the operator is time-dependent, false otherwise. More...
 
virtual LevelData< FArrayBox > & identityCoef ()
 Allows access to the identity coefficient data for the operator. More...
 
- Public Member Functions inherited from AMRLevelOp< LevelData< FArrayBox > >
virtual void dumpAMR (Vector< LevelData< FArrayBox > * > &a_data, string name)
 
virtual void dumpLevel (LevelData< FArrayBox > &a_data, string name)
 
 AMRLevelOp ()
 Constructor. More...
 
virtual void dumpStuff (Vector< LevelData< FArrayBox > * > data, string filename)
 
virtual ~AMRLevelOp ()
 Destructor. More...
 
virtual void outputLevel (LevelData< FArrayBox > &a_rhs, string &a_name)
 
virtual void outputAMR (Vector< LevelData< FArrayBox > * > &a_rhs, string &a_name)
 
virtual void buildCopier (Copier &a_copier, const LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
 
virtual void assignCopier (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs, const Copier &a_copier)
 
virtual void zeroCovered (LevelData< FArrayBox > &a_lhs, LevelData< FArrayBox > &a_rhs, const Copier &a_copier)
 
virtual Real localMaxNorm (const LevelData< FArrayBox > &a_phi)
 
virtual void AMRProlongS (LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection, LevelData< FArrayBox > &a_temp, const Copier &a_copier)
 
virtual void AMRRestrictS (LevelData< FArrayBox > &a_resCoarse, const LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection, LevelData< FArrayBox > &scratch)
 
virtual unsigned int orderOfAccuracy (void) const
 
virtual void enforceCFConsistency (LevelData< FArrayBox > &a_coarseCorrection, const LevelData< FArrayBox > &a_correction)
 This routine is for operators with orderOfAccuracy()>2. More...
 
- Public Member Functions inherited from MGLevelOp< LevelData< FArrayBox > >
 MGLevelOp ()
 Constructor. More...
 
virtual ~MGLevelOp ()
 Destructor. More...
 
void addObserver (MGLevelOpObserver< LevelData< FArrayBox > > *a_observer)
 
void removeObserver (MGLevelOpObserver< LevelData< FArrayBox > > *a_observer)
 
void addCoarserObserver (MGLevelOp< LevelData< FArrayBox > > *a_operator, int a_coarseningFactor)
 
void notifyObserversOfChange ()
 This should be called whenever the operator's data is updated. More...
 
virtual void finerOperatorChanged (const MGLevelOp< LevelData< FArrayBox > > &a_operator, int a_coarseningFactor)
 
int numObservers () const
 Returns the number of objects observing this operator. More...
 
- Public Member Functions inherited from LinearOp< LevelData< FArrayBox > >
virtual ~LinearOp ()
 
virtual void clear (LevelData< FArrayBox > &a_lhs)
 
virtual void assignLocal (LevelData< FArrayBox > &a_lhs, const LevelData< FArrayBox > &a_rhs)
 
virtual void mDotProduct (const LevelData< FArrayBox > &a_1, const int a_sz, const LevelData< FArrayBox > a_2[], Real a_mdots[])
 
virtual Real dx () const
 
virtual void write (const LevelData< FArrayBox > *a, const char *filename)
 
- Public Member Functions inherited from MGLevelOpObserver< LevelData< FArrayBox > >
 MGLevelOpObserver ()
 Base level Constructor. Called by all subclasses. More...
 
virtual ~MGLevelOpObserver ()
 Destructor. More...
 
virtual void operatorChanged (const MGLevelOp< LevelData< FArrayBox > > &a_operator)
 
void setObservee (MGLevelOp< LevelData< FArrayBox > > *a_observee)
 
void clearObservee ()
 

AMRLevelOp functions

RefCountedPtr< LevelData< FluxBox > > m_eta
 
DisjointBoxLayout m_grids
 
Real m_alpha
 
Real m_beta
 
int m_refToCoar
 
int m_refToFine
 
BCFunc m_bc
 
Real m_dx
 
Real m_dxCrse
 
ProblemDomain m_domain
 
LevelData< FArrayBoxm_lambda
 
LevelData< FArrayBoxm_grad
 
LevelDataOps< FArrayBoxm_levelOps
 
Copier m_exchangeCopier
 
TensorCFInterp m_interpWithCoarser
 
LayoutData< CFIVSm_loCFIVS [SpaceDim]
 
LayoutData< CFIVSm_hiCFIVS [SpaceDim]
 
LayoutData< TensorFineStencilSetm_hiTanStencilSets [SpaceDim]
 
LayoutData< TensorFineStencilSetm_loTanStencilSets [SpaceDim]
 
Vector< IntVectm_colors
 
static const int s_nComp
 
static const int s_nGradComp
 
virtual int refToCoarser ()
 
virtual void AMRResidual (LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, const LevelData< FArrayBox > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
 
virtual void AMRResidualNC (LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_rhs, bool a_homogeneousPhysBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
 
virtual void AMRResidualNF (LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, const LevelData< FArrayBox > &a_rhs, bool a_homogeneousPhysBC)
 
virtual void AMRRestrict (LevelData< FArrayBox > &a_resCoarse, const LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection)
 
virtual void AMRProlong (LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection)
 
virtual void AMRUpdateResidual (LevelData< FArrayBox > &a_residual, const LevelData< FArrayBox > &a_correction, const LevelData< FArrayBox > &a_coarseCorrection)
 
virtual Real AMRNorm (const LevelData< FArrayBox > &a_coarseResid, const LevelData< FArrayBox > &a_fineResid, const int &a_refRat, const int &a_ord)
 
void homogeneousCFInterp (LevelData< FArrayBox > &a_phif)
 
void homogeneousCFInterpPhi (LevelData< FArrayBox > &a_phif, const DataIndex &a_datInd, int a_idir, Side::LoHiSide a_hiorlo)
 
void homogeneousCFInterpTanGrad (LevelData< FArrayBox > &a_tanGrad, const LevelData< FArrayBox > &a_phi, const DataIndex &a_datInd, int a_idir, Side::LoHiSide a_hiorlo)
 
void interpOnIVSHomo (LevelData< FArrayBox > &a_phif, const DataIndex &a_datInd, const int a_idir, const Side::LoHiSide a_hiorlo, const IntVectSet &a_interpIVS)
 
void AMROperator (LevelData< FArrayBox > &a_LofPhi, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, bool a_homogeneousDomBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
 
void AMROperatorNF (LevelData< FArrayBox > &a_LofPhi, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > &a_phiCoarse, bool a_homogeneousBC)
 
virtual void AMROperatorNC (LevelData< FArrayBox > &a_LofPhi, const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phi, bool a_homogeneousBC, AMRLevelOp< LevelData< FArrayBox > > *a_finerOp)
 
void cellGrad (FArrayBox &a_gradPhi, const FArrayBox &a_phi, const Box &a_grid)
 
void cfinterp (const LevelData< FArrayBox > &a_phiFine, const LevelData< FArrayBox > &a_phiCoarse)
 
virtual void fillGrad (const LevelData< FArrayBox > &a_phiFine)
 These functions are part of the LevelTGA interface...... More...
 
void loHiCenterFace (Box &a_loBox, int &a_hasLo, Box &a_hiBox, int &a_hasHi, Box &a_centerBox, const ProblemDomain &a_eblg, const Box &a_inBox, const int &a_dir)
 
void getFaceDivAndGrad (FArrayBox &a_faceDiv, FArrayBox &a_faceGrad, const FArrayBox &a_data, const FArrayBox &a_gradData, const ProblemDomain &a_domain, const Box &a_faceBox, const int &a_faceDir, const Real a_dx)
 
void divergenceCC (LevelData< FArrayBox > &a_div, const LevelData< FArrayBox > &a_phi, const LevelData< FArrayBox > *a_phiC)
 take cell centered divergence of the inputs. More...
 
void setLambda ()
 
 ResistivityOp ()
 weak construction is bad More...
 
 ResistivityOp (const ResistivityOp &a_opin)
 
void operator= (const ResistivityOp &a_opin)
 

Detailed Description

operator L is defined as L(B) = alpha B + beta*(divF) where F = eta((grad B - grad B^T) + I (div B)) alpha and beta are constants. eta is a function of space. beta and eta are incorporated into the flux F when getFlux is called. This is always 3 variables. SpaceDim refers to only the derivatives that are meaningful in this bizzare application.

Constructor & Destructor Documentation

◆ ~ResistivityOp()

virtual ResistivityOp::~ResistivityOp ( )
inlinevirtual

◆ ResistivityOp() [1/3]

ResistivityOp::ResistivityOp ( const DisjointBoxLayout a_grids,
const DisjointBoxLayout a_gridsFine,
const DisjointBoxLayout a_gridsCoar,
const RefCountedPtr< LevelData< FluxBox > > &  a_eta,
Real  a_alpha,
Real  a_beta,
int  a_refToFine,
int  a_refToCoar,
const ProblemDomain a_domain,
const Real a_dxLevel,
const Real a_dxCoar,
BCFunc  a_bc 
)

◆ ResistivityOp() [2/3]

ResistivityOp::ResistivityOp ( )
inlineprivate

weak construction is bad

References MayDay::Error().

Referenced by ~ResistivityOp().

◆ ResistivityOp() [3/3]

ResistivityOp::ResistivityOp ( const ResistivityOp a_opin)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ setAlphaAndBeta()

virtual void ResistivityOp::setAlphaAndBeta ( const Real a_alpha,
const Real a_beta 
)
inlinevirtual

Sets the scaling constants in the Helmholtz equation.

Parameters
a_alphaThe scaling constant that multiplies the identity term.
a_betaThe scaling constant that multiplies the derivative term.

Implements TGAHelmOp< LevelData< FArrayBox > >.

References m_alpha, m_beta, and setLambda().

◆ diagonalScale() [1/2]

virtual void ResistivityOp::diagonalScale ( LevelData< FArrayBox > &  a_rhs,
bool  a_kappaWeighted 
)
inlinevirtual

Scales the right hand side of the Helmholtz equation by the identity term in the operator. If you are solving rho(x) dphi/dt = L(phi), this means multiply by rho (or kappa * rho in embedded boundary calculations.

Parameters
a_rhsThe right hand side of the equation to be scaled.
a_kappaWeightedIf set to true, a_rhs will be scaled by the volume fraction in addition to the identity term.

Reimplemented from TGAHelmOp< LevelData< FArrayBox > >.

◆ diagonalScale() [2/2]

virtual void ResistivityOp::diagonalScale ( LevelData< FArrayBox > &  a_rhs)
inlinevirtual

Scales the right hand side of the Helmholtz equation by the identity term in the operator. This version assumes volume fraction weighting.

Parameters
a_rhsThe right hand side of the equation to be scaled.

Reimplemented from TGAHelmOp< LevelData< FArrayBox > >.

◆ divideByIdentityCoef()

virtual void ResistivityOp::divideByIdentityCoef ( LevelData< FArrayBox > &  a_rhs)
inlinevirtual

Divides the right hand side of the Helmholtz equation by the identity coefficient rho(x) in the equation rho(x) dphi/dt = L(phi).

Parameters
a_rhsThe right hand side of the equation to be scaled.

Implements TGAHelmOp< LevelData< FArrayBox > >.

◆ getFlux() [1/2]

virtual void ResistivityOp::getFlux ( FluxBox a_flux,
const LevelData< FArrayBox > &  a_data,
const Box a_grid,
const DataIndex a_dit,
Real  a_scale 
)
virtual

◆ residual()

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

Say you are solving L(phi) = rhs. Make a_lhs = L(a_phi) - a_rhs. If a_homogeneous is true, evaluate the operator using homogeneous boundary conditions.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ preCond()

virtual void ResistivityOp::preCond ( LevelData< FArrayBox > &  a_cor,
const LevelData< FArrayBox > &  a_residual 
)
virtual

Given the current state of the residual the correction, apply your preconditioner to a_cor.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ applyOp()

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

In the context of solving L(phi) = rhs, set a_lhs = L(a_phi). If a_homogeneous is true, evaluate the operator using homogeneous boundary conditions.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ applyOpNoBoundary()

virtual void ResistivityOp::applyOpNoBoundary ( LevelData< FArrayBox > &  a_ans,
const LevelData< FArrayBox > &  a_phi 
)
virtual

Apply the differential operator without any boundary or coarse-fine boundary conditions and no finer level

Parameters
a_ansThe result of the application of the operator to a_phi.
a_phiThe data to which the operator is applied.

Implements TGAHelmOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ create()

virtual void ResistivityOp::create ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_rhs 
)
virtual

Creat data holder a_lhs that mirrors a_rhs. You do not need to copy the data of a_rhs, just make a holder the same size.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ createCoarsened()

virtual void ResistivityOp::createCoarsened ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_rhs,
const int &  a_refRat 
)
virtual

◆ reflux()

void ResistivityOp::reflux ( const LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_phi,
LevelData< FArrayBox > &  residual,
AMRLevelOp< LevelData< FArrayBox > > *  a_finerOp 
)

Referenced by ~ResistivityOp().

◆ getFlux() [2/2]

void ResistivityOp::getFlux ( FArrayBox a_flux,
const FArrayBox a_data,
const FArrayBox a_gradData,
const FArrayBox a_etaFace,
const Box a_facebox,
int  a_dir,
int  ref = 1 
)

◆ computeOperatorNoBCs()

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

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

Referenced by ~ResistivityOp().

◆ assign()

virtual void ResistivityOp::assign ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_rhs 
)
virtual

Set a_lhs equal to a_rhs.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ dotProduct()

virtual Real ResistivityOp::dotProduct ( const LevelData< FArrayBox > &  a_1,
const LevelData< FArrayBox > &  a_2 
)
virtual

Compute and return the dot product of a_1 and a_2. In most contexts, this means return the sum over all data points of a_1*a_2.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ incr()

virtual void ResistivityOp::incr ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_x,
Real  a_scale 
)
virtual

Increment by scaled amount (a_lhs += a_scale*a_x).

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ axby()

virtual void ResistivityOp::axby ( LevelData< FArrayBox > &  a_lhs,
const LevelData< FArrayBox > &  a_x,
const LevelData< FArrayBox > &  a_y,
Real  a_a,
Real  a_b 
)
virtual

Set input to a scaled sum (a_lhs = a_a*a_x + a_b*a_y).

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ scale()

virtual void ResistivityOp::scale ( LevelData< FArrayBox > &  a_lhs,
const Real a_scale 
)
virtual

Multiply the input by a given scale (a_lhs *= a_scale).

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ norm()

virtual Real ResistivityOp::norm ( const LevelData< FArrayBox > &  a_rhs,
int  a_ord 
)
virtual

Return the norm of a_rhs. a_ord == 0 max norm, a_ord == 1 sum(abs(a_rhs)), else, L(a_ord) norm.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ setToZero()

virtual void ResistivityOp::setToZero ( LevelData< FArrayBox > &  a_lhs)
virtual

Set a_lhs to zero.

Implements LinearOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ relax()

virtual void ResistivityOp::relax ( LevelData< FArrayBox > &  a_correction,
const LevelData< FArrayBox > &  a_residual,
int  a_iterations 
)
virtual

Use your relaxtion operator to remove the high frequency wave numbers from the correction so that it may be averaged to a coarser refinement. A point relaxtion scheme, for example takes the form a_correction -= lambda*(L(a_correction) - a_residual).

Implements MGLevelOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ createCoarser()

virtual void ResistivityOp::createCoarser ( LevelData< FArrayBox > &  a_coarse,
const LevelData< FArrayBox > &  a_fine,
bool  ghosted 
)
virtual

Create a coarsened (by two) version of the input data. This does not include averaging the data. So if a_fine is over a Box of (0, 0, 0) (63, 63, 63), a_fine should be over a Box (0, 0, 0) (31, 31, 31).

Implements MGLevelOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ restrictResidual()

virtual void ResistivityOp::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])

Implements MGLevelOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ prolongIncrement()

virtual void ResistivityOp::prolongIncrement ( LevelData< FArrayBox > &  a_phiThisLevel,
const LevelData< FArrayBox > &  a_correctCoarse 
)
virtual

correct the fine solution based on coarse correction a_phiThisLevel += I[2h->h](a_correctCoarse)

Implements MGLevelOp< LevelData< FArrayBox > >.

Referenced by ~ResistivityOp().

◆ refToCoarser()

virtual int ResistivityOp::refToCoarser ( )
inlinevirtual

◆ AMRResidual()

virtual void ResistivityOp::AMRResidual ( LevelData< FArrayBox > &  a_residual,
const LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_phiCoarse,
const LevelData< FArrayBox > &  a_rhs,
bool  a_homogeneousPhysBC,
AMRLevelOp< LevelData< FArrayBox > > *  a_finerOp 
)
virtual

a_residual = a_rhs - L(a_phi, a_phiFine, a_phiCoarse)

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMRResidualNC()

virtual void ResistivityOp::AMRResidualNC ( LevelData< FArrayBox > &  a_residual,
const LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_rhs,
bool  a_homogeneousPhysBC,
AMRLevelOp< LevelData< FArrayBox > > *  a_finerOp 
)
virtual

residual assuming no more coarser AMR levels

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMRResidualNF()

virtual void ResistivityOp::AMRResidualNF ( LevelData< FArrayBox > &  a_residual,
const LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_phiCoarse,
const LevelData< FArrayBox > &  a_rhs,
bool  a_homogeneousPhysBC 
)
virtual

a_residual = a_rhs - L(a_phi, a_phiCoarse)

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMRRestrict()

virtual void ResistivityOp::AMRRestrict ( LevelData< FArrayBox > &  a_resCoarse,
const LevelData< FArrayBox > &  a_residual,
const LevelData< FArrayBox > &  a_correction,
const LevelData< FArrayBox > &  a_coarseCorrection 
)
virtual

a_resCoarse = I[h-2h]( a_residual - L(a_correction, a_coarseCorrection)) it is assumed that a_resCoarse has already been filled in with the coarse version of AMRResidualNF and that this operation is free to overwrite in the overlap regions.

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMRProlong()

virtual void ResistivityOp::AMRProlong ( LevelData< FArrayBox > &  a_correction,
const LevelData< FArrayBox > &  a_coarseCorrection 
)
virtual

a_correction += I[h->h](a_coarseCorrection)

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMRUpdateResidual()

virtual void ResistivityOp::AMRUpdateResidual ( LevelData< FArrayBox > &  a_residual,
const LevelData< FArrayBox > &  a_correction,
const LevelData< FArrayBox > &  a_coarseCorrection 
)
virtual

a_residual = a_residual - L(a_correction, a_coarseCorrection)

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMRNorm()

virtual Real ResistivityOp::AMRNorm ( const LevelData< FArrayBox > &  a_coarseResid,
const LevelData< FArrayBox > &  a_fineResid,
const int &  a_refRat,
const int &  a_ord 
)
virtual

compute norm over all cells on coarse not covered by finer

Reimplemented from AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ homogeneousCFInterp()

void ResistivityOp::homogeneousCFInterp ( LevelData< FArrayBox > &  a_phif)

Referenced by refToCoarser().

◆ homogeneousCFInterpPhi()

void ResistivityOp::homogeneousCFInterpPhi ( LevelData< FArrayBox > &  a_phif,
const DataIndex a_datInd,
int  a_idir,
Side::LoHiSide  a_hiorlo 
)

does homogeneous coarse/fine interpolation for phi

Referenced by refToCoarser().

◆ homogeneousCFInterpTanGrad()

void ResistivityOp::homogeneousCFInterpTanGrad ( LevelData< FArrayBox > &  a_tanGrad,
const LevelData< FArrayBox > &  a_phi,
const DataIndex a_datInd,
int  a_idir,
Side::LoHiSide  a_hiorlo 
)

does homogeneous coarse/fine interpolation for tangential gradient (needs phi ghost cells to be filled in first, so should call homogeneousCFInterpPhi first)

Referenced by refToCoarser().

◆ interpOnIVSHomo()

void ResistivityOp::interpOnIVSHomo ( LevelData< FArrayBox > &  a_phif,
const DataIndex a_datInd,
const int  a_idir,
const Side::LoHiSide  a_hiorlo,
const IntVectSet a_interpIVS 
)

Referenced by refToCoarser().

◆ AMROperator()

void ResistivityOp::AMROperator ( LevelData< FArrayBox > &  a_LofPhi,
const LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_phiCoarse,
bool  a_homogeneousDomBC,
AMRLevelOp< LevelData< FArrayBox > > *  a_finerOp 
)
virtual

Apply the AMR operator, including coarse-fine matching

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMROperatorNF()

void ResistivityOp::AMROperatorNF ( LevelData< FArrayBox > &  a_LofPhi,
const LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > &  a_phiCoarse,
bool  a_homogeneousBC 
)
virtual

Apply the AMR operator, including coarse-fine matching. assume no finer AMR level

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ AMROperatorNC()

virtual void ResistivityOp::AMROperatorNC ( LevelData< FArrayBox > &  a_LofPhi,
const LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_phi,
bool  a_homogeneousBC,
AMRLevelOp< LevelData< FArrayBox > > *  a_finerOp 
)
virtual

Apply the AMR operator, including coarse-fine matching assume no coarser AMR level

Implements AMRLevelOp< LevelData< FArrayBox > >.

Referenced by refToCoarser().

◆ cellGrad()

void ResistivityOp::cellGrad ( FArrayBox a_gradPhi,
const FArrayBox a_phi,
const Box a_grid 
)

Referenced by refToCoarser().

◆ cfinterp()

void ResistivityOp::cfinterp ( const LevelData< FArrayBox > &  a_phiFine,
const LevelData< FArrayBox > &  a_phiCoarse 
)

Referenced by refToCoarser().

◆ fillGrad()

virtual void ResistivityOp::fillGrad ( const LevelData< FArrayBox > &  a_phi)
virtual

These functions are part of the LevelTGA interface......

Implements LevelTGAHelmOp< LevelData< FArrayBox >, FluxBox >.

Referenced by refToCoarser().

◆ loHiCenterFace()

void ResistivityOp::loHiCenterFace ( Box a_loBox,
int &  a_hasLo,
Box a_hiBox,
int &  a_hasHi,
Box a_centerBox,
const ProblemDomain a_eblg,
const Box a_inBox,
const int &  a_dir 
)

Referenced by refToCoarser().

◆ getFaceDivAndGrad()

void ResistivityOp::getFaceDivAndGrad ( FArrayBox a_faceDiv,
FArrayBox a_faceGrad,
const FArrayBox a_data,
const FArrayBox a_gradData,
const ProblemDomain a_domain,
const Box a_faceBox,
const int &  a_faceDir,
const Real  a_dx 
)

Referenced by refToCoarser().

◆ divergenceCC()

void ResistivityOp::divergenceCC ( LevelData< FArrayBox > &  a_div,
const LevelData< FArrayBox > &  a_phi,
const LevelData< FArrayBox > *  a_phiC 
)

take cell centered divergence of the inputs.

not part of the operator evaluation. this is to test whether the divergence of b converges at h^2 as b does if b is analytically divergence-free.

Referenced by refToCoarser().

◆ setLambda()

void ResistivityOp::setLambda ( )
protected

Referenced by refToCoarser(), and setAlphaAndBeta().

◆ operator=()

void ResistivityOp::operator= ( const ResistivityOp a_opin)
inlineprivate

References MayDay::Error().

Member Data Documentation

◆ m_eta

RefCountedPtr<LevelData<FluxBox> > ResistivityOp::m_eta
protected

◆ m_grids

DisjointBoxLayout ResistivityOp::m_grids
protected

◆ m_alpha

Real ResistivityOp::m_alpha
protected

Referenced by setAlphaAndBeta().

◆ m_beta

Real ResistivityOp::m_beta
protected

Referenced by setAlphaAndBeta().

◆ m_refToCoar

int ResistivityOp::m_refToCoar
protected

Referenced by refToCoarser().

◆ m_refToFine

int ResistivityOp::m_refToFine
protected

◆ m_bc

BCFunc ResistivityOp::m_bc
protected

◆ s_nComp

const int ResistivityOp::s_nComp
staticprotected

◆ s_nGradComp

const int ResistivityOp::s_nGradComp
staticprotected

◆ m_dx

Real ResistivityOp::m_dx
protected

◆ m_dxCrse

Real ResistivityOp::m_dxCrse
protected

◆ m_domain

ProblemDomain ResistivityOp::m_domain
protected

◆ m_lambda

LevelData<FArrayBox> ResistivityOp::m_lambda
protected

◆ m_grad

LevelData<FArrayBox> ResistivityOp::m_grad
protected

◆ m_levelOps

LevelDataOps<FArrayBox> ResistivityOp::m_levelOps
protected

◆ m_exchangeCopier

Copier ResistivityOp::m_exchangeCopier
protected

◆ m_interpWithCoarser

TensorCFInterp ResistivityOp::m_interpWithCoarser
protected

◆ m_loCFIVS

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

◆ m_hiCFIVS

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

◆ m_hiTanStencilSets

LayoutData<TensorFineStencilSet> ResistivityOp::m_hiTanStencilSets[SpaceDim]
protected

◆ m_loTanStencilSets

LayoutData<TensorFineStencilSet> ResistivityOp::m_loTanStencilSets[SpaceDim]
protected

◆ m_colors

Vector<IntVect> ResistivityOp::m_colors
protected

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