Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CCProjector Class Reference

this class manages the various forms of the CC projection More...

#include <CCProjector.H>

Collaboration diagram for CCProjector:

Collaboration graph
[legend]
List of all members.

Public Methods

 CCProjector ()
 CCProjector (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_crseGridsPtr, const Box &a_domain, const Real a_dx, CCProjector *a_finerProj, CCProjector *a_crseProj, int a_nRefCrse, int a_level, const PhysBCUtil &a_physBC)
 full constructor

 CCProjector (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_crseGridsPtr, const ProblemDomain &a_domain, const Real a_dx, CCProjector *a_finerProj, CCProjector *a_crseProj, int a_nRefCrse, int a_level, const PhysBCUtil &a_physBC)
 full constructor

 ~CCProjector ()
 destructor

void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_crseGridsPtr, const Box &a_domain, const Real a_dx, CCProjector *a_finerProj, CCProjector *a_crseProj, int a_nRefCrse, int a_level, const PhysBCUtil &a_physBC)
 define function

void define (const DisjointBoxLayout &a_grids, const DisjointBoxLayout *a_crseGridsPtr, const ProblemDomain &a_domain, const Real a_dx, CCProjector *a_finerProj, CCProjector *a_crseProj, int a_nRefCrse, int a_level, const PhysBCUtil &a_physBC)
 define function

void init (const CCProjector &a_oldProj)
 initialize new projection with data from old projection

void variableSetUp ()
 define static parts

void setCrseProj (CCProjector *a_crseProj, int nRefCrse)
void setFineProj (CCProjector *a_fineProj)
void limitSolverCoarsening (bool a_limitSolverCoarsening)
 set solver parameter

void writeCheckpointHeader (HDF5Handle &a_handle) const
 write checkpoint header

void writeCheckpointLevel (HDF5Handle &a_handle) const
 write this class to a checkpoint file for later restart

void readCheckpointHeader (HDF5Handle &a_handle)
 read the checkpoint header

void readCheckpointLevel (HDF5Handle &a_handle)
 read this class from a checkpoint file

void levelMacProject (LevelData< FluxBox > &uEdge, Real a_oldTime, Real a_dt)
void LevelProject (LevelData< FArrayBox > &a_velocity, LevelData< FArrayBox > *a_crseVelPtr, const Real a_newTime, const Real a_dt)
void doSyncOperations (Vector< LevelData< FArrayBox > * > &a_velocity, Vector< LevelData< FArrayBox > * > &a_lambda, const Real a_newTime, const Real a_dtSync)
void initialLevelProject (LevelData< FArrayBox > &a_velocity, LevelData< FArrayBox > *a_crseVelPtr, const Real a_oldTime, const Real a_newTime)
void doInitialSyncOperations (Vector< LevelData< FArrayBox > * > &a_vel, Vector< LevelData< FArrayBox > * > &a_lambda, const Real a_newTime, const Real a_dtSync)
void initialVelocityProject (Vector< LevelData< FArrayBox > * > &a_velocity, bool a_homogeneousCFBC=true)
void initialVelocityProject (Vector< LevelData< FArrayBox > * > &a_velocity, AMRSolver &a_solver, bool a_homogeneousCFBC=true)
void doPostRegridOps (Vector< LevelData< FArrayBox > * > &a_velocity, Vector< LevelData< FArrayBox > * > &a_lambda, const Real a_dt, const Real a_time)
int getLevel () const
 access functions

const ProblemDomaindProblem () const
const DisjointBoxLayoutgetBoxes () const
int nRefCrse () const
Real dx () const
Real etaLambda () const
 returns coefficient for volume-discrepancy solve.

CCProjector * fineProjPtr () const
CCProjector * crseProjPtr () const
LevelData< FArrayBox > & phi ()
 returns MAC correction

const LevelData< FArrayBox > & phi () const
 const version of accessor

void gradPhi (LevelData< FArrayBox > &a_gradPhi, int a_dir) const
 returns edge-centered grad(phi) in direction dir

void gradPhi (LevelData< FluxBox > &a_gradPhi) const
 returns all components of grad(phi) (gradPhi should be correct size)

LevelData< FArrayBox > & Pi ()
 returns level-projection pressure

