Chombo + EB + MF  3.2
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
FourthOrderCoordSys Class Referenceabstract

Virtual base class encapsulating fourth-order CoordSys. More...

#include <FourthOrderCoordSys.H>

Inheritance diagram for FourthOrderCoordSys:
Inheritance graph
[legend]

Public Member Functions

 FourthOrderCoordSys ()
 default constructor More...
 
virtual ~FourthOrderCoordSys ()
 
virtual void define (const DisjointBoxLayout &a_grids, const ProblemDomain &a_domain, const RealVect &a_cellSpacing, const IntVect &a_ghostVect)
 this define should probably be called from the derived-class define More...
 
virtual void regrid (const DisjointBoxLayout &a_newGrids)=0
 
virtual RealVect realCoord (const RealVect &a_Xi) const =0
 given coordinate in mapped space, return its location in real space More...
 
virtual RealVect mappedCoord (const RealVect &a_x) const =0
 given coordinate in real space, return its location in the mapped space More...
 
virtual void realCoord (FArrayBox &a_x, const FArrayBox &a_Xi) const
 given coordinates in mapped space, return locations in real space More...
 
virtual void mappedCoord (FArrayBox &a_Xi, const FArrayBox &a_x) const
 given coordinate in real space, return its location in the mapped space More...
 
virtual Real pointwiseJ (const RealVect &a_X) const
 Jacobian evaluated at location X in real space. More...
 
virtual void pointwiseJ (FArrayBox &a_J) const
 Jacobian evaluated at index locations of a_J. More...
 
virtual void pointwiseJ (FArrayBox &a_J, const FArrayBox &a_Xi) const
 Jacobian evaluated at locations Xi in mapped space. More...
 
virtual void mappedGridDivergence (LevelData< FArrayBox > &a_divF, const LevelData< FluxBox > &a_F) const
 returns integral of divergence over mapped-grid cells More...
 
virtual void simpleDivergence (LevelData< FArrayBox > &a_divF, const LevelData< FluxBox > &a_F) const
 
virtual void setQuadrature (const EdgeQuadrature *a_quadrature)
 
virtual const LevelData< FluxBox > & getFaceMetricTerms () const
 reuturns reference to face-averaged N More...
 
virtual const LevelData< FluxBox > & getTanGranNTerms () const
 returns reference to tangential gradients of N More...
 
virtual int tanGradComp (const int a_faceDir, const int a_tanDir, const int a_comp) const
 
virtual const LevelData< FArrayBox > & getCellVolumes () const
 
virtual const LevelData< FArrayBox > & getJ () const
 returns fourth-order averaged cell-centered J More...
 
virtual const LevelData< FluxBox > & getJInverse () const
 returns fourth-order averaged face-centered 1/J More...
 
virtual const LevelData< FluxBox > & getNJinverse () const
 returns fourth-order averaged face-centered N/J More...
 
virtual void computeTangentialGrad (LevelData< FluxBox > &a_gradPhi, const LevelData< FluxBox > &a_phiFace) const
 
virtual void computeProductAverage (LevelData< FluxBox > &a_product, const LevelData< FluxBox > &a_F, const LevelData< FluxBox > &a_G, bool a_fourthOrder=true) const
 helper function More...
 
virtual void computeMetricTermProductAverage (LevelData< FluxBox > &a_product, const LevelData< FluxBox > &a_F, bool a_fourthOrder=true) const
 computes 4th-order average of product = N^T*F More...
 
virtual Real dXdXi (const RealVect &a_X, int a_dirX, int a_dirXi) const =0
 note that a_X is in real (not mapped) space. More...
 
virtual void dXdXi (FArrayBox &a_dxdXi, const FArrayBox &a_X, int a_destComp, int a_dirX, int a_dirXi) const
 note that a_X is in real (not mapped) space. More...
 
const RealVectdx () const
 access function to simplify things – returns mapped-space cell spacing More...
 
const ProblemDomaindomain () const
 access function, returns mapped-space problem domain More...
 
const DisjointBoxLayoutgrids () const
 access function – returns const reference to grids More...
 
const IntVectghostVect () const
 access function – returns const reference to number of ghost cells More...
 
- Public Member Functions inherited from CoordSys< FArrayBox, FluxBox >
 CoordSys ()
 default constructor More...
 
virtual ~CoordSys ()
 

Static Public Member Functions

static int getMetricTermComponent (const int a_row, const int a_col)
 index function into face-centered metric terms More...
 

Public Attributes

