Chombo + EB  3.0
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
EBLevelAdvect Class Reference

#include <EBLevelAdvect.H>

Public Member Functions

 EBLevelAdvect ()
 Default constructor. More...
 
 ~EBLevelAdvect ()
 Destructor. More...
 
 EBLevelAdvect (const DisjointBoxLayout &a_thisDBL, const DisjointBoxLayout &a_coarDBL, const EBISLayout &a_thisEBISL, const EBISLayout &a_coarEBISL, const ProblemDomain &a_DProblem, const int &a_nRefine, const RealVect &a_dx, const bool &a_hasCoarser, const bool &a_hasFiner, const EBPatchGodunovFactory *const a_patchGodunov, const EBIndexSpace *const a_eb=Chombo_EBIS::instance())
 
void define (const DisjointBoxLayout &a_thisDBL, const DisjointBoxLayout &a_coarDBL, const EBISLayout &a_thisEBISL, const EBISLayout &a_coarEBISL, const ProblemDomain &a_DProblem, const int &a_nRefine, const RealVect &a_dx, const bool &a_hasCoarser, const bool &a_hasFiner, const EBPatchGodunovFactory *const a_patchGodunov, const EBIndexSpace *const a_eb=Chombo_EBIS::instance())
 Actual constructor. More...
 
void advectToFacesCol (LevelData< EBFluxFAB > &a_extrapState, LayoutData< Vector< BaseIVFAB< Real > * > > &a_coveredPrimLo, LayoutData< Vector< BaseIVFAB< Real > * > > &a_coveredPrimHi, const LayoutData< Vector< Vector< VolIndex > > > &a_coveredFaceLo, const LayoutData< Vector< Vector< VolIndex > > > &a_coveredFaceHi, const LayoutData< Vector< IntVectSet > > &a_coveredSetsLo, const LayoutData< Vector< IntVectSet > > &a_coveredSetsHi, const LevelData< EBCellFAB > &a_consState, const LevelData< EBCellFAB > &a_normalVel, const LevelData< EBFluxFAB > &a_advectionVel, const LevelData< EBCellFAB > *a_consStateCoarseOld, const LevelData< EBCellFAB > *a_consStateCoarseNew, const LevelData< EBCellFAB > *a_normalVelCoarseOld, const LevelData< EBCellFAB > *a_normalVelCoarseNew, const Real &a_timeCoarseOld, const Real &a_timeCoarseNew, const Real &a_timeFine, const Real &a_dt, const LevelData< EBCellFAB > *const a_source=NULL, const LevelData< EBCellFAB > *const a_sourceCoarOld=NULL, const LevelData< EBCellFAB > *const a_sourceCoarNew=NULL)
 
void advectToFaces (EBFluxFAB &a_extrapState, BaseIVFAB< Real > &a_boundaryPrim, Vector< BaseIVFAB< Real > * > &a_coveredPrimLo, Vector< BaseIVFAB< Real > * > &a_coveredPrimHi, const Vector< Vector< VolIndex > > &a_coveredFaceLo, const Vector< Vector< VolIndex > > &a_coveredFaceHi, const Vector< IntVectSet > &a_coveredSetsLo, const Vector< IntVectSet > &a_coveredSetsHi, const EBCellFAB &a_consState, const EBCellFAB &a_normalVel, const EBFluxFAB &a_advectionVel, const Box &a_cellBox, const EBISBox &a_ebisBox, const Real &a_dt, const Real &a_time, const EBCellFAB &a_source, const DataIndex &a_dit, bool a_doBoundaryPrim)
 
