Multigrid Class Reference

#include <Multigrid.H>

List of all members.


Detailed Description

Multigrid: solve a FV discretization of Poisson's equation on a union of rectangles.

Public Member Functions

 Multigrid ()
 Default constructor.
 Multigrid (const BoxLayout &a_bl, double a_dx, int a_level)
 Not assuming strong construction, so we have constructor and define.
void define (const BoxLayout &a_bl, double a_dx, int a_level)
 ~Multigrid ()
 Destructor.
void residual (LevelData< double > &a_res, LevelData< double > &a_phi, const LevelData< double > &a_rhs)
 Compute residual.
double resnorm (LevelData< double > &a_phi, const LevelData< double > &a_rhs)
 Compute max norm of the residual.
void pointRelax (LevelData< double > &a_phi, const LevelData< double > &a_rhs, int a_numIter)
 Point relaxation. Currently point Jacobi.
void avgDown (LevelData< double > &a_resc, const LevelData< double > &a_res)
 average down residual to next coarser level. Assumes exact averaging on control volumes.
void fineInterp (LevelData< double > &a_phiFine, const LevelData< double > &a_deltaCoarse)
 Piecewise constant interpolation of coarse correction to increment fine solution.
void vCycle (LevelData< double > &a_phi, const LevelData< double > &a_rhs)
 Multigrid v cycle.

Private Attributes

LevelData< double > m_res
LevelData< double > m_rescReAligned
LevelData< double > m_deltaReAligned
LevelData< double > m_resc
LevelData< double > m_delta
BoxLayout m_bl
Multigridm_coarsePtr
double m_dx
int m_level
int m_preRelax = 2*DIM
int m_postRelax = 2*DIM
int m_bottomRelax = 20
long long m_flops = 0
bool m_isAligned

Constructor & Destructor Documentation

Multigrid::Multigrid (  ) 

Default constructor.

Multigrid::Multigrid ( const BoxLayout a_bl,
double  a_dx,
int  a_level 
)

Not assuming strong construction, so we have constructor and define.

Multigrid::~Multigrid (  ) 

Destructor.


Member Function Documentation

void Multigrid::define ( const BoxLayout a_bl,
double  a_dx,
int  a_level 
)

void Multigrid::residual ( LevelData< double > &  a_res,
LevelData< double > &  a_phi,
const LevelData< double > &  a_rhs 
)

Compute residual.

double Multigrid::resnorm ( LevelData< double > &  a_phi,
const LevelData< double > &  a_rhs 
)

Compute max norm of the residual.

void Multigrid::pointRelax ( LevelData< double > &  a_phi,
const LevelData< double > &  a_rhs,
int  a_numIter 
)

Point relaxation. Currently point Jacobi.

void Multigrid::avgDown ( LevelData< double > &  a_resc,
const LevelData< double > &  a_res 
)

average down residual to next coarser level. Assumes exact averaging on control volumes.

void Multigrid::fineInterp ( LevelData< double > &  a_phiFine,
const LevelData< double > &  a_deltaCoarse 
)

Piecewise constant interpolation of coarse correction to increment fine solution.

void Multigrid::vCycle ( LevelData< double > &  a_phi,
const LevelData< double > &  a_rhs 
)

Multigrid v cycle.


Member Data Documentation

LevelData<double > Multigrid::m_res [private]

LevelData<double > Multigrid::m_resc [private]

LevelData<double > Multigrid::m_delta [private]

double Multigrid::m_dx [private]

int Multigrid::m_level [private]

int Multigrid::m_preRelax = 2*DIM [private]

int Multigrid::m_postRelax = 2*DIM [private]

int Multigrid::m_bottomRelax = 20 [private]

long long Multigrid::m_flops = 0 [private]

bool Multigrid::m_isAligned [private]


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

Generated on Fri Mar 11 12:53:44 2016 for AMRStencil by  doxygen 1.5.5