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

Basic single-panel cubed sphere Coordinates. More...

#include <CubedSphere2DPanelCS.H>

Inheritance diagram for CubedSphere2DPanelCS:
Inheritance graph
[legend]

Public Member Functions

 CubedSphere2DPanelCS (int nPanel, RealVect &dDX, IntVect &ix)
 constructor More...
 
void setFlatMap (bool a_flatMap)
 
virtual ~CubedSphere2DPanelCS ()
 
RealVect realCoord (const RealVect &a_Xi) const
 given coordinate in mapped space, return its location in real space More...
 
void realCoord (FArrayBox &a_x, const FArrayBox &a_Xi, const Box &a_box) const
 given coordinates in mapped space, return locations in real space More...
 
RealVect mappedCoord (const RealVect &a_x) const
 given coordinate in real space, return its location in the mapped space More...
 
virtual void getNodeRealCoordinates (FArrayBox &a_nodeCoords, const Box &a_box) const
 return Cartesian XYZ locations of cell centers More...
 
virtual void getCellMappedCoordinates (FArrayBox &a_cellCoords, const Box &a_box) const
 
virtual void getFaceMappedCoordinates (FArrayBox &a_faceCoords, const int a_dir, const Box &a_box) const
 
virtual void getNodeMappedCoordinates (FArrayBox &a_nodeCoords, const Box &a_box) const
 
virtual Real dXdXi (const RealVect &a_Xi, int a_dirX, int a_dirXi) const
 note that a_Xi is in mapped space. More...
 
virtual int dimension () const
 returns dimensionality of the space (3, or 2 if flat) More...
 
virtual void cellVol (FArrayBox &a_vol, const FluxBox &a_N, const Box &a_box) const
 computes cell volumes More...
 
virtual void volFlux (FluxBox &a_volFlux, const FluxBox &a_Nt, const Box &a_box) const
 computes NT * F. More...
 
virtual void getN (FluxBox &a_N, const Box &a_box) const
 computes face-centered N More...
 
virtual void getAvgJ (FArrayBox &a_avgJ, const Box &a_box) const
 computes cell-averaged J More...
 
virtual void getAvgJ (FArrayBox &a_avgJ, const FluxBox &a_volFlux, const Box &a_box) const
 computes cell-averaged J; ignores a_volFlux More...
 
virtual void getAvgJinverse (FluxBox &a_avgJinverse, const Box &a_box) const
 computes face-averaged 1/J 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 FArrayBox &a_Xi, const Box &a_box) const
 Jacobian evaluated at locations Xi in mapped space. More...
 
virtual void computeDivergence (FArrayBox &a_divF, const FluxBox &a_F, const FluxBox &a_N, const Box &a_box, Interval &divInterval) const
 returns integral of divergence over mapped-grid cells More...
 
virtual Real getN (const RealVect &a_Xi, int a_s, int a_d, int a_d1) const
 this evaluates the script N values from equation 12 in Phil's notes More...
 
virtual Real getNMatrixEntry (const RealVect &a_Xi, int a_s, int a_d, int a_d1, int a_row, int a_column) const
 note that a_Xi is in mapped space. More...
 
void pointTransformEquiangularToLonLat (const RealVect &a_xi, RealVect &a_rllXi) const
 
void pointTransformEquiangularToCartesian (const RealVect &a_xi, Real *a_xyz) const
 
void fabTransformEquiangularToLonLat (const FArrayBox &a_xiFab, FArrayBox &a_rllXiFab) const
 
void fabTransformEquiangularToCartesian (const FArrayBox &a_xiFab, FArrayBox &a_xyzFab) const
 
void vectorTransformEquiangularToCartesian (const RealVect &a_xi, const Real *a_vecCS, Real *a_vecXYZ) const
 
void vectorTransformCartesianToEquiangular (const RealVect &a_xi, const Real *a_vecXYZ, Real *a_vecCS) const
 
