#include <Multigrid.H>
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 |
Multigrid * | m_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 |
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.
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.
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.
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.
Multigrid v cycle.
LevelData<double > Multigrid::m_res [private] |
LevelData<double > Multigrid::m_rescReAligned [private] |
LevelData<double > Multigrid::m_deltaReAligned [private] |
LevelData<double > Multigrid::m_resc [private] |
LevelData<double > Multigrid::m_delta [private] |
BoxLayout Multigrid::m_bl [private] |
Multigrid* Multigrid::m_coarsePtr [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] |