void gradPi (LevelData< FArrayBox > &a_gradPi, int a_dir) const
 returns grad(pi) in direction dir

void gradPi (LevelData< FArrayBox > &a_gradPi) const
LevelData< FArrayBox > & eSync ()
 returns synchronization correction

const LevelData< FArrayBox > & eSync () const
 returns synchronization correction (const version)

void grad_eSync (LevelData< FArrayBox > &a_grad_eSync, int a_dir) const
 returns cell-centered grad(eSync) (composite gradient)

void grad_eSync (LevelData< FArrayBox > &a_grad_eSync) const
 returns cell-centered G^{comp}(eSync)

LevelData< FArrayBox > & eLambda ()
 returns volume-discrepancy correction

const LevelData< FArrayBox > & eLambda () const
 returns volume-discrepancy correction (const version)

void grad_eLambda (LevelData< FArrayBox > &a_grad_eLambda, int a_dir) const
 returns edge-centered grad(eLambda) in direction dir

LevelData< FluxBox > & grad_eLambda ()
const LevelData< FluxBox > & grad_eLambda () const
bool doSyncProjection () const
 do sync projection?

bool doMacSync () const
 do volume discrepancy correction?

bool isInitialized () const
 has this object been completely initialized?

bool doQuadInterp () const
 use quadratic interpolation (instead of extrap) for c/f bc

QuadCFInterpquadCFInterpolator ()
 returns predefined quadratic coarse-fine interpolation object

bool isFinestLevel () const
 is this the finest level?

void isFinestLevel (bool a_finest_level)
 set whether this is the finest level

void verbosity (int a_verbosity)
 set verbosity

int verbosity () const
 returns verbosity

void setPhysBC (const PhysBCUtil &a_bc)
 sets physBCs

PhysBCUtilgetPhysBCPtr () const

Protected Methods

void applyMacCorrection (LevelData< FluxBox > &a_uEdge, Real CFscale)
 returns uEdge - G(phi_mac); C/F BC is CFscale*Pi(crse)

void correctCCVelocities (LevelData< FArrayBox > &a_velocity, const Real scale) const
 vel := vel - scale*G_CC(pi)

void doSyncProjection (Vector< LevelData< FArrayBox > * > &a_velocity, const Real a_newTime, const Real a_dtSync, AMRSolver &solver)
void initialSyncProjection (Vector< LevelData< FArrayBox > * > &a_velocity, const Real a_newTime, const Real a_dtSync, AMRSolver &a_solver)
 perform initial sync projection

void computeVDCorrection (Vector< LevelData< FArrayBox > * > &a_lambda, const Real a_newTime, const Real a_dtSync, AMRSolver &solver)
void applySyncCorrection (Vector< LevelData< FArrayBox > * > &a_velocity, const Real scale, LevelData< FArrayBox > *crseCorr)
void computeGrad_eLambda ()
 compute composite gradient of eLambda -- does this recursively

void rescaleGrad_eLambda (Real a_dx_lbase)
 rescales composite gradient of eLambda, recursively all finer levels

void defineSolver (AMRSolver &a_solver, const Vector< LevelData< FArrayBox > * > &a_vel, bool a_freestreamSolver)
void postRestart ()
 takes care of setting ghost cell values after restarting


Detailed Description

this class manages the various forms of the CC projection

this class performs the various cell-centered projections required by the IAMR algorithm. These include the single-level operators levelMac and levelProject, as well as the multilevel sync projection and volume discrepancy solves.


Constructor & Destructor Documentation

CCProjector::CCProjector  
 

CCProjector::CCProjector const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_crseGridsPtr,
const Box   a_domain,
const Real    a_dx,
CCProjector *    a_finerProj,
CCProjector *    a_crseProj,
int    a_nRefCrse,
int    a_level,
const PhysBCUtil   a_physBC
 

full constructor

CCProjector::CCProjector const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_crseGridsPtr,
const ProblemDomain   a_domain,
const Real    a_dx,
CCProjector *    a_finerProj,
CCProjector *    a_crseProj,
int    a_nRefCrse,
int    a_level,
const PhysBCUtil   a_physBC
 

full constructor

CCProjector::~CCProjector  
 

destructor


Member Function Documentation

