CubedSphereShellPanelCS Class Reference

#include <CubedSphereShellPanelCS.H>

Inheritance diagram for CubedSphereShellPanelCS:

Inheritance graph
[legend]

List of all members.


Detailed Description

Basic single-panel cubed sphere Coordinates Multiblock coordinate system for single-panel cubed sphere shell with variable-thickness spherical layers The CubedSphereShellPanelCS class implements the NewFourthOrderCoordSys class for cubed sphere panels in equiangular coordinates, with variable-thickness layers making up the shell in the r direction, total r thickness "height". NOTE: Assumes a "thin atmosphere" approximation which ignores the r dependencies of the horizontal grid metrics NOTE: For 2D, hdf5 output uses sphere radius = 1, and for 3D r [1,2]

Public Member Functions

 CubedSphereShellPanelCS (int nPanel, RealVect &dDX, IntVect &ix)
 constructor
void setFlatMap (bool a_flatMap)
void setHeight (Real a_height)
Real getHeight () const
void setRadius (Real a_radius)
Real getRadius () const
void setVerticalMap (RefCountedPtr< Spline1DMapping > a_map)
RefCountedPtr< Spline1DMappinggetVerticalMap () const
virtual ~CubedSphereShellPanelCS ()
RealVect realCoord (const RealVect &a_Xi) const
 given coordinate in mapped space, return its location in real space
void realCoord (FArrayBox &a_x, const FArrayBox &a_Xi, const Box &a_box) const
 given coordinates in mapped space, return locations in real space
RealVect mappedCoord (const RealVect &a_x) const
 given coordinate in real space, return its location in the mapped space