void advectToFacesBCG (LevelData< EBFluxFAB > &a_extrapState, const LevelData< EBCellFAB > &a_consState, const LevelData< EBCellFAB > &a_normalVel, const LevelData< EBFluxFAB > &a_advectionVel, const LevelData< EBCellFAB > *a_consStateCoarseOld, const LevelData< EBCellFAB > *a_consStateCoarseNew, const LevelData< EBCellFAB > *a_normalVelCoarseOld, const LevelData< EBCellFAB > *a_normalVelCoarseNew, const Real &a_timeCoarseOld, const Real &a_timeCoarseNew, const Real &a_timeFine, const Real &a_dt, const LevelData< EBCellFAB > *const a_source=NULL, const LevelData< EBCellFAB > *const a_sourceCoarOld=NULL, const LevelData< EBCellFAB > *const a_sourceCoarNew=NULL)
 
void advectToFacesBCG (EBFluxFAB &a_extrapState, BaseIVFAB< Real > &a_boundaryPrim, const EBCellFAB &a_consState, const EBCellFAB &a_normalVel, const EBFluxFAB &a_advectionVel, const Box &a_cellBox, const EBISBox &a_ebisBox, const Real &a_dt, const Real &a_time, const EBCellFAB &a_source, const DataIndex &a_dit, bool a_doBoundaryPrim)
 
void computeNormalVel (LevelData< EBCellFAB > &a_normalVel, const LevelData< EBFluxFAB > &a_advectionVel, const LayoutData< Vector< BaseIVFAB< Real > * > > &a_coveredVeloLo, const LayoutData< Vector< BaseIVFAB< Real > * > > &a_coveredVeloHi, const LayoutData< Vector< Vector< VolIndex > > > &a_coveredFaceLo, const LayoutData< Vector< Vector< VolIndex > > > &a_coveredFaceHi) const
 
bool isDefined () const
 
EBPatchAdvectgetPatchAdvect (const DataIndex &a_dit)
 
void resetBCs (const RefCountedPtr< EBPhysIBCFactory > &a_advectBC)
 

Protected Attributes

bool m_hasCoarser
 
bool m_hasFiner
 
bool m_isDefined
 
RealVect m_dx
 
int m_refRatCrse
 
int m_nVar
 
int m_nGhost
 
DisjointBoxLayout m_thisGrids
 
DisjointBoxLayout m_coarGrids
 
EBISLayout m_thisEBISL
 
EBISLayout m_coarEBISL
 
EBPWLFillPatch m_fillPatch
 
EBPWLFillPatch m_fillPatchVel
 
ProblemDomain m_domain
 
LayoutData< EBPatchAdvect * > m_ebPatchAdvect
 

Private Member Functions

void operator= (const EBLevelAdvect &a_input)
 
 EBLevelAdvect (const EBLevelAdvect &a_input)
 

Detailed Description

Advection and diffusion on a level using

Constructor & Destructor Documentation

◆ EBLevelAdvect() [1/3]

EBLevelAdvect::EBLevelAdvect ( )

Default constructor.

Object requires define(..) to be called before all other functions.

◆ ~EBLevelAdvect()

EBLevelAdvect::~EBLevelAdvect ( )

Destructor.

destroys all objects created by define(..). Passed in data references of define(..) are left alone.

◆ EBLevelAdvect() [2/3]

EBLevelAdvect::EBLevelAdvect ( const DisjointBoxLayout a_thisDBL,
const DisjointBoxLayout a_coarDBL,
const EBISLayout a_thisEBISL,
const EBISLayout a_coarEBISL,
const ProblemDomain a_DProblem,
const int &  a_nRefine,
const RealVect a_dx,
const bool &  a_hasCoarser,
const bool &  a_hasFiner,
const EBPatchGodunovFactory *const  a_patchGodunov,
const EBIndexSpace *const  a_eb = Chombo_EBIS::instance() 
)

◆ EBLevelAdvect() [3/3]

EBLevelAdvect::EBLevelAdvect ( const EBLevelAdvect a_input)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ define()