void vectorTransformLatLonToEquiangular (const RealVect &a_xi, const Real *a_vecRLL, Real *a_vecCS) const
 
void fabVectorTransformLatLonToEquiangular (const FArrayBox &a_xiFab, const FArrayBox &a_vecRLLFab, FArrayBox &a_vecCSFab) const
 
void fabVectorTransformEquiangularToLatLon (const FArrayBox &a_xiFab, const FArrayBox &a_vecCSFab, FArrayBox &a_vecRLLFab) const
 
virtual void vectorTransformMappedToRealCenterFab (FArrayBox &a_vectorFab) const
 transform a FAB of SpaceDim-vectors from mapped-coordinate basis to real-coordinate basis at cell centers More...
 
virtual void vectorTransformRealToMappedCenterFab (FArrayBox &a_vectorFab) const
 transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis at cell centers More...
 
virtual void contravariantMetric (FArrayBox &a_metric, int a_dir) const
 return row a_idir of contravariant metric More...
 
virtual void orthonormalize (const FArrayBox &a_csFab, FArrayBox &a_orthoFab, const Box &a_box, int a_idir, const IntVect &a_csComps, const IntVect &a_orthoComps) const
 convert components in a_csComps of vector a_csFab in coordinate-system basis to components in a_orthoComps of vector a_orthoFab in orthonormal basis, at points with indices in a_box, on lines where direction a_idir is constant More...
 
virtual void deorthonormalize (const FArrayBox &a_orthoFab, FArrayBox &a_csFab, const Box &a_box, int a_idir, const IntVect &a_orthoComps, const IntVect &a_csComps) const
 convert components in a_orthoComps of vector a_orthoFab in orthonormal basis to components in a_csComps of vector a_csFab in coordinate-system basis, at points with indices in a_box, on lines where direction a_idir is constant More...
 
virtual void getOrthonormalizingMatrix (FArrayBox &a_matrixFab, const Box &a_box, int a_idir) const
 return coefficients to convert components of a vector from coordinate-system basis to orthonormal basis, at points with indices in a_box, on lines where direction a_idir is constant More...
 
virtual void getDeorthonormalizingMatrix (FArrayBox &a_matrixFab, const Box &a_box, int a_idir) const
 return coefficients to convert components of a vector from orthonormal basis to coordinate-system basis, at points with indices in a_box, on lines where direction a_idir is constant More...
 
virtual void curl (const FArrayBox &a_vecFab, FArrayBox &a_curlFab, const Box &a_box) const
 return radial component of curl of a_vecFab, which has SpaceDim components and is cell-centered. Does not seem to work. More...
 
virtual void curlSpherical (const FArrayBox &a_vecFab, FArrayBox &a_curlFab, const Box &a_box) const
 return radial component of curl of a_vecFab, which has SpaceDim components and is cell-centered, by converting to spherical coordinates. More...
 
int panel () const
 access function to panel id More...
 
- Public Member Functions inherited from NewFourthOrderCoordSys
 NewFourthOrderCoordSys ()
 default constructor More...
 
virtual ~NewFourthOrderCoordSys ()
 
virtual void mappedCoord (FArrayBox &a_Xi, const FArrayBox &a_x, const Box &a_box) const
 given coordinate in real space, return its location in the mapped space More...
 
virtual void dXdXi (FArrayBox &a_dxdXi, const FArrayBox &a_Xi, int a_destComp, int a_dirX, int a_dirXi, const Box &a_box) const
 note that a_X is in mapped space. More...
 
virtual int getNumN () const
 returns number of components in the metric term matrix (N) More...
 
virtual int getNcomponent (const int a_row, const int a_col) const
 index function into face-centered metric terms More...
 
virtual void getAvgJinverse (FluxBox &a_avgJinverse, const FArrayBox &a_avgJ, const Box &a_box) const
 computes cell-averaged 1/J, using pre-computed cell-avg J More...
 