void CCProjector::applyMacCorrection LevelData< FluxBox > &    a_uEdge,
Real    CFscale
[protected]
 

returns uEdge - G(phi_mac); C/F BC is CFscale*Pi(crse)

void CCProjector::applySyncCorrection Vector< LevelData< FArrayBox > * > &    a_velocity,
const Real    scale,
LevelData< FArrayBox > *    crseCorr
[protected]
 

void CCProjector::computeGrad_eLambda   [protected]
 

compute composite gradient of eLambda -- does this recursively

void CCProjector::computeVDCorrection Vector< LevelData< FArrayBox > * > &    a_lambda,
const Real    a_newTime,
const Real    a_dtSync,
AMRSolver   solver
[protected]
 

void CCProjector::correctCCVelocities LevelData< FArrayBox > &    a_velocity,
const Real    scale
const [protected]
 

vel := vel - scale*G_CC(pi)

CCProjector* CCProjector::crseProjPtr   const
 

void CCProjector::define const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_crseGridsPtr,
const ProblemDomain   a_domain,
const Real    a_dx,
CCProjector *    a_finerProj,
CCProjector *    a_crseProj,
int    a_nRefCrse,
int    a_level,
const PhysBCUtil   a_physBC
 

define function

void CCProjector::define const DisjointBoxLayout   a_grids,
const DisjointBoxLayout   a_crseGridsPtr,
const Box   a_domain,
const Real    a_dx,
CCProjector *    a_finerProj,
CCProjector *    a_crseProj,
int    a_nRefCrse,
int    a_level,
const PhysBCUtil   a_physBC
 

define function

void CCProjector::defineSolver AMRSolver   a_solver,
const Vector< LevelData< FArrayBox > * > &    a_vel,
bool    a_freestreamSolver
[protected]
 

void CCProjector::doInitialSyncOperations Vector< LevelData< FArrayBox > * > &    a_vel,
Vector< LevelData< FArrayBox > * > &    a_lambda,
const Real    a_newTime,
const Real    a_dtSync
 

bool CCProjector::doMacSync   const
 

do volume discrepancy correction?

void CCProjector::doPostRegridOps Vector< LevelData< FArrayBox > * > &    a_velocity,
Vector< LevelData< FArrayBox > * > &    a_lambda,
const Real    a_dt,
const Real    a_time
 

bool CCProjector::doQuadInterp   const
 

use quadratic interpolation (instead of extrap) for c/f bc

void CCProjector::doSyncOperations Vector< LevelData< FArrayBox > * > &    a_velocity,
Vector< LevelData< FArrayBox > * > &    a_lambda,
const Real    a_newTime,
const Real    a_dtSync
 

void CCProjector::doSyncProjection Vector< LevelData< FArrayBox > * > &    a_velocity,
const Real    a_newTime,
const Real    a_dtSync,
AMRSolver   solver
[protected]
 

bool CCProjector::doSyncProjection   const
 

do sync projection?

const ProblemDomain& CCProjector::dProblem   const
 

Real CCProjector::dx   const
 

const LevelData<FArrayBox>& CCProjector::eLambda   const
 

returns volume-discrepancy correction (const version)

LevelData<FArrayBox>& CCProjector::eLambda  
 

returns volume-discrepancy correction

const LevelData<FArrayBox>& CCProjector::eSync   const
 

returns synchronization correction (const version)

LevelData<FArrayBox>& CCProjector::eSync  
 

returns synchronization correction

Real CCProjector::etaLambda   const
 

returns coefficient for volume-discrepancy solve.

CCProjector* CCProjector::fineProjPtr   const
 

const DisjointBoxLayout& CCProjector::getBoxes   const
 

int CCProjector::getLevel   const
 

access functions

PhysBCUtil* CCProjector::getPhysBCPtr   const
 

const LevelData<FluxBox>& CCProjector::grad_eLambda   const
 

LevelData<FluxBox>& CCProjector::grad_eLambda  
 

void CCProjector::grad_eLambda LevelData< FArrayBox > &    a_grad_eLambda,
int    a_dir
const
 

returns edge-centered grad(eLambda) in direction dir

void CCProjector::grad_eSync LevelData< FArrayBox > &    a_grad_eSync const
 

returns cell-centered G^{comp}(eSync)