void EBLevelAdvect::define ( const DisjointBoxLayout a_thisDBL,
const DisjointBoxLayout a_coarDBL,
const EBISLayout a_thisEBISL,
const EBISLayout a_coarEBISL,
const ProblemDomain a_DProblem,
const int &  a_nRefine,
const RealVect a_dx,
const bool &  a_hasCoarser,
const bool &  a_hasFiner,
const EBPatchGodunovFactory *const  a_patchGodunov,
const EBIndexSpace *const  a_eb = Chombo_EBIS::instance() 
)

Actual constructor.

For the coarsest level, an empty DisjointBoxLayout is passed in for coaserDisjointBoxLayout. Inside the routine, we cast away const-ness on the data members for the assignment. The arguments passed in are maintained const. (coding standards). a_nRefine is the refinement ratio between this level and the next coarser level. a_numGhosts is the number of ghost cells in each direction.

◆ advectToFacesCol()

void EBLevelAdvect::advectToFacesCol ( LevelData< EBFluxFAB > &  a_extrapState,
LayoutData< Vector< BaseIVFAB< Real > * > > &  a_coveredPrimLo,
LayoutData< Vector< BaseIVFAB< Real > * > > &  a_coveredPrimHi,
const LayoutData< Vector< Vector< VolIndex > > > &  a_coveredFaceLo,
const LayoutData< Vector< Vector< VolIndex > > > &  a_coveredFaceHi,
const LayoutData< Vector< IntVectSet > > &  a_coveredSetsLo,
const LayoutData< Vector< IntVectSet > > &  a_coveredSetsHi,
const LevelData< EBCellFAB > &  a_consState,
const LevelData< EBCellFAB > &  a_normalVel,
const LevelData< EBFluxFAB > &  a_advectionVel,
const LevelData< EBCellFAB > *  a_consStateCoarseOld,
const LevelData< EBCellFAB > *  a_consStateCoarseNew,
const LevelData< EBCellFAB > *  a_normalVelCoarseOld,
const LevelData< EBCellFAB > *  a_normalVelCoarseNew,
const Real a_timeCoarseOld,
const Real a_timeCoarseNew,
const Real a_timeFine,
const Real a_dt,
const LevelData< EBCellFAB > *const  a_source = NULL,
const LevelData< EBCellFAB > *const  a_sourceCoarOld = NULL,
const LevelData< EBCellFAB > *const  a_sourceCoarNew = NULL 
)
  1. Average advection velocity to cell centers to get unorm.
  2. Do linear C/F interpolation on a_cellState and compute the diffusion source term if necessary. Quadratic is unnecessary because the laplacian does its own CF interpolation in the viscous case.
  3. Do linear C/F interpolation in space and time
  4. Extrapolate cellState to to faces using patchgodunov->extrapolatePrim

Notes: The advection velocity that is sent in is not used. It will be taken out in later designs

◆ advectToFaces()

void EBLevelAdvect::advectToFaces ( EBFluxFAB a_extrapState,
BaseIVFAB< Real > &  a_boundaryPrim,
Vector< BaseIVFAB< Real > * > &  a_coveredPrimLo,
Vector< BaseIVFAB< Real > * > &  a_coveredPrimHi,
const Vector< Vector< VolIndex > > &  a_coveredFaceLo,
const Vector< Vector< VolIndex > > &  a_coveredFaceHi,
const Vector< IntVectSet > &  a_coveredSetsLo,
const Vector< IntVectSet > &  a_coveredSetsHi,
const EBCellFAB a_consState,
const EBCellFAB a_normalVel,
const EBFluxFAB a_advectionVel,
const Box a_cellBox,
const EBISBox a_ebisBox,
const Real a_dt,
const Real a_time,
const EBCellFAB a_source,
const DataIndex a_dit,
bool  a_doBoundaryPrim 
)

◆ advectToFacesBCG() [1/2]