virtual void computeMetricTermProductAverage (FluxBox &a_product, const FluxBox &a_F, const FluxBox &a_N, const int a_NNumComp, const FluxBox &a_FforGrad, const Box &a_box, bool a_fourthOrder=true, Interval a_varIntervalProduct=Interval(), Interval a_varIntervalF=Interval(), int a_fluxSpaceContiguous=1, const ProblemDomain *const a_problemDomainPtr=NULL) const
 Computes 4th-order average of product = N^T*F. F can be a flux dyad. More...
 
virtual void computeMetricTermProductAverage (FluxBox &a_product, const FluxBox &a_F, const FluxBox &a_N, const FluxBox &a_FforGrad, const Box &a_box, bool a_fourthOrder=true) const
 computes 4th-order average of product = N^T*F. F is vector of a scalar More...
 
virtual void computeMetricTermProductAverage (FluxBox &a_product, const FluxBox &a_F, const FluxBox &a_N, const Box &a_box, bool a_fourthOrder=true) const
 computes 4th-order average of product = N^T*F. F is vector of a scalar More...
 
void magnitudeN (FluxBox &a_NMag, const FluxBox &a_N, const Box &a_box) const
 Computes magnitude of <N^T> on each face. More...
 
virtual void computeNJinverse (FluxBox &a_NJinverse, const FluxBox &a_Jinverse, const FluxBox &a_N, const Box &a_cellBox) const
 given N and Jinverse, computes N/J More...
 
virtual const RealVectdx () const
 access function to simplify things – returns mapped-space cell spacing More...
 
virtual void integrateScriptN (FArrayBox &a_scrN, const int a_dir0, const int a_dir1, const Box &a_box) const
 
virtual void incrementFaceMetricWithEdgeTerm (FArrayBox &a_faceMetrics, int a_faceDir, int a_edgeDir, const Box &a_box, const Side::LoHiSide &a_side) const
 
virtual void computeTransverseFaceMetric (FArrayBox &a_faceMetrics, const Box &a_box, int a_faceDir, int a_dDir) const
 
virtual void computeTangentialGrad (FluxBox &a_gradPhi, const FluxBox &a_phiFace, const Box &a_box) const
 
virtual int tanGradComp (const int a_faceDir, const int a_tanDir, const int a_comp) const
 
virtual void orthonormalize (FluxBox &a_flux, const Interval &a_vectorIntv) const
 convert vector components (in a_vectorIntv) of a_flux to orthonormal frame to that of this block More...
 
virtual void orthonormalize (FArrayBox &a_fluxFab, const Interval &a_vectorIntv) const
 overwrite vector components (in a_vectorIntv) of a_fluxFab with orthonormalized More...
 
virtual void deorthonormalize (FluxBox &a_flux, const Interval &a_vectorIntv) const
 convert vector components (in a_vectorIntv) of a_flux from orthonormal frame to that of this block More...
 
virtual void deorthonormalize (FArrayBox &a_fluxFab, const Interval &a_vectorIntv) const
 overwrite vector components (in a_vectorIntv) of a_fluxFab with deorthonormalized More...
 
- Public Member Functions inherited from NewCoordSys
 NewCoordSys ()
 default constructor More...
 
virtual ~NewCoordSys ()
 
virtual void getCenterMappedCoordinates (FArrayBox &a_Xi, const Box &a_box) const
 given indices in a_box, return centers of cells (or of faces, or of edges) in mapped coordinates. The function does the right thing based on the centering of a_box, which must be the same centering as a_Xi. More...
 
virtual RealVect centerMappedCoordinates (const IntVect &a_iv) const
 given indices, return centers of cells in mapped coordinates More...
 
virtual VectorTransformation vectorTransformationMappedToReal (const RealVect &a_Xi) const
 return matrix that transforms vector components from mapped space to real space at point a_Xi in mapped space More...
 
virtual VectorTransformation vectorTransformationRealToMapped (const RealVect &a_Xi) const
 return matrix that transforms vector components from real space to mapped space at point a_Xi in mapped space More...
 
