Chombo + EB + MF
3.2
|
Virtual base class encapsulating mapped-grid coordinate systems. More...
#include <NewCoordSys.H>
Public Member Functions | |
NewCoordSys () | |
default constructor More... | |
virtual | ~NewCoordSys () |
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 Box &a_box) const |
given coordinates in mapped space, return locations in real space More... | |
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 | 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 void | getNodeRealCoordinates (FArrayBox &a_nodeCoords, const Box &a_box) const =0 |
return Cartesian XYZ locations of nodes More... | |
virtual Real | dXdXi (const RealVect &a_Xi, int a_dirX, int a_dirXi) const =0 |
note that a_Xi is in 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_Xi is in mapped space. More... | |
virtual int | getNumN () const =0 |
returns number of components in the metric term matrix (N) More... | |
virtual int | getNcomponent (const int a_row, const int a_col) const =0 |
index function into face-centered metric terms More... | |
virtual int | dimension () const |
returns dimensionality of the space More... | |
virtual void | cellVol (FArrayBox &a_vol, const FluxBox &a_N, const Box &a_box) const =0 |
computes cell volumes More... | |
virtual void | getN (FluxBox &a_N, const Box &a_box) const =0 |
computes integral of N over each face of a_box More... | |
virtual void | getAvgJ (FArrayBox &a_avgJ, const Box &a_box) const =0 |
computes cell-averaged J More... | |
virtual void | getAvgJinverse (FluxBox &a_avgJinverse, const Box &a_box) const =0 |
computes face-averaged 1/J More... | |
virtual Real | pointwiseJ (const RealVect &a_Xi) const =0 |
Jacobian evaluated at location Xi in mapped 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 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 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 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 | 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 | 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 | 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 | 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 const RealVect & | dx () const =0 |
access function to simplify things – returns mapped-space cell spacing More... | |
virtual void | setTime (const Real &a_time) const |
Set time for moving grids. More... | |
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 More... | |
Protected Attributes | |
Real | m_time |
Const is already well entrenched. More... | |
Virtual base class encapsulating mapped-grid coordinate systems.
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.
|
inline |
default constructor
|
inlinevirtual |
Destructor.
References centerMappedCoordinates(), dXdXi(), getCenterMappedCoordinates(), getNcomponent(), getNodeRealCoordinates(), getNumN(), mappedCoord(), and realCoord().
given coordinate in mapped space, return its location in real space
Implemented in CubedSphereShellPanelCS, NewFourthOrderCoordSys, SchwarzChristoffelRampCS, CubedSphereSolidBlockCS, CubedSphere2DPanelCS, RThetaPhiCS, CartesianBlockRotateCS, XPointBlockCoordSys, WarpedCS, CartesianBlockCS, CylinderEquiangularBlockCS, CylinderSpokesBlockCS, CartesianCS, AnalyticCS, TwistedCS, and RThetaZCS.
Referenced by ~NewCoordSys().
given coordinate in real space, return its location in the mapped space
Implemented in CubedSphereShellPanelCS, NewFourthOrderCoordSys, SchwarzChristoffelRampCS, CubedSphereSolidBlockCS, CubedSphere2DPanelCS, XPointBlockCoordSys, RThetaPhiCS, CartesianBlockRotateCS, WarpedCS, CartesianBlockCS, CylinderEquiangularBlockCS, CylinderSpokesBlockCS, CartesianCS, AnalyticCS, TwistedCS, and RThetaZCS.
Referenced by ~NewCoordSys().
|
virtual |
given coordinates in mapped space, return locations in real space
Reimplemented in CubedSphereShellPanelCS, NewFourthOrderCoordSys, and CubedSphere2DPanelCS.
|
virtual |
given coordinate in real space, return its location in the mapped space
Reimplemented in NewFourthOrderCoordSys.
|
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.
Referenced by ~NewCoordSys().
given indices, return centers of cells in mapped coordinates
Referenced by ~NewCoordSys().
|
pure virtual |
return Cartesian XYZ locations of nodes
nodeCoords should have dimension returned by dimension()
Implemented in CubedSphereShellPanelCS, NewFourthOrderCoordSys, and CubedSphere2DPanelCS.
Referenced by ~NewCoordSys().
|
pure virtual |
note that a_Xi is in mapped space.
Implemented in CubedSphereShellPanelCS, NewFourthOrderCoordSys, CubedSphere2DPanelCS, SchwarzChristoffelRampCS, CubedSphereSolidBlockCS, XPointBlockCoordSys, RThetaPhiCS, CartesianBlockRotateCS, WarpedCS, CartesianBlockCS, CylinderEquiangularBlockCS, CylinderSpokesBlockCS, CartesianCS, TwistedCS, AnalyticCS, and RThetaZCS.
Referenced by ~NewCoordSys().
|
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.
|
pure virtual |
returns number of components in the metric term matrix (N)
Implemented in NewFourthOrderCoordSys.
Referenced by ~NewCoordSys().
|
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.
Referenced by ~NewCoordSys().
|
inlinevirtual |
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 CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
References cellVol(), computeDivergence(), computeMetricTermProductAverage(), dx(), getAvgJ(), getAvgJinverse(), getN(), pointwiseJ(), setTime(), SpaceDim, vectorTransformationMappedToReal(), vectorTransformationMappedToRealCenter(), vectorTransformationRealToMapped(), vectorTransformationRealToMappedCenter(), vectorTransformInternalAvgFab(), vectorTransformMappedToRealAvgFab(), vectorTransformMappedToRealCenterFab(), vectorTransformRealToMappedAvgFab(), and vectorTransformRealToMappedCenterFab().
|
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 NewFourthOrderCoordSys, CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
computes integral of N over each face of a_box
Implemented in NewFourthOrderCoordSys, CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
computes cell-averaged J
Implemented in NewFourthOrderCoordSys, CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
|
pure virtual |
computes face-averaged 1/J
Implemented in NewFourthOrderCoordSys, CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
Jacobian evaluated at location Xi in mapped space.
Implemented in NewFourthOrderCoordSys, CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
|
virtual |
Jacobian evaluated at locations Xi in mapped space.
Reimplemented in NewFourthOrderCoordSys, CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
|
virtual |
returns integral of divergence over mapped-grid cells
Reimplemented in CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
|
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.
Referenced by dimension().
|
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 |
return matrix that transforms vector components from mapped space to real space at point a_Xi in mapped space
Referenced by dimension().
|
virtual |
return matrix that transforms vector components from real space to mapped space at point a_Xi in mapped space
Referenced by dimension().
|
virtual |
return matrix that transforms vector components from mapped space to real space at center of cell a_iv
Referenced by dimension().
|
virtual |
return matrix that transforms vector components from real space to mapped space at center of cell a_iv
Referenced by dimension().
|
virtual |
transform a FAB of SpaceDim-vectors from mapped-coordinate basis to real-coordinate basis at cell centers
Reimplemented in CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
|
virtual |
transform a FAB of SpaceDim-vectors from mapped-coordinate basis to real-coordinate basis, averaged over cells
Referenced by dimension().
|
virtual |
transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis at cell centers
Reimplemented in CubedSphereShellPanelCS, and CubedSphere2DPanelCS.
Referenced by dimension().
|
virtual |
transform a FAB of SpaceDim-vectors from real-coordinate basis to mapped-coordinate basis, averaged over cells
Referenced by dimension().
|
pure virtual |
access function to simplify things – returns mapped-space cell spacing
Implemented in NewFourthOrderCoordSys.
Referenced by dimension().
|
inlinevirtual |
|
protectedvirtual |
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
Referenced by dimension().
|
mutableprotected |
Const is already well entrenched.
Referenced by setTime().