#include <NewCoordSys.H>

The CoordSys class is a pure-virtual base class providing an API for performing operations in a mapped grid coordinate space. Implementations of specific coordinate systems will be provided by derived classes.
Public Member Functions | |
| NewCoordSys () | |
| default constructor | |
| virtual | ~NewCoordSys () |
| virtual RealVect | realCoord (const RealVect &a_Xi) const =0 |
| given coordinate in mapped space, return its location in real space | |
| virtual RealVect | mappedCoord (const RealVect &a_x) const =0 |
| given coordinate in real space, return its location in the mapped space | |
| virtual void | realCoord (FArrayBox &a_x, const FArrayBox &a_Xi, const Box &a_box) const |
| given coordinates in mapped space, return locations in real space | |
| 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 | |
| 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. | |
| virtual RealVect | centerMappedCoordinates (const IntVect &a_iv) const |
| given indices, return centers of cells in mapped coordinates | |
| virtual void | getNodeRealCoordinates (FArrayBox &a_nodeCoords, const Box &a_box) const =0 |
| return Cartesian XYZ locations of nodes | |
| virtual Real | dXdXi (const RealVect &a_Xi, int a_dirX, int a_dirXi) const =0 |
| note that a_Xi is in mapped space. | |
| 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_Xi is in mapped space. | |
| virtual int | getNumN () const =0 |
| returns number of components in the metric term matrix (N) | |
| virtual int | getNcomponent (const int a_row, const int a_col) const =0 |
| index function into face-centered metric terms | |
| virtual int | dimension () const |
| returns dimensionality of the space | |
| virtual void | cellVol (FArrayBox &a_vol, const FluxBox &a_N, const Box &a_box) const =0 |
| computes cell volumes | |
| virtual void | getN (FluxBox &a_N, const Box &a_box) const =0 |
| computes integral of N over each face of a_box | |
| virtual void | getAvgJ (FArrayBox &a_avgJ, const Box &a_box) const =0 |
| computes cell-averaged J | |
| virtual void | getAvgJinverse (FluxBox &a_avgJinverse, const Box &a_box) const =0 |
| computes face-averaged 1/J | |
| virtual Real | pointwiseJ (const RealVect &a_Xi) const =0 |
| Jacobian evaluated at location Xi in mapped 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 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 =0 |
| computes 4th-order average of product = N^T*F | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| 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 | 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 | |
| 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 | 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 | |
| virtual const RealVect & | dx () const =0 |
| access function to simplify things -- returns mapped-space cell spacing | |
| virtual void | setTime (const Real &a_time) const |
| Set time for moving grids. | |
Protected Member Functions | |
| 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 | |
Protected Attributes | |
| Real | m_time |
| Const is already well entrenched. | |
| NewCoordSys::NewCoordSys | ( | ) | [inline] |
default constructor
| virtual NewCoordSys::~NewCoordSys | ( | ) | [inline, virtual] |
Destructor.
given coordinate in mapped space, return its location in real space
Implemented in AnalyticCS, CartesianBlockCS, CartesianCS, CubedSphere2DPanelCS, CubedSphereShellPanelCS, CylinderEquiangularBlockCS, NewFourthOrderCoordSys, RThetaPhiCS, RThetaZCS, SchwarzChristoffelRampCS, TwistedCS, WarpedCS, and XPointBlockCoordSys.
given coordinate in real space, return its location in the mapped space
Implemented in AnalyticCS, CartesianBlockCS, CartesianCS, CubedSphere2DPanelCS, CubedSphereShellPanelCS, CylinderEquiangularBlockCS, NewFourthOrderCoordSys, RThetaPhiCS, RThetaZCS, SchwarzChristoffelRampCS, TwistedCS, WarpedCS, and XPointBlockCoordSys.
| virtual void NewCoordSys::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 in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
| virtual void NewCoordSys::mappedCoord | ( | FArrayBox & | a_Xi, | |
| const FArrayBox & | a_x, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
given coordinate in real space, return its location in the mapped space
Reimplemented in NewFourthOrderCoordSys.
| virtual void NewCoordSys::getCenterMappedCoordinates | ( | FArrayBox & | a_Xi, | |
| const Box & | a_box | |||
| ) | const [virtual] |
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.
given indices, return centers of cells in mapped coordinates
| virtual void NewCoordSys::getNodeRealCoordinates | ( | FArrayBox & | a_nodeCoords, | |
| const Box & | a_box | |||
| ) | const [pure virtual] |
return Cartesian XYZ locations of nodes
nodeCoords should have dimension returned by dimension()
Implemented in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
| virtual Real NewCoordSys::dXdXi | ( | const RealVect & | a_Xi, | |
| int | a_dirX, | |||
| int | a_dirXi | |||
| ) | const [pure virtual] |
note that a_Xi is in mapped space.
Implemented in AnalyticCS, CartesianBlockCS, CartesianCS, CubedSphere2DPanelCS, CubedSphereShellPanelCS, CylinderEquiangularBlockCS, NewFourthOrderCoordSys, RThetaPhiCS, RThetaZCS, SchwarzChristoffelRampCS, TwistedCS, WarpedCS, and XPointBlockCoordSys.
| virtual void NewCoordSys::dXdXi | ( | FArrayBox & | a_dxdXi, | |
| const FArrayBox & | a_Xi, | |||
| int | a_destComp, | |||
| int | a_dirX, | |||
| int | a_dirXi, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
note that a_Xi is in 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)
Reimplemented in NewFourthOrderCoordSys, and XPointBlockCoordSys.
| virtual int NewCoordSys::getNumN | ( | ) | const [pure virtual] |
| virtual int NewCoordSys::getNcomponent | ( | const int | a_row, | |
| const int | a_col | |||
| ) | const [pure virtual] |
index function into face-centered metric terms
returns which component of the face-centered metric term in which N^row_col is stored
Implemented in NewFourthOrderCoordSys.
| virtual int NewCoordSys::dimension | ( | ) | const [inline, virtual] |
returns dimensionality of the space
The dimensionality of the space may not be SpaceDim if, for example we're computing on a manifold. One example of this is the surface-of-a-sphere mapping, which is a 2D surface in a 3D space. For that case, dimension() would return 3 even though SpaceDim is 2. Default implementation returns SpaceDim.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
References SpaceDim.
| virtual void NewCoordSys::cellVol | ( | FArrayBox & | a_vol, | |
| const FluxBox & | a_N, | |||
| const Box & | a_box | |||
| ) | const [pure virtual] |
computes cell volumes
Return cell volume in a_vol on cells of a_box, using a_N from getN() defined on a_box grown by 1.
Implemented in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
computes integral of N over each face of a_box
Implemented in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
computes cell-averaged J
Implemented in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
| virtual void NewCoordSys::getAvgJinverse | ( | FluxBox & | a_avgJinverse, | |
| const Box & | a_box | |||
| ) | const [pure virtual] |
computes face-averaged 1/J
Implemented in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
Jacobian evaluated at location Xi in mapped space.
Implemented in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
| virtual void NewCoordSys::pointwiseJ | ( | FArrayBox & | a_J, | |
| const FArrayBox & | a_Xi, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
Jacobian evaluated at locations Xi in mapped space.
Reimplemented in CubedSphere2DPanelCS, CubedSphereShellPanelCS, and NewFourthOrderCoordSys.
| virtual void NewCoordSys::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 in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewCoordSys::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 [pure virtual] |
computes 4th-order average of product = N^T*F
if a_fourthOrder is false, then only do a second-order dot product aFforGrad is the F used to compute grad_perp(F); returns results in a_product on a_box; both a_FforGrad and a_N (from getN()) must be defined on a_box grown by 1.
Implemented in NewFourthOrderCoordSys.
| virtual void NewCoordSys::computeMetricTermProductAverage | ( | FluxBox & | a_product, | |
| const FluxBox & | a_F, | |||
| const FluxBox & | a_N, | |||
| const Box & | a_box, | |||
| 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; returns results in a_product on a_box; both a_F and a_N (from getN()) must be defined on a_box grown by 1.
Reimplemented in NewFourthOrderCoordSys.
| virtual VectorTransformation NewCoordSys::vectorTransformationMappedToReal | ( | const RealVect & | a_Xi | ) | const [virtual] |
return matrix that transforms vector components from mapped space to real space at point a_Xi in mapped space
| virtual VectorTransformation NewCoordSys::vectorTransformationRealToMapped | ( | const RealVect & | a_Xi | ) | const [virtual] |
return matrix that transforms vector components from real space to mapped space at point a_Xi in mapped space
| virtual VectorTransformation NewCoordSys::vectorTransformationMappedToRealCenter | ( | const IntVect & | a_iv | ) | const [virtual] |
return matrix that transforms vector components from mapped space to real space at center of cell a_iv
| virtual VectorTransformation NewCoordSys::vectorTransformationRealToMappedCenter | ( | const IntVect & | a_iv | ) | const [virtual] |
return matrix that transforms vector components from real space to mapped space at center of cell a_iv
| virtual void NewCoordSys::vectorTransformMappedToRealCenterFab | ( | FArrayBox & | a_vectorFab | ) | const [virtual] |
transform a FAB of SpaceDim-vectors from mapped-coordinate basis to real-coordinate basis at cell centers
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewCoordSys::vectorTransformMappedToRealAvgFab | ( | FArrayBox & | a_vectorFab, | |
| const FArrayBox & | a_gradVectorFab | |||
| ) | const [virtual] |
transform a FAB of SpaceDim-vectors from mapped-coordinate basis to real-coordinate basis, averaged over cells
| virtual void NewCoordSys::vectorTransformRealToMappedCenterFab | ( | FArrayBox & | a_vectorFab | ) | const [virtual] |
transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis at cell centers
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewCoordSys::vectorTransformRealToMappedAvgFab | ( | FArrayBox & | a_vectorFab, | |
| const FArrayBox & | a_gradVectorFab | |||
| ) | const [virtual] |
transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis, averaged over cells
| virtual const RealVect& NewCoordSys::dx | ( | ) | const [pure virtual] |
access function to simplify things -- returns mapped-space cell spacing
Implemented in NewFourthOrderCoordSys.
| void NewCoordSys::setTime | ( | const Real & | a_time | ) | const [inline, virtual] |
| virtual void NewCoordSys::vectorTransformInternalAvgFab | ( | FArrayBox & | a_vectorFab, | |
| const FArrayBox & | a_gradVectorFab, | |||
| const BaseFab< VectorTransformation > & | a_tfmCenterFab | |||
| ) | const [protected, virtual] |
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
Real NewCoordSys::m_time [mutable, protected] |
1.5.5