virtual VectorTransformation vectorTransformationMappedToRealCenter (const IntVect &a_iv) const
 return matrix that transforms vector components from mapped space to real space at center of cell a_iv More...
 
virtual VectorTransformation vectorTransformationRealToMappedCenter (const IntVect &a_iv) const
 return matrix that transforms vector components from real space to mapped space at center of cell a_iv More...
 
virtual void vectorTransformMappedToRealAvgFab (FArrayBox &a_vectorFab, const FArrayBox &a_gradVectorFab) const
 transform a FAB of SpaceDim-vectors from mapped-coordinate basis to real-coordinate basis, averaged over cells More...
 
virtual void vectorTransformRealToMappedAvgFab (FArrayBox &a_vectorFab, const FArrayBox &a_gradVectorFab) const
 transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis, averaged over cells More...
 
virtual void setTime (const Real &a_time) const
 Set time for moving grids. More...
 

Protected Attributes

int m_nPanel
 
int m_realDim
 
bool m_flatMap
 
IntVect m_ix
 
- Protected Attributes inherited from NewFourthOrderCoordSys
RealVect m_dx
 
Interval m_volInterval
 
EdgeQuadraturem_quadraturePtr
 
- Protected Attributes inherited from NewCoordSys
Real m_time
 Const is already well entrenched. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from NewFourthOrderCoordSys
static const IntVectmetricsCompDir (const int a_iDir)
 Same as getNcomponent but returns an IntVect for an 'a_col' (direction) More...
 
- Protected Member Functions inherited from NewCoordSys
virtual void vectorTransformInternalAvgFab (FArrayBox &a_vectorFab, const FArrayBox &a_gradVectorFab, const BaseFab< VectorTransformation > &a_tfmCenterFab) const
 internal function to transform a FAB of SpaceDim-vectors from one basis to another, averaged over cells, given BaseFab of vector transformations at cell centers More...
 

Detailed Description

Basic single-panel cubed sphere Coordinates.

The CubedSphere2DPanelCS class implements the NewFourthOrderCoordSys class for cubed sphere panels in equiangular coordinates.

Constructor & Destructor Documentation

CubedSphere2DPanelCS::CubedSphere2DPanelCS ( int  nPanel,
RealVect dDX,
IntVect ix 
)

constructor

nPanel (0-3 Equatorial, 4 North Pole, 5 South Pole) and defines the panel on the cubed sphere described by this object. dDX The cell spacing on this panel. ix Index of the bottom-left edge of this panel in index space.

virtual CubedSphere2DPanelCS::~CubedSphere2DPanelCS ( )
virtual

Destructor.

Member Function Documentation

void CubedSphere2DPanelCS::setFlatMap ( bool  a_flatMap)
RealVect CubedSphere2DPanelCS::realCoord ( const RealVect a_Xi) const
virtual

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

Implements NewFourthOrderCoordSys.

void CubedSphere2DPanelCS::realCoord ( FArrayBox a_x,
const FArrayBox a_Xi,
const Box a_box 
) const
virtual

given coordinates in mapped space, return locations in real space

Reimplemented from NewFourthOrderCoordSys.

RealVect CubedSphere2DPanelCS::mappedCoord ( const RealVect a_x) const
virtual

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

Implements NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::getNodeRealCoordinates ( FArrayBox a_nodeCoords,
const Box a_box 
) const
virtual

return Cartesian XYZ locations of cell centers

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::getCellMappedCoordinates ( FArrayBox a_cellCoords,
const Box a_box 
) const
virtual
virtual void CubedSphere2DPanelCS::getFaceMappedCoordinates ( FArrayBox a_faceCoords,
const int  a_dir,
const Box a_box 
) const
virtual
virtual void CubedSphere2DPanelCS::getNodeMappedCoordinates ( FArrayBox a_nodeCoords,
const Box a_box 
) const
virtual
virtual Real CubedSphere2DPanelCS::dXdXi ( const RealVect a_Xi,
int  a_dirX,
int  a_dirXi 
) const
virtual

