#include <NewFourthOrderCoordSys.H>

The NewFourthOrderCoordSys class is a pure-virtual base class an API for performing operations in a mapped grid coordinate space. Implementations of specific coordinate systems will be provided by derived classes.
The following pure virtual functions of NewCoordSys are defined in NewFourthOrderCoordSys.cpp :
virtual void getNodeRealCoordinates(FArrayBox& a_nodeCoords, const Box& a_box) const; calls virtual RealVect realCoord(const RealVect& a_Xi) const = 0;
virtual int getNumN() const { return SpaceDim*SpaceDim; }
virtual int getNcomponent(const int a_row, const int a_col) const {return (SpaceDim*a_col) + a_row;}
virtual void cellVol(FArrayBox& a_vol, const FluxBox& a_N, const Box& a_box) const; calls virtual RealVect realCoord(const RealVect& a_Xi) const = 0 on corners, then calls fourthOrderAverageFace and computeDivergence.
virtual void getN(FluxBox& a_N, const Box& a_box) const;
virtual void getAvgJ(FArrayBox& a_avgJ, const Box& a_box) const; calls cellVol.
virtual void getAvgJinverse(FluxBox& a_avgJinverse, const Box& a_box) const;
virtual void pointwiseJ(FArrayBox& a_J, const FArrayBox& a_Xi, const Box& a_box) const; calls dXdXi.
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;
virtual const RealVect& dx() const { return m_dx; }
Public Member Functions | |
| NewFourthOrderCoordSys () | |
| default constructor | |
| virtual | ~NewFourthOrderCoordSys () |
| 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 | getNodeRealCoordinates (FArrayBox &a_nodeCoords, const Box &a_box) const |
| 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_X is in mapped space. | |
| virtual int | getNumN () const |
| returns number of components in the metric term matrix (N) | |
| virtual int | getNcomponent (const int a_row, const int a_col) const |
| index function into face-centered metric terms | |
| virtual void | volFlux (FluxBox &a_volFlux, const FluxBox &a_Nt, const Box &a_box) const |
| computes the volume flux on the faces | |
| virtual void | cellVol (FArrayBox &a_vol, const FluxBox &a_N, const Box &a_box) const |
| computes cell volumes | |
| virtual void | getN (FluxBox &a_N, const Box &a_box) const |
| computes integral of N over each face of a_box | |
| virtual void | getAvgJ (FArrayBox &a_avgJ, const FluxBox &a_volFlux, const Box &a_box) const |
| computes cell-averaged J | |
| virtual void | getAvgJ (FArrayBox &a_avgJ, const Box &a_box) const |
| computes cell-averaged J | |
| virtual void | getAvgJinverse (FluxBox &a_avgJinverse, const Box &a_box) const |
| computes cell-averaged 1/J | |
| 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 | |
| virtual Real | pointwiseJ (const RealVect &a_Xi) const |
| 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 | 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. | |
| 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 | |
| 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 | |
| void | magnitudeN (FluxBox &a_NMag, const FluxBox &a_N, const Box &a_box) const |
| Computes magnitude of <N^T> on each face. | |
| 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 | |
| virtual const RealVect & | dx () const |
| access function to simplify things -- returns mapped-space cell spacing | |
| 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. | |
| 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 | contravariantMetric (FArrayBox &a_metric, int a_dir) const |
| return row a_idir of contravariant metric | |
| 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 | |
| virtual void | orthonormalize (FArrayBox &a_fluxFab, const Interval &a_vectorIntv) const |
| overwrite vector components (in a_vectorIntv) of a_fluxFab with orthonormalized | |
| 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 (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 | |
| virtual void | deorthonormalize (FArrayBox &a_fluxFab, const Interval &a_vectorIntv) const |
| overwrite vector components (in a_vectorIntv) of a_fluxFab with deorthonormalized | |
| 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 | |
Protected Attributes | |
| RealVect | m_dx |
| Interval | m_volInterval |
| EdgeQuadrature * | m_quadraturePtr |
| NewFourthOrderCoordSys::NewFourthOrderCoordSys | ( | ) |
default constructor
| virtual NewFourthOrderCoordSys::~NewFourthOrderCoordSys | ( | ) | [virtual] |
Destructor.
given coordinate in mapped space, return its location in real space
Implements NewCoordSys.
Implemented in AnalyticCS, CartesianBlockCS, CartesianCS, CubedSphere2DPanelCS, CubedSphereShellPanelCS, CylinderEquiangularBlockCS, RThetaPhiCS, RThetaZCS, SchwarzChristoffelRampCS, TwistedCS, WarpedCS, and XPointBlockCoordSys.
given coordinate in real space, return its location in the mapped space
Implements NewCoordSys.
Implemented in AnalyticCS, CartesianBlockCS, CartesianCS, CubedSphere2DPanelCS, CubedSphereShellPanelCS, CylinderEquiangularBlockCS, RThetaPhiCS, RThetaZCS, SchwarzChristoffelRampCS, TwistedCS, WarpedCS, and XPointBlockCoordSys.
| virtual void NewFourthOrderCoordSys::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 NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::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 from NewCoordSys.
| virtual void NewFourthOrderCoordSys::getNodeRealCoordinates | ( | FArrayBox & | a_nodeCoords, | |
| const Box & | a_box | |||
| ) | const [virtual] |
return Cartesian XYZ locations of nodes
nodeCoords should have dimension returned by dimension()
Implements NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual Real NewFourthOrderCoordSys::dXdXi | ( | const RealVect & | a_Xi, | |
| int | a_dirX, | |||
| int | a_dirXi | |||
| ) | const [pure virtual] |
note that a_Xi is in mapped space.
Implements NewCoordSys.
Implemented in AnalyticCS, CartesianBlockCS, CartesianCS, CubedSphere2DPanelCS, CubedSphereShellPanelCS, CylinderEquiangularBlockCS, RThetaPhiCS, RThetaZCS, SchwarzChristoffelRampCS, TwistedCS, WarpedCS, and XPointBlockCoordSys.
| virtual void NewFourthOrderCoordSys::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_X is in mapped space.
fills the destComp component of a_dxdXi with the derivative of x w/ respect to Xi in the dirX direction (default implementation is there in case derived class doesn't provide it)
Reimplemented from NewCoordSys.
Reimplemented in XPointBlockCoordSys.
| virtual int NewFourthOrderCoordSys::getNumN | ( | ) | const [inline, virtual] |
returns number of components in the metric term matrix (N)
Implements NewCoordSys.
References SpaceDim.
| virtual int NewFourthOrderCoordSys::getNcomponent | ( | const int | a_row, | |
| const int | a_col | |||
| ) | const [inline, virtual] |
index function into face-centered metric terms
returns which component of the face-centered metric term in which N^row_col is stored.
is stored in column-major order (fortran).
is stored in row-major order (C).
and a row of
. Implements NewCoordSys.
References SpaceDim.
| virtual void NewFourthOrderCoordSys::volFlux | ( | FluxBox & | a_volFlux, | |
| const FluxBox & | a_Nt, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
computes the volume flux on the faces
Reimplemented in CartesianBlockCS, CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::cellVol | ( | FArrayBox & | a_vol, | |
| const FluxBox & | a_N, | |||
| const Box & | a_box | |||
| ) | const [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.
Implements NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
computes integral of N over each face of a_box
Implements NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::getAvgJ | ( | FArrayBox & | a_avgJ, | |
| const Box & | a_box | |||
| ) | const [virtual] |
computes cell-averaged J
Implements NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::getAvgJinverse | ( | FluxBox & | a_avgJinverse, | |
| const Box & | a_box | |||
| ) | const [virtual] |
computes cell-averaged 1/J
Implements NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::getAvgJinverse | ( | FluxBox & | a_avgJinverse, | |
| const FArrayBox & | a_avgJ, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
computes cell-averaged 1/J, using pre-computed cell-avg J
Jacobian evaluated at location Xi in mapped space.
Implements NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::pointwiseJ | ( | FArrayBox & | a_J, | |
| const FArrayBox & | a_Xi, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
Jacobian evaluated at locations Xi in mapped space.
Reimplemented from NewCoordSys.
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::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 [virtual] |
Computes 4th-order average of product = N^T*F. F can be a flux dyad.
| virtual void NewFourthOrderCoordSys::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 [virtual] |
computes 4th-order average of product = N^T*F. F is vector of a scalar
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.
Implements NewCoordSys.
| virtual void NewFourthOrderCoordSys::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. F is vector of a scalar
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 from NewCoordSys.
| void NewFourthOrderCoordSys::magnitudeN | ( | FluxBox & | a_NMag, | |
| const FluxBox & | a_N, | |||
| const Box & | a_box | |||
| ) | const |
Computes magnitude of <N^T> on each face.
| virtual void NewFourthOrderCoordSys::computeNJinverse | ( | FluxBox & | a_NJinverse, | |
| const FluxBox & | a_Jinverse, | |||
| const FluxBox & | a_N, | |||
| const Box & | a_cellBox | |||
| ) | const [virtual] |
given N and Jinverse, computes N/J
provided for convenience, since the multicomponent N/J product requires a bit of processing to work with the existing fourth-order multiplication function
| virtual const RealVect& NewFourthOrderCoordSys::dx | ( | ) | const [inline, virtual] |
access function to simplify things -- returns mapped-space cell spacing
Implements NewCoordSys.
References m_dx.
| virtual Real NewFourthOrderCoordSys::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 in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual Real NewFourthOrderCoordSys::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 in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::integrateScriptN | ( | FArrayBox & | a_scrN, | |
| const int | a_dir0, | |||
| const int | a_dir1, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
Integrates
on a specific set of codimension 2 hyperedges that are orthogonal to the given directions.
| virtual void NewFourthOrderCoordSys::incrementFaceMetricWithEdgeTerm | ( | FArrayBox & | a_faceMetrics, | |
| int | a_faceDir, | |||
| int | a_edgeDir, | |||
| const Box & | a_box, | |||
| const Side::LoHiSide & | a_side | |||
| ) | const [virtual] |
| virtual void NewFourthOrderCoordSys::computeTransverseFaceMetric | ( | FArrayBox & | a_faceMetrics, | |
| const Box & | a_box, | |||
| int | a_faceDir, | |||
| int | a_dDir | |||
| ) | const [virtual] |
| virtual void NewFourthOrderCoordSys::computeTangentialGrad | ( | FluxBox & | a_gradPhi, | |
| const FluxBox & | a_phiFace, | |||
| const Box & | a_box | |||
| ) | const [virtual] |
| virtual int NewFourthOrderCoordSys::tanGradComp | ( | const int | a_faceDir, | |
| const int | a_tanDir, | |||
| const int | a_comp | |||
| ) | const [virtual] |
| virtual void NewFourthOrderCoordSys::contravariantMetric | ( | FArrayBox & | a_metric, | |
| int | a_dir | |||
| ) | const [virtual] |
return row a_idir of contravariant metric
Reimplemented in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::orthonormalize | ( | FluxBox & | a_flux, | |
| const Interval & | a_vectorIntv | |||
| ) | const [virtual] |
convert vector components (in a_vectorIntv) of a_flux to orthonormal frame to that of this block
| virtual void NewFourthOrderCoordSys::orthonormalize | ( | FArrayBox & | a_fluxFab, | |
| const Interval & | a_vectorIntv | |||
| ) | const [virtual] |
overwrite vector components (in a_vectorIntv) of a_fluxFab with orthonormalized
| virtual void NewFourthOrderCoordSys::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 in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
| virtual void NewFourthOrderCoordSys::deorthonormalize | ( | FluxBox & | a_flux, | |
| const Interval & | a_vectorIntv | |||
| ) | const [virtual] |
convert vector components (in a_vectorIntv) of a_flux from orthonormal frame to that of this block
| virtual void NewFourthOrderCoordSys::deorthonormalize | ( | FArrayBox & | a_fluxFab, | |
| const Interval & | a_vectorIntv | |||
| ) | const [virtual] |
overwrite vector components (in a_vectorIntv) of a_fluxFab with deorthonormalized
| virtual void NewFourthOrderCoordSys::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 in CubedSphere2DPanelCS, and CubedSphereShellPanelCS.
RealVect NewFourthOrderCoordSys::m_dx [protected] |
Referenced by dx(), XPointBlockCoordSys::lowerMappedCoordinate(), and XPointBlockCoordSys::upperMappedCoordinate().
Interval NewFourthOrderCoordSys::m_volInterval [protected] |
EdgeQuadrature* NewFourthOrderCoordSys::m_quadraturePtr [protected] |
1.5.5