Interval m_volInterval
 which component directions to use when computing cell volumes More...
 

Protected Member Functions

virtual Real getN (const RealVect &a_X, int a_s, int a_d, int a_d1) const
 note that a_X is in real (not mapped) space. More...
 
virtual Real getNMatrixEntry (const RealVect &a_X, int a_s, int a_d, int a_d1, int a_row, int a_column) const
 note that a_X is in real (not mapped) space. More...
 
virtual void defineFaceMetricTerms (LevelData< FluxBox > &a_faceMetricTerms)
 
virtual void incrementFaceMetricWithEdgeTerm (FArrayBox &a_faceMetrics, int a_faceDir, int a_edgeDir, const Side::LoHiSide &a_side)
 
virtual void computeTransverseFaceMetric (FArrayBox &a_faceMetrics, int a_faceDir, int a_dDir)
 
virtual void computeCellVolumes (LevelData< FArrayBox > &a_cellVolumes)
 
virtual void computeJ (LevelData< FArrayBox > &a_J)
 
virtual void computeJinverse (LevelData< FluxBox > &a_Jinverse)
 
virtual void computeNJinverse (LevelData< FluxBox > &a_NJinverse)
 

Protected Attributes

DisjointBoxLayout m_grids
 
RealVect m_dx
 
ProblemDomain m_domain
 
IntVect m_ghostVect
 
LevelData< FluxBoxm_faceMetricTerms
 
LevelData< FluxBoxm_tanGradNTerms
 
LevelData< FArrayBoxm_cellVolumes
 
LevelData< FArrayBoxm_J
 
LevelData< FluxBoxm_JInverse
 
LevelData< FluxBoxm_NinverseJ
 
EdgeQuadraturem_quadraturePtr
 

Detailed Description

Virtual base class encapsulating fourth-order CoordSys.

The FourthOrderCoordSys class extends the CoordSys base class by providing API elements and implementation details specific to fourth-order discretizaitions. Implementations of specific coordinate systems will be provided by derived classes.

Constructor & Destructor Documentation

◆ FourthOrderCoordSys()

FourthOrderCoordSys::FourthOrderCoordSys ( )

default constructor

◆ ~FourthOrderCoordSys()

virtual FourthOrderCoordSys::~FourthOrderCoordSys ( )
virtual

Destructor.

Member Function Documentation

◆ define()

virtual void FourthOrderCoordSys::define ( const DisjointBoxLayout a_grids,
const ProblemDomain a_domain,
const RealVect a_cellSpacing,
const IntVect a_ghostVect 
)
virtual

this define should probably be called from the derived-class define

Implements CoordSys< FArrayBox, FluxBox >.

Reimplemented in CartesianCoordSys.

◆ regrid()

virtual void FourthOrderCoordSys::regrid ( const DisjointBoxLayout a_newGrids)
pure virtual

◆ realCoord() [1/2]

virtual RealVect FourthOrderCoordSys::realCoord ( const RealVect a_X) const
pure virtual

given coordinate in mapped space, return its location in real space

Implements CoordSys< FArrayBox, FluxBox >.

Implemented in CartesianCoordSys.

◆ mappedCoord() [1/2]

virtual RealVect FourthOrderCoordSys::mappedCoord ( const RealVect a_x) const
pure virtual

given coordinate in real space, return its location in the mapped space

Implements CoordSys< FArrayBox, FluxBox >.

Implemented in CartesianCoordSys.

◆ realCoord() [2/2]

virtual void FourthOrderCoordSys::realCoord ( FArrayBox a_x,
const FArrayBox a_X 
) const
virtual

given coordinates in mapped space, return locations in real space

Implements CoordSys< FArrayBox, FluxBox >.

◆ mappedCoord() [2/2]

virtual void FourthOrderCoordSys::mappedCoord ( FArrayBox a_X,
const FArrayBox a_x 
) const
virtual

given coordinate in real space, return its location in the mapped space

Implements CoordSys< FArrayBox, FluxBox >.

◆ pointwiseJ() [1/3]

virtual Real FourthOrderCoordSys::pointwiseJ ( const RealVect a_X) const
virtual

Jacobian evaluated at location X in real space.

Implements CoordSys< FArrayBox, FluxBox >.

Reimplemented in CartesianCoordSys.

◆ pointwiseJ() [2/3]

virtual void FourthOrderCoordSys::pointwiseJ ( FArrayBox a_J) const
virtual

Jacobian evaluated at index locations of a_J.

◆ pointwiseJ() [3/3]