note that a_Xi is in mapped space.

Implements NewFourthOrderCoordSys.

virtual int CubedSphere2DPanelCS::dimension ( ) const
inlinevirtual

returns dimensionality of the space (3, or 2 if flat)

Reimplemented from NewCoordSys.

References m_realDim.

virtual void CubedSphere2DPanelCS::cellVol ( FArrayBox a_vol,
const FluxBox a_N,
const Box a_box 
) const
virtual

computes cell volumes

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::volFlux ( FluxBox a_volFlux,
const FluxBox a_Nt,
const Box a_box 
) const
virtual

computes NT * F.

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::getN ( FluxBox a_N,
const Box a_box 
) const
virtual

computes face-centered N

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::getAvgJ ( FArrayBox a_avgJ,
const Box a_box 
) const
virtual

computes cell-averaged J

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::getAvgJ ( FArrayBox a_avgJ,
const FluxBox a_volFlux,
const Box a_box 
) const
virtual

computes cell-averaged J; ignores a_volFlux

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::getAvgJinverse ( FluxBox a_avgJinverse,
const Box a_box 
) const
virtual

computes face-averaged 1/J

Reimplemented from NewFourthOrderCoordSys.

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

Jacobian evaluated at location X in real space.

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::pointwiseJ ( FArrayBox a_J,
const FArrayBox a_Xi,
const Box a_box 
) const
virtual

Jacobian evaluated at locations Xi in mapped space.

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::computeDivergence ( FArrayBox a_divF,
const FluxBox a_F,
const FluxBox a_N,
const Box a_box,
Interval divInterval 
) const
virtual

returns integral of divergence over mapped-grid cells

Reimplemented from NewCoordSys.

virtual Real CubedSphere2DPanelCS::getN ( const RealVect a_Xi,
int  a_s,
int  a_d,
int  a_d1 
) const
virtual

this evaluates the script N values from equation 12 in Phil's notes

note that a_Xi is in mapped space.

Reimplemented from NewFourthOrderCoordSys.

virtual Real CubedSphere2DPanelCS::getNMatrixEntry ( const RealVect a_Xi,
int  a_s,
int  a_d,
int  a_d1,
int  a_row,
int  a_column 
) const
virtual

note that a_Xi is in mapped space.

Reimplemented from NewFourthOrderCoordSys.

void CubedSphere2DPanelCS::pointTransformEquiangularToLonLat ( const RealVect a_xi,
RealVect a_rllXi 
) const

transform a point from mapped-coordinate basis to longitude-latitude coordinate basis

void CubedSphere2DPanelCS::pointTransformEquiangularToCartesian ( const RealVect a_xi,
Real a_xyz 
) const

transform a point from mapped-coordinate basis to Cartesian coordinate basis

void CubedSphere2DPanelCS::fabTransformEquiangularToLonLat ( const FArrayBox a_xiFab,
FArrayBox a_rllXiFab 
) const

transform a FAB of points from mapped-coordinate basis to latitude-longitude coordinate basis

void CubedSphere2DPanelCS::fabTransformEquiangularToCartesian ( const FArrayBox a_xiFab,
FArrayBox a_xyzFab 
) const

transform a FAB of points from mapped-coordinate basis to Cartesian coordinate basis

void CubedSphere2DPanelCS::vectorTransformEquiangularToCartesian ( const RealVect a_xi,
const Real a_vecCS,
Real a_vecXYZ 
) const

transform a vector from mapped-coordinate basis to real-coordinate basis, given a point a_xi in mapped space

void CubedSphere2DPanelCS::vectorTransformCartesianToEquiangular ( const RealVect a_xi,
const Real a_vecXYZ,
Real a_vecCS 
) const

transform a vector from real-coordinate basis to mapped-coordinate basis, given a point a_xi in mapped space