void EBLevelAdvect::advectToFacesBCG ( LevelData< EBFluxFAB > &  a_extrapState,
const LevelData< EBCellFAB > &  a_consState,
const LevelData< EBCellFAB > &  a_normalVel,
const LevelData< EBFluxFAB > &  a_advectionVel,
const LevelData< EBCellFAB > *  a_consStateCoarseOld,
const LevelData< EBCellFAB > *  a_consStateCoarseNew,
const LevelData< EBCellFAB > *  a_normalVelCoarseOld,
const LevelData< EBCellFAB > *  a_normalVelCoarseNew,
const Real a_timeCoarseOld,
const Real a_timeCoarseNew,
const Real a_timeFine,
const Real a_dt,
const LevelData< EBCellFAB > *const  a_source = NULL,
const LevelData< EBCellFAB > *const  a_sourceCoarOld = NULL,
const LevelData< EBCellFAB > *const  a_sourceCoarNew = NULL 
)

◆ advectToFacesBCG() [2/2]

void EBLevelAdvect::advectToFacesBCG ( EBFluxFAB a_extrapState,
BaseIVFAB< Real > &  a_boundaryPrim,
const EBCellFAB a_consState,
const EBCellFAB a_normalVel,
const EBFluxFAB a_advectionVel,
const Box a_cellBox,
const EBISBox a_ebisBox,
const Real a_dt,
const Real a_time,
const EBCellFAB a_source,
const DataIndex a_dit,
bool  a_doBoundaryPrim 
)

◆ computeNormalVel()

void EBLevelAdvect::computeNormalVel ( LevelData< EBCellFAB > &  a_normalVel,
const LevelData< EBFluxFAB > &  a_advectionVel,
const LayoutData< Vector< BaseIVFAB< Real > * > > &  a_coveredVeloLo,
const LayoutData< Vector< BaseIVFAB< Real > * > > &  a_coveredVeloHi,
const LayoutData< Vector< Vector< VolIndex > > > &  a_coveredFaceLo,
const LayoutData< Vector< Vector< VolIndex > > > &  a_coveredFaceHi 
) const

◆ isDefined()

bool EBLevelAdvect::isDefined ( ) const

◆ getPatchAdvect()

EBPatchAdvect& EBLevelAdvect::getPatchAdvect ( const DataIndex a_dit)
inline

References m_ebPatchAdvect, and resetBCs().

◆ resetBCs()

void EBLevelAdvect::resetBCs ( const RefCountedPtr< EBPhysIBCFactory > &  a_advectBC)

Referenced by getPatchAdvect().

◆ operator=()

void EBLevelAdvect::operator= ( const EBLevelAdvect a_input)
inlineprivate

References MayDay::Error().

Member Data Documentation

◆ m_hasCoarser

bool EBLevelAdvect::m_hasCoarser
protected

◆ m_hasFiner

bool EBLevelAdvect::m_hasFiner
protected

◆ m_isDefined

bool EBLevelAdvect::m_isDefined
protected

◆ m_dx

RealVect EBLevelAdvect::m_dx
protected

◆ m_refRatCrse

int EBLevelAdvect::m_refRatCrse
protected

◆ m_nVar

int EBLevelAdvect::m_nVar
protected

◆ m_nGhost

int EBLevelAdvect::m_nGhost
protected

◆ m_thisGrids

DisjointBoxLayout EBLevelAdvect::m_thisGrids
protected

◆ m_coarGrids

DisjointBoxLayout EBLevelAdvect::m_coarGrids
protected

◆ m_thisEBISL

EBISLayout EBLevelAdvect::m_thisEBISL
protected

◆ m_coarEBISL

EBISLayout EBLevelAdvect::m_coarEBISL
protected

◆ m_fillPatch

EBPWLFillPatch EBLevelAdvect::m_fillPatch
protected

◆ m_fillPatchVel

EBPWLFillPatch EBLevelAdvect::m_fillPatchVel
protected

◆ m_domain

ProblemDomain EBLevelAdvect::m_domain
protected

◆ m_ebPatchAdvect

LayoutData<EBPatchAdvect*> EBLevelAdvect::m_ebPatchAdvect
protected

Referenced by getPatchAdvect().


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