virtual void FourthOrderCoordSys::pointwiseJ ( FArrayBox a_J,
const FArrayBox a_Xi 
) const
virtual

Jacobian evaluated at locations Xi in mapped space.

Implements CoordSys< FArrayBox, FluxBox >.

◆ mappedGridDivergence()

virtual void FourthOrderCoordSys::mappedGridDivergence ( LevelData< FArrayBox > &  a_divF,
const LevelData< FluxBox > &  a_F 
) const
virtual

returns integral of divergence over mapped-grid cells

Implements CoordSys< FArrayBox, FluxBox >.

Reimplemented in CartesianCoordSys.

◆ simpleDivergence()

virtual void FourthOrderCoordSys::simpleDivergence ( LevelData< FArrayBox > &  a_divF,
const LevelData< FluxBox > &  a_F 
) const
virtual

◆ setQuadrature()

virtual void FourthOrderCoordSys::setQuadrature ( const EdgeQuadrature a_quadrature)
virtual

◆ getFaceMetricTerms()

virtual const LevelData<FluxBox>& FourthOrderCoordSys::getFaceMetricTerms ( ) const
virtual

reuturns reference to face-averaged N

Implements CoordSys< FArrayBox, FluxBox >.

◆ getTanGranNTerms()

virtual const LevelData<FluxBox>& FourthOrderCoordSys::getTanGranNTerms ( ) const
inlinevirtual

◆ tanGradComp()

virtual int FourthOrderCoordSys::tanGradComp ( const int  a_faceDir,
const int  a_tanDir,
const int  a_comp 
) const
virtual

Referenced by getTanGranNTerms().

◆ getCellVolumes()

virtual const LevelData<FArrayBox>& FourthOrderCoordSys::getCellVolumes ( ) const
virtual

◆ getJ()

virtual const LevelData<FArrayBox>& FourthOrderCoordSys::getJ ( ) const
virtual

returns fourth-order averaged cell-centered J

Implements CoordSys< FArrayBox, FluxBox >.

Referenced by getTanGranNTerms().

◆ getJInverse()

virtual const LevelData<FluxBox>& FourthOrderCoordSys::getJInverse ( ) const
virtual

returns fourth-order averaged face-centered 1/J

Implements CoordSys< FArrayBox, FluxBox >.

Referenced by getTanGranNTerms().

◆ getNJinverse()

virtual const LevelData<FluxBox>& FourthOrderCoordSys::getNJinverse ( ) const
virtual

returns fourth-order averaged face-centered N/J

Implements CoordSys< FArrayBox, FluxBox >.

Referenced by getTanGranNTerms().

◆ computeTangentialGrad()

virtual void FourthOrderCoordSys::computeTangentialGrad ( LevelData< FluxBox > &  a_gradPhi,
const LevelData< FluxBox > &  a_phiFace 
) const
virtual

Referenced by getTanGranNTerms().

◆ computeProductAverage()

virtual void FourthOrderCoordSys::computeProductAverage ( LevelData< FluxBox > &  a_product,
const LevelData< FluxBox > &  a_F,
const LevelData< FluxBox > &  a_G,
bool  a_fourthOrder = true 
) const
virtual

helper function

given face-centered phi, increment with Laplacian(phi) correction in place to compute 4th-order face averages of phicomputes 4th-order average of product = F*G

Referenced by getTanGranNTerms().

◆ computeMetricTermProductAverage()

virtual void FourthOrderCoordSys::computeMetricTermProductAverage ( LevelData< FluxBox > &  a_product,
const LevelData< FluxBox > &  a_F,
bool  a_fourthOrder = true 
) const
virtual

computes 4th-order average of product = N^T*F

if a_fourthOrder is false, then only do a second-order dot product

Referenced by getTanGranNTerms().

◆ getMetricTermComponent()

static int FourthOrderCoordSys::getMetricTermComponent ( const int  a_row,
const int  a_col 
)
inlinestatic

index function into face-centered metric terms

returns which component of the face-centered metric term in which N^row_col is stored

References dXdXi(), and SpaceDim.

◆ dXdXi() [1/2]

virtual Real FourthOrderCoordSys::dXdXi ( const RealVect a_X,
int  a_dirX,
int  a_dirXi 
) const
pure virtual

note that a_X is in real (not mapped) space.

Implemented in CartesianCoordSys.

Referenced by getMetricTermComponent().

◆ dXdXi() [2/2]