void CCProjector::grad_eSync LevelData< FArrayBox > &    a_grad_eSync,
int    a_dir
const
 

returns cell-centered grad(eSync) (composite gradient)

void CCProjector::gradPhi LevelData< FluxBox > &    a_gradPhi const
 

returns all components of grad(phi) (gradPhi should be correct size)

void CCProjector::gradPhi LevelData< FArrayBox > &    a_gradPhi,
int    a_dir
const
 

returns edge-centered grad(phi) in direction dir

void CCProjector::gradPi LevelData< FArrayBox > &    a_gradPi const
 

void CCProjector::gradPi LevelData< FArrayBox > &    a_gradPi,
int    a_dir
const
 

returns grad(pi) in direction dir

void CCProjector::init const CCProjector &    a_oldProj
 

initialize new projection with data from old projection

void CCProjector::initialLevelProject LevelData< FArrayBox > &    a_velocity,
LevelData< FArrayBox > *    a_crseVelPtr,
const Real    a_oldTime,
const Real    a_newTime
 

Initialization functions performs initial level projection -- phys and copy BC's should be preset

void CCProjector::initialSyncProjection Vector< LevelData< FArrayBox > * > &    a_velocity,
const Real    a_newTime,
const Real    a_dtSync,
AMRSolver   a_solver
[protected]
 

perform initial sync projection

void CCProjector::initialVelocityProject Vector< LevelData< FArrayBox > * > &    a_velocity,
AMRSolver   a_solver,
bool    a_homogeneousCFBC = true
 

void CCProjector::initialVelocityProject Vector< LevelData< FArrayBox > * > &    a_velocity,
bool    a_homogeneousCFBC = true
 

void CCProjector::isFinestLevel bool    a_finest_level
 

set whether this is the finest level

bool CCProjector::isFinestLevel   const
 

is this the finest level?

bool CCProjector::isInitialized   const
 

has this object been completely initialized?

void CCProjector::levelMacProject LevelData< FluxBox > &    uEdge,
Real    a_oldTime,
Real    a_dt
 

void CCProjector::LevelProject LevelData< FArrayBox > &    a_velocity,
LevelData< FArrayBox > *    a_crseVelPtr,
const Real    a_newTime,
const Real    a_dt
 

void CCProjector::limitSolverCoarsening bool    a_limitSolverCoarsening
 

set solver parameter

int CCProjector::nRefCrse   const
 

const LevelData<FArrayBox>& CCProjector::phi   const
 

const version of accessor

LevelData<FArrayBox>& CCProjector::phi  
 

returns MAC correction

LevelData<FArrayBox>& CCProjector::Pi  
 

returns level-projection pressure

void CCProjector::postRestart   [protected]
 

takes care of setting ghost cell values after restarting

QuadCFInterp& CCProjector::quadCFInterpolator  
 

returns predefined quadratic coarse-fine interpolation object

void CCProjector::readCheckpointHeader HDF5Handle &    a_handle
 

read the checkpoint header

void CCProjector::readCheckpointLevel HDF5Handle &    a_handle
 

read this class from a checkpoint file

void CCProjector::rescaleGrad_eLambda Real    a_dx_lbase [protected]
 

rescales composite gradient of eLambda, recursively all finer levels

rescales grad(eLambda) by (a_dx_lbase)/m_dx for this level and recursively calls this function for finer levels. This is done for stability reasons.

void CCProjector::setCrseProj CCProjector *    a_crseProj,
int    nRefCrse
 

void CCProjector::setFineProj CCProjector *    a_fineProj
 

void CCProjector::setPhysBC const PhysBCUtil   a_bc
 

sets physBCs

void CCProjector::variableSetUp  
 

define static parts

int CCProjector::verbosity   const
 

returns verbosity

void CCProjector::verbosity int    a_verbosity
 

set verbosity

void CCProjector::writeCheckpointHeader HDF5Handle &    a_handle const
 

write checkpoint header

void CCProjector::writeCheckpointLevel HDF5Handle &    a_handle const
 

write this class to a checkpoint file for later restart


The documentation for this class was generated from the following file:
Generated on Wed Jan 19 17:55:44 2005 for Chombo&INSwithParticles by doxygen1.2.16