Chombo + EB + MF  3.2
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
LevelFluxRegisterEdge Class Reference

LevelFluxRegisterEdge – Flux register for constrained-transport applications. More...

#include <LevelFluxRegisterEdge.H>

Public Member Functions

 LevelFluxRegisterEdge ()
 
 LevelFluxRegisterEdge (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const Box &a_dProblem, int a_nRefine, int a_nComp)
 
 LevelFluxRegisterEdge (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const ProblemDomain &a_dProblem, int a_nRefine, int a_nComp)
 
 ~LevelFluxRegisterEdge ()
 
void define (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const Box &a_dProblem, int a_nRefine, int a_nComp)
 
void define (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const ProblemDomain &a_dProblem, int a_nRefine, int a_nComp)
 
void undefine ()
 
void setToZero ()
 
void incrementCoarse (FArrayBox &a_coarseFlux, Real a_scale, const DataIndex &a_coarseDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval)
 
void incrementFine (FArrayBox &a_fineFlux, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval)
 
void incrementFine (FArrayBox &a_fineFlux, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir, Side::LoHiSide a_sd)
 
void refluxCurl (LevelData< FluxBox > &a_uCoarse, Real a_scale)
 
bool isDefined () const
 
void dump ()
 
void dumpLoCoar (int idir)
 
void dumpHiCoar (int idir)
 
void dumpLoFine (int idir)
 
void dumpHiFine (int idir)
 

Protected Member Functions

void setDefaultValues ()
 

Static Protected Member Functions

static int index (int dir, Side::LoHiSide side)
 
static int getRegComp (const int &faceDir, const int &edgeDir)
 

Protected Attributes

LevelData< EdgeDataBoxm_regCoarse
 
LevelData< FluxBoxm_fabFine [SpaceDim *2]
 
Vector< Copierm_crseCopiers
 
LayoutData< Vector< Vector< IntVectSet > > > m_refluxLocations [SpaceDim *2]
 
LayoutData< Vector< DataIndex > > m_coarToCoarMap [SpaceDim *2]
 
bool m_isDefined
 
int m_nComp
 number of components in register More...
 
int m_nRefine
 refinement ratio between levels More...
 
ProblemDomain m_domainCoarse
 domain at the coarse grid resolution More...
 

Private Member Functions

void operator= (const LevelFluxRegisterEdge &)
 there is no operator= for this class More...
 
 LevelFluxRegisterEdge (const LevelFluxRegisterEdge &)
 there is no copy constructor for this class More...
 

Detailed Description

LevelFluxRegisterEdge – Flux register for constrained-transport applications.

A LevelFluxRegisterEdge manages the coarse-fine fixup for a face-centered field which is defined as a curl of an edge-centered field, performing the "reflux-curl" operation described in Balsara(2001) to preserve the divergence-free magnetic field in the presence of coarse-fine interfaces.

This class performs a reflux-curl of edge-centered fluxes to correct a face-centered field. This is in contrast to the regular LevelFluxRegister class, which performs a reflux-divergence of face-centered fluxes to correct a cell-centered field.

Constructor & Destructor Documentation

◆ LevelFluxRegisterEdge() [1/4]

LevelFluxRegisterEdge::LevelFluxRegisterEdge ( )

Default constructor. Creates an uninitialized LevelFluxRegisterEdge.

◆ LevelFluxRegisterEdge() [2/4]

LevelFluxRegisterEdge::LevelFluxRegisterEdge ( const DisjointBoxLayout a_dbl,
const DisjointBoxLayout a_dblCoarse,
const Box a_dProblem,
int  a_nRefine,
int  a_nComp 
)

Full constructor. Calls the define function which creates a levels worth of flux registers.

◆ LevelFluxRegisterEdge() [3/4]

LevelFluxRegisterEdge::LevelFluxRegisterEdge ( const DisjointBoxLayout a_dbl,
const DisjointBoxLayout a_dblCoarse,
const ProblemDomain a_dProblem,
int  a_nRefine,
int  a_nComp 
)

Full constructor. Calls the define function which creates a levels worth of flux registers.

◆ ~LevelFluxRegisterEdge()

LevelFluxRegisterEdge::~LevelFluxRegisterEdge ( )

◆ LevelFluxRegisterEdge() [4/4]

LevelFluxRegisterEdge::LevelFluxRegisterEdge ( const LevelFluxRegisterEdge )
private

there is no copy constructor for this class

Member Function Documentation

◆ define() [1/2]

void LevelFluxRegisterEdge::define ( const DisjointBoxLayout a_dbl,
const DisjointBoxLayout a_dblCoarse,
const Box a_dProblem,
int  a_nRefine,
int  a_nComp 
)

Full define function. Creates a levels worth of flux registers. The values in the flux registers are still undefined, however. To zero the fluxregisters, you must call setToZero().

◆ define() [2/2]

void LevelFluxRegisterEdge::define ( const DisjointBoxLayout a_dbl,
const DisjointBoxLayout a_dblCoarse,
const ProblemDomain a_dProblem,
int  a_nRefine,
int  a_nComp 
)