virtual void getNodeRealCoordinates (FArrayBox &a_nodeCoords, const Box &a_box) const
 return Cartesian XYZ locations of cell centers
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 void getMappedCoordinates (FArrayBox &a_coords, 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.
virtual Real dXidX (const RealVect &a_X, int a_dirX, int a_dirXi) const
virtual int dimension () const
 returns dimensionality of the space (3, or 2 if flat)
virtual void cellVol (FArrayBox &a_vol, const FluxBox &a_N, const Box &a_box) const
 computes cell volumes
virtual void volFlux (FluxBox &a_volFlux, const FluxBox &a_Nt, const Box &a_box) const
 computes NT * F.
virtual void getN (FluxBox &a_N, const Box &a_box) const
 computes face-centered N
virtual void getAvgJ (FArrayBox &a_avgJ, const Box &a_box) const
 computes cell-averaged J
void getLineMetrics (FArrayBox &a_metrics, const Box &a_box) const
 computes line element metrics in each coordinate direction
virtual void getAvgJ (FArrayBox &a_avgJ, const FluxBox &a_volFlux, const Box &a_box) const
 computes cell-averaged J; ignores a_volFlux
virtual void getAvgJinverse (FluxBox &a_avgJinverse, const Box &a_box) const
 computes face-averaged 1/J
virtual Real pointwiseJ (const RealVect &a_X) const
 Jacobian evaluated at location X in real space.
virtual void pointwiseJ (FArrayBox &a_J, const FArrayBox &a_Xi, const Box &a_box) const
 Jacobian evaluated at locations Xi in mapped space.
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
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
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.
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 RealVect &a_vecRLL, RealVect &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
virtual void vectorTransformRealToMappedCenterFab (FArrayBox &a_vectorFab) const
 transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis at cell centers
virtual void contravariantMetric (FArrayBox &a_metric, int a_dir) const
 return row a_idir of contravariant metric
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
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
virtual void orthonormalizeVectorFluxes (FArrayBox &a_fluxFab, const Box &a_box, const Interval &a_vectorIntv) const
 convert from fluxes in block frame in component directions to fluxes in orthonormal frame in normal and tangential directions
virtual void deorthonormalizeVectorFluxes (FArrayBox &a_fluxFab, const Box &a_box, const Interval &a_vectorIntv) const
 convert from fluxes in orthonormal frame in normal and tangential directions to fluxes in block frame in component directions
virtual void orthonormalizeVectorFluxes (FluxBox &a_flux, const Interval &a_vectorIntv) const
 convert from fluxes in block frame in component directions to fluxes in orthonormal frame in normal and tangential directions
virtual void deorthonormalizeVectorFluxes (FluxBox &a_flux, const Interval &a_vectorIntv) const
 convert from fluxes in orthonormal frame in normal and tangential directions to fluxes in block frame in component directions
virtual void curlRadial (const FArrayBox &a_vecFab, FArrayBox &a_curlFab, const Box &a_box) const
 return cell-centered radial component of curl of a_vecFab, which has SpaceDim components and is cell-centered.
virtual void curlSpherical (const FArrayBox &a_vecRLLFab, FArrayBox &a_curlFab, const Box &a_box) const
 return radial component of curl of a_vecRLLFab, which has SpaceDim components and is cell-centered, by converting to spherical coordinates.
virtual void divSpherical (const FArrayBox &a_vecRLLFab, FluxBox &a_divFlux, const Box &a_box) const
 return face-centered divergence of a_vecRLLFab, which has SpaceDim components and is cell-centered, by converting to spherical coordinates.
virtual void gradient (const FArrayBox &a_fab, FArrayBox &a_gradFab, const Box &a_box) const
 return cell-centered gradient of a_fab, with derivatives of all components in the alpha direction, then all in beta direction, then all in r direction.
virtual void magnitude (const FArrayBox &a_vecFab, FArrayBox &a_magFab, const Box &a_box) const
 return magnitude of SpaceDim-vector with all components (in UNIT basis) in alpha direction, then all in beta direction, then all in r direction.
virtual void magnitudeNatural (const FArrayBox &a_vecFab, FArrayBox &a_magFab, const Box &a_box) const
 return magnitude of SpaceDim-vector with components in NATURAL basis.
int panel () const
 access function to panel id
void getContravariantMetricJAverage (FArrayBox &a_matrixFab, const int a_dir) const
 returns G^{ij}J averaged over faces of direction a_dir

Protected Attributes

int m_nPanel
int m_realDim
Real m_height
Real m_radius
bool m_flatMap
RefCountedPtr< Spline1DMappingm_verticalMap
IntVect m_ix

Constructor & Destructor Documentation

CubedSphereShellPanelCS::CubedSphereShellPanelCS ( 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 CubedSphereShellPanelCS::~CubedSphereShellPanelCS (  )  [virtual]

Destructor.


Member Function Documentation

void CubedSphereShellPanelCS::setFlatMap ( bool  a_flatMap  ) 

void CubedSphereShellPanelCS::setHeight ( Real  a_height  )  [inline]

References CH_assert, and m_height.

Real CubedSphereShellPanelCS::getHeight (  )  const [inline]

References CH_assert, and m_height.

void CubedSphereShellPanelCS::setRadius ( Real  a_radius  )  [inline]

References CH_assert, and m_radius.

Real CubedSphereShellPanelCS::getRadius (  )  const [inline]

References CH_assert, and m_radius.

void CubedSphereShellPanelCS::setVerticalMap ( RefCountedPtr< Spline1DMapping a_map  )  [inline]

References m_verticalMap.

RefCountedPtr<Spline1DMapping> CubedSphereShellPanelCS::getVerticalMap (  )  const [inline]

RealVect CubedSphereShellPanelCS::realCoord ( const RealVect a_Xi  )  const [virtual]

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

Implements NewFourthOrderCoordSys.

void CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::mappedCoord ( const RealVect a_x  )  const [virtual]

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

Implements NewFourthOrderCoordSys.

virtual void CubedSphereShellPanelCS::getNodeRealCoordinates ( FArrayBox a_nodeCoords,
const Box a_box 
) const [virtual]

return Cartesian XYZ locations of cell centers

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphereShellPanelCS::getCellMappedCoordinates ( FArrayBox a_cellCoords,
const Box a_box 
) const [virtual]

virtual void CubedSphereShellPanelCS::getFaceMappedCoordinates ( FArrayBox a_faceCoords,
const int  a_dir,
const Box a_box 
) const [virtual]

virtual void CubedSphereShellPanelCS::getNodeMappedCoordinates ( FArrayBox a_nodeCoords,
const Box a_box 
) const [virtual]

virtual void CubedSphereShellPanelCS::getMappedCoordinates ( FArrayBox a_coords,
const Box a_box 
) const [virtual]

virtual Real CubedSphereShellPanelCS::dXdXi ( const RealVect a_Xi,
int  a_dirX,
int  a_dirXi 
) const [virtual]

note that a_Xi is in mapped space.

Implements NewFourthOrderCoordSys.

virtual Real CubedSphereShellPanelCS::dXidX ( const RealVect a_X,
int  a_dirX,
int  a_dirXi 
) const [virtual]

virtual int CubedSphereShellPanelCS::dimension (  )  const [inline, virtual]

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

Reimplemented from NewCoordSys.

References m_realDim.

virtual void CubedSphereShellPanelCS::cellVol ( FArrayBox a_vol,
const FluxBox a_N,
const Box a_box 
) const [virtual]

computes cell volumes

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphereShellPanelCS::volFlux ( FluxBox a_volFlux,
const FluxBox a_Nt,
const Box a_box 
) const [virtual]

computes NT * F.

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphereShellPanelCS::getN ( FluxBox a_N,
const Box a_box 
) const [virtual]

computes face-centered N

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphereShellPanelCS::getAvgJ ( FArrayBox a_avgJ,
const Box a_box 
) const [virtual]

computes cell-averaged J

Reimplemented from NewFourthOrderCoordSys.

void CubedSphereShellPanelCS::getLineMetrics ( FArrayBox a_metrics,
const Box a_box 
) const

computes line element metrics in each coordinate direction

virtual void CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::getAvgJinverse ( FluxBox a_avgJinverse,
const Box a_box 
) const [virtual]

computes face-averaged 1/J

Reimplemented from NewFourthOrderCoordSys.

virtual Real CubedSphereShellPanelCS::pointwiseJ ( const RealVect a_X  )  const [virtual]

Jacobian evaluated at location X in real space.

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::pointTransformEquiangularToLonLat ( const RealVect a_xi,
RealVect a_rllXi 
) const

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

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

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

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

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

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

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

void CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::vectorTransformLatLonToEquiangular ( const RealVect a_xi,
const RealVect a_vecRLL,
RealVect a_vecCS 
) const

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

void CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::contravariantMetric ( FArrayBox a_metric,
int  a_dir 
) const [virtual]

return row a_idir of contravariant metric

Reimplemented from NewFourthOrderCoordSys.

virtual void CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::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 CubedSphereShellPanelCS::orthonormalizeVectorFluxes ( FArrayBox a_fluxFab,
const Box a_box,
const Interval a_vectorIntv 
) const [virtual]

convert from fluxes in block frame in component directions to fluxes in orthonormal frame in normal and tangential directions

virtual void CubedSphereShellPanelCS::deorthonormalizeVectorFluxes ( FArrayBox a_fluxFab,
const Box a_box,
const Interval a_vectorIntv 
) const [virtual]

convert from fluxes in orthonormal frame in normal and tangential directions to fluxes in block frame in component directions

virtual void CubedSphereShellPanelCS::orthonormalizeVectorFluxes ( FluxBox a_flux,
const Interval a_vectorIntv 
) const [virtual]

convert from fluxes in block frame in component directions to fluxes in orthonormal frame in normal and tangential directions

virtual void CubedSphereShellPanelCS::deorthonormalizeVectorFluxes ( FluxBox a_flux,
const Interval a_vectorIntv 
) const [virtual]

convert from fluxes in orthonormal frame in normal and tangential directions to fluxes in block frame in component directions

virtual void CubedSphereShellPanelCS::curlRadial ( const FArrayBox a_vecFab,
FArrayBox a_curlFab,
const Box a_box 
) const [virtual]

return cell-centered radial component of curl of a_vecFab, which has SpaceDim components and is cell-centered.

virtual void CubedSphereShellPanelCS::curlSpherical ( const FArrayBox a_vecRLLFab,
FArrayBox a_curlFab,
const Box a_box 
) const [virtual]

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

virtual void CubedSphereShellPanelCS::divSpherical ( const FArrayBox a_vecRLLFab,
FluxBox a_divFlux,
const Box a_box 
) const [virtual]

return face-centered divergence of a_vecRLLFab, which has SpaceDim components and is cell-centered, by converting to spherical coordinates.

virtual void CubedSphereShellPanelCS::gradient ( const FArrayBox a_fab,
FArrayBox a_gradFab,
const Box a_box 
) const [virtual]

return cell-centered gradient of a_fab, with derivatives of all components in the alpha direction, then all in beta direction, then all in r direction.

virtual void CubedSphereShellPanelCS::magnitude ( const FArrayBox a_vecFab,
FArrayBox a_magFab,
const Box a_box 
) const [virtual]

return magnitude of SpaceDim-vector with all components (in UNIT basis) in alpha direction, then all in beta direction, then all in r direction.

virtual void CubedSphereShellPanelCS::magnitudeNatural ( const FArrayBox a_vecFab,
FArrayBox a_magFab,
const Box a_box 
) const [virtual]

return magnitude of SpaceDim-vector with components in NATURAL basis.

int CubedSphereShellPanelCS::panel (  )  const [inline]

access function to panel id

References m_nPanel.

void CubedSphereShellPanelCS::getContravariantMetricJAverage ( FArrayBox a_matrixFab,
const int  a_dir 
) const

returns G^{ij}J averaged over faces of direction a_dir


Member Data Documentation

Referenced by panel().

Referenced by dimension().

Referenced by getHeight(), and setHeight().

Referenced by getRadius(), and setRadius().

Referenced by getVerticalMap(), and setVerticalMap().


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

Generated on Sat May 27 03:27:03 2017 for Chombo + EB + MF by  doxygen 1.5.5