LevelFluxRegisterEdge Class Reference

#include <LevelFluxRegisterEdge.H>

List of all members.


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.

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
int m_nRefine
 refinement ratio between levels
ProblemDomain m_domainCoarse
 domain at the coarse grid resolution

Private Member Functions

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


Constructor & Destructor Documentation

LevelFluxRegisterEdge::LevelFluxRegisterEdge (  ) 

Default constructor. Creates an uninitialized LevelFluxRegisterEdge.

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::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 ( const LevelFluxRegisterEdge  )  [private]

there is no copy constructor for this class


Member Function Documentation

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().

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().

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.

void LevelFluxRegisterEdge::setToZero (  ) 

Initialize values of registers to zero.

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.

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.

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.

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.

bool LevelFluxRegisterEdge::isDefined (  )  const

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

void LevelFluxRegisterEdge::dump (  ) 

void LevelFluxRegisterEdge::dumpLoCoar ( int  idir  ) 

void LevelFluxRegisterEdge::dumpHiCoar ( int  idir  ) 

void LevelFluxRegisterEdge::dumpLoFine ( int  idir  ) 

void LevelFluxRegisterEdge::dumpHiFine ( int  idir  ) 

static int LevelFluxRegisterEdge::index ( int  dir,
Side::LoHiSide  side 
) [static, protected]

static int LevelFluxRegisterEdge::getRegComp ( const int &  faceDir,
const int &  edgeDir 
) [static, protected]

void LevelFluxRegisterEdge::setDefaultValues (  )  [protected]

void LevelFluxRegisterEdge::operator= ( const LevelFluxRegisterEdge  )  [private]

there is no operator= for this class


Member Data Documentation

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

number of components in register

refinement ratio between levels

domain at the coarse grid resolution


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

Generated on Fri Apr 5 04:25:09 2019 for Chombo + EB by  doxygen 1.5.5