Full define function. Creates a levels worth of flux registers. The values in the flux registers are still undefined, however. To zero the fluxregisters, you must call setToZero().

◆ undefine()

void LevelFluxRegisterEdge::undefine ( )

Modifies this LevelFluxRegisterEdge so that it is returned to the uninitialized state. User must now call the full define() before using it.

◆ setToZero()

void LevelFluxRegisterEdge::setToZero ( )

Initialize values of registers to zero.

◆ incrementCoarse()

void LevelFluxRegisterEdge::incrementCoarse ( FArrayBox a_coarseFlux,
Real  a_scale,
const DataIndex a_coarseDataIndex,
const Interval a_srcInterval,
const Interval a_dstInterval 
)

increments the register with data from coarseFlux, multiplied by scale. coarseFlux must contain the edge-centered (in 3d, node centered in 2d) coarse fluxes in the dir direction for the grid m_coarseLayout[coarseDataIndex]. By convention, only the low side flux is used to avoid double-counting at coarse-fine interfaces. This operation is local.

◆ incrementFine() [1/2]

void LevelFluxRegisterEdge::incrementFine ( FArrayBox a_fineFlux,
Real  a_scale,
const DataIndex a_fineDataIndex,
const Interval a_srcInterval,
const Interval a_dstInterval 
)

increments the register with data from fineFlux (which is edge-centered in 3d, node-centered in 2d), multiplied by scale, for all coarse-fine face directions associated with the grid box m_fineLayout[fineDataIndex] This operation is local.

◆ incrementFine() [2/2]

void LevelFluxRegisterEdge::incrementFine ( FArrayBox a_fineFlux,
Real  a_scale,
const DataIndex a_fineDataIndex,
const Interval a_srcInterval,
const Interval a_dstInterval,
int  a_dir,
Side::LoHiSide  a_sd 
)

increments the register with data from fineFlux (which is edge-centered in 3d, node-centered in 2d), multiplied by scale. a_dir is the normal of the coarse-fine interface, and a_sd determines whether we're looking at the high-side or the low-side for the grid box m_fineLayout[fineDataIndex] This operation is local.

◆ refluxCurl()

void LevelFluxRegisterEdge::refluxCurl ( LevelData< FluxBox > &  a_uCoarse,
Real  a_scale 
)

increments uCoarse with the reflux "CURL" of the contents of the flux register. Note that there is no srccomp etc here. this is done for all components so uCoarse has to have the same number of components as input nComp. This operation is global and blocking.

◆ isDefined()

bool LevelFluxRegisterEdge::isDefined ( ) const

has full define function been called? return true if so.

◆ dump()

void LevelFluxRegisterEdge::dump ( )

◆ dumpLoCoar()

void LevelFluxRegisterEdge::dumpLoCoar ( int  idir)

◆ dumpHiCoar()

void LevelFluxRegisterEdge::dumpHiCoar ( int  idir)

◆ dumpLoFine()

void LevelFluxRegisterEdge::dumpLoFine ( int  idir)

◆ dumpHiFine()

void LevelFluxRegisterEdge::dumpHiFine ( int  idir)

◆ index()

static int LevelFluxRegisterEdge::index ( int  dir,
Side::LoHiSide  side 
)
staticprotected

◆ getRegComp()

static int LevelFluxRegisterEdge::getRegComp ( const int &  faceDir,
const int &  edgeDir 
)
staticprotected

◆ setDefaultValues()

void LevelFluxRegisterEdge::setDefaultValues ( )
protected

◆ operator=()

void LevelFluxRegisterEdge::operator= ( const LevelFluxRegisterEdge )
private

there is no operator= for this class

Member Data Documentation

◆ m_regCoarse

LevelData<EdgeDataBox> LevelFluxRegisterEdge::m_regCoarse
protected

◆ m_fabFine

LevelData<FluxBox> LevelFluxRegisterEdge::m_fabFine[SpaceDim *2]
protected

◆ m_crseCopiers

Vector<Copier> LevelFluxRegisterEdge::m_crseCopiers
protected

◆ m_refluxLocations

LayoutData<Vector<Vector<IntVectSet> > > LevelFluxRegisterEdge::m_refluxLocations[SpaceDim *2]
protected

: reflux locations – need SpaceDim of these to account for the different face directions, which explains the extra Vector

◆ m_coarToCoarMap

LayoutData<Vector<DataIndex> > LevelFluxRegisterEdge::m_coarToCoarMap[SpaceDim *2]
protected

◆ m_isDefined

bool LevelFluxRegisterEdge::m_isDefined
protected

◆ m_nComp

int LevelFluxRegisterEdge::m_nComp
protected

number of components in register

◆ m_nRefine

int LevelFluxRegisterEdge::m_nRefine
protected

refinement ratio between levels

◆ m_domainCoarse

ProblemDomain LevelFluxRegisterEdge::m_domainCoarse
protected

domain at the coarse grid resolution


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