void CubedSphere2DPanelCS::vectorTransformLatLonToEquiangular ( const RealVect a_xi,
const Real a_vecRLL,
Real a_vecCS 
) const

transform a vector from longitude-latitude coordinate basis to mapped-coordinate basis

void CubedSphere2DPanelCS::fabVectorTransformLatLonToEquiangular ( const FArrayBox a_xiFab,
const FArrayBox a_vecRLLFab,
FArrayBox a_vecCSFab 
) const

transform a FAB of vectors from latitude-longitude coordinate basis to mapped-coordinate basis

void CubedSphere2DPanelCS::fabVectorTransformEquiangularToLatLon ( const FArrayBox a_xiFab,
const FArrayBox a_vecCSFab,
FArrayBox a_vecRLLFab 
) const

transform a FAB of vectors from mapped-coordinate basis to latitude-longitude coordinate basis

virtual void CubedSphere2DPanelCS::vectorTransformMappedToRealCenterFab ( FArrayBox a_vectorFab) const
virtual

transform a FAB of SpaceDim-vectors from mapped-coordinate basis to real-coordinate basis at cell centers

Reimplemented from NewCoordSys.

virtual void CubedSphere2DPanelCS::vectorTransformRealToMappedCenterFab ( FArrayBox a_vectorFab) const
virtual

transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis at cell centers

Reimplemented from NewCoordSys.

virtual void CubedSphere2DPanelCS::contravariantMetric ( FArrayBox a_metric,
int  a_dir 
) const
virtual

return row a_idir of contravariant metric

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::orthonormalize ( const FArrayBox a_csFab,
FArrayBox a_orthoFab,
const Box a_box,
int  a_idir,
const IntVect a_csComps,
const IntVect a_orthoComps 
) const
virtual

convert components in a_csComps of vector a_csFab in coordinate-system basis to components in a_orthoComps of vector a_orthoFab in orthonormal basis, at points with indices in a_box, on lines where direction a_idir is constant

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::deorthonormalize ( const FArrayBox a_orthoFab,
FArrayBox a_csFab,
const Box a_box,
int  a_idir,
const IntVect a_orthoComps,
const IntVect a_csComps 
) const
virtual

convert components in a_orthoComps of vector a_orthoFab in orthonormal basis to components in a_csComps of vector a_csFab in coordinate-system basis, at points with indices in a_box, on lines where direction a_idir is constant

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphere2DPanelCS::getOrthonormalizingMatrix ( FArrayBox a_matrixFab,
const Box a_box,
int  a_idir 
) const
virtual

return coefficients to convert components of a vector from coordinate-system basis to orthonormal basis, at points with indices in a_box, on lines where direction a_idir is constant

virtual void CubedSphere2DPanelCS::getDeorthonormalizingMatrix ( FArrayBox a_matrixFab,
const Box a_box,
int  a_idir 
) const
virtual

return coefficients to convert components of a vector from orthonormal basis to coordinate-system basis, at points with indices in a_box, on lines where direction a_idir is constant

virtual void CubedSphere2DPanelCS::curl ( const FArrayBox a_vecFab,
FArrayBox a_curlFab,
const Box a_box 
) const
virtual

return radial component of curl of a_vecFab, which has SpaceDim components and is cell-centered. Does not seem to work.

virtual void CubedSphere2DPanelCS::curlSpherical ( const FArrayBox a_vecFab,
FArrayBox a_curlFab,
const Box a_box 
) const
virtual

return radial component of curl of a_vecFab, which has SpaceDim components and is cell-centered, by converting to spherical coordinates.

int CubedSphere2DPanelCS::panel ( ) const
inline

access function to panel id

References m_nPanel.

Member Data Documentation

int CubedSphere2DPanelCS::m_nPanel
protected

Referenced by panel().

int CubedSphere2DPanelCS::m_realDim
protected

Referenced by dimension().

bool CubedSphere2DPanelCS::m_flatMap
protected
IntVect CubedSphere2DPanelCS::m_ix
protected

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