virtual void FourthOrderCoordSys::dXdXi ( FArrayBox a_dxdXi,
const FArrayBox a_X,
int  a_destComp,
int  a_dirX,
int  a_dirXi 
) const
virtual

note that a_X is in real (not mapped) space.

fills the destComp component of a_dxdXi with the derivative of x w/ respect to Xi in the dirX direction Note that the default implementation of this in FourthOrderCoordSys class throws an error, since there is no way to get real=space coordinate x from index location except in the derived class.. (default implementation is there in case derived class doesn't provide it)

◆ dx()

const RealVect& FourthOrderCoordSys::dx ( ) const
inline

access function to simplify things – returns mapped-space cell spacing

References m_dx.

◆ domain()

const ProblemDomain& FourthOrderCoordSys::domain ( ) const
inline

access function, returns mapped-space problem domain

References m_domain.

◆ grids()

const DisjointBoxLayout& FourthOrderCoordSys::grids ( ) const
inline

access function – returns const reference to grids

References m_grids.

◆ ghostVect()

const IntVect& FourthOrderCoordSys::ghostVect ( ) const
inline

access function – returns const reference to number of ghost cells

References m_ghostVect.

◆ getN()

virtual Real FourthOrderCoordSys::getN ( const RealVect a_X,
int  a_s,
int  a_d,
int  a_d1 
) const
protectedvirtual

note that a_X is in real (not mapped) space.

◆ getNMatrixEntry()

virtual Real FourthOrderCoordSys::getNMatrixEntry ( const RealVect a_X,
int  a_s,
int  a_d,
int  a_d1,
int  a_row,
int  a_column 
) const
protectedvirtual

note that a_X is in real (not mapped) space.

◆ defineFaceMetricTerms()

virtual void FourthOrderCoordSys::defineFaceMetricTerms ( LevelData< FluxBox > &  a_faceMetricTerms)
protectedvirtual

◆ incrementFaceMetricWithEdgeTerm()

virtual void FourthOrderCoordSys::incrementFaceMetricWithEdgeTerm ( FArrayBox a_faceMetrics,
int  a_faceDir,
int  a_edgeDir,
const Side::LoHiSide a_side 
)
protectedvirtual

◆ computeTransverseFaceMetric()

virtual void FourthOrderCoordSys::computeTransverseFaceMetric ( FArrayBox a_faceMetrics,
int  a_faceDir,
int  a_dDir 
)
protectedvirtual

◆ computeCellVolumes()

virtual void FourthOrderCoordSys::computeCellVolumes ( LevelData< FArrayBox > &  a_cellVolumes)
protectedvirtual

◆ computeJ()

virtual void FourthOrderCoordSys::computeJ ( LevelData< FArrayBox > &  a_J)
protectedvirtual

◆ computeJinverse()

virtual void FourthOrderCoordSys::computeJinverse ( LevelData< FluxBox > &  a_Jinverse)
protectedvirtual

◆ computeNJinverse()

virtual void FourthOrderCoordSys::computeNJinverse ( LevelData< FluxBox > &  a_NJinverse)
protectedvirtual

Member Data Documentation

◆ m_volInterval

Interval FourthOrderCoordSys::m_volInterval

which component directions to use when computing cell volumes

◆ m_grids

DisjointBoxLayout FourthOrderCoordSys::m_grids
protected

Referenced by grids().

◆ m_dx

RealVect FourthOrderCoordSys::m_dx
protected

Referenced by dx().

◆ m_domain

ProblemDomain FourthOrderCoordSys::m_domain
protected

Referenced by domain().

◆ m_ghostVect

IntVect FourthOrderCoordSys::m_ghostVect
protected

Referenced by ghostVect().

◆ m_faceMetricTerms

LevelData<FluxBox> FourthOrderCoordSys::m_faceMetricTerms
protected

◆ m_tanGradNTerms

LevelData<FluxBox> FourthOrderCoordSys::m_tanGradNTerms
protected

Referenced by getTanGranNTerms().

◆ m_cellVolumes

LevelData<FArrayBox> FourthOrderCoordSys::m_cellVolumes
protected

◆ m_J

LevelData<FArrayBox> FourthOrderCoordSys::m_J
protected

◆ m_JInverse

LevelData<FluxBox> FourthOrderCoordSys::m_JInverse
protected

◆ m_NinverseJ

LevelData<FluxBox> FourthOrderCoordSys::m_NinverseJ
protected

◆ m_quadraturePtr

EdgeQuadrature* FourthOrderCoordSys::m_quadraturePtr
protected

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