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

#include <XPointBlockCoordSys.H>

Inheritance diagram for XPointBlockCoordSys:
Inheritance graph
[legend]

Public Member Functions

 XPointBlockCoordSys (const RealVect &a_origin, const ProblemDomain &a_domain, const int a_block_type)
 Constructor. More...
 
virtual ~XPointBlockCoordSys ()
 Destructor. More...
 
virtual RealVect realCoord (const RealVect &xi) const
 Returns real coordinate. More...
 
virtual RealVect mappedCoord (const RealVect &x) const
 Returns computational coordinate. More...
 
virtual Real dXdXi (const RealVect &Xi, int dirX, int dirXi) const
 
void dXdXi (FArrayBox &dxdXi, const FArrayBox &Xi, int destComp, int dirX, int dirXi, const Box &box) const
 
virtual Real dX2dXi2 (const RealVect &Xi, int dirX, int dirXi0, int dirXi1) const
 
virtual void getRBpoloidal (const int dir, FArrayBox &RBpol, FArrayBox &dRBpoldt) const
 
virtual double getRBtoroidal () const
 
int blockType () const
 
IntVect domainSmallEnd () const
 
Real centralMajorRadius () const
 
virtual void computeFieldData (const int dir, FArrayBox &BField, FArrayBox &BFieldMag, FArrayBox &BFieldDirl, FArrayBox &gradBFieldMag, FArrayBox &curlBFieldDir, FArrayBox &BFieldDirdotcurlBFieldDir) const
 
Real lowerMappedCoordinate (int dir) const
 
Real upperMappedCoordinate (int dir) const
 
- Public Member Functions inherited from NewFourthOrderCoordSys
 NewFourthOrderCoordSys ()
 default constructor More...
 
virtual ~NewFourthOrderCoordSys ()
 
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 getNodeRealCoordinates (FArrayBox &a_nodeCoords, const Box &a_box) const
 return Cartesian XYZ locations of nodes 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 volFlux (FluxBox &a_volFlux, const FluxBox &a_Nt, const Box &a_box) const
 computes the volume flux on the faces More...
 
virtual void cellVol (FArrayBox &a_vol, const FluxBox &a_N, const Box &a_box) const
 computes cell volumes More...
 
virtual void getN (FluxBox &a_N, const Box &a_box) const
 computes integral of N over each face of a_box More...
 
virtual void getAvgJ (FArrayBox &a_avgJ, const FluxBox &a_volFlux, const Box &a_box) const
 computes cell-averaged J More...
 
virtual void getAvgJ (FArrayBox &a_avgJ, const Box &a_box) const
 computes cell-averaged J More...
 
virtual void getAvgJinverse (FluxBox &a_avgJinverse, const Box &a_box) const
 computes cell-averaged 1/J 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 Real pointwiseJ (const RealVect &a_Xi) const
 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 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 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...
 
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 More...
 
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 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 (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...
 
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...
 
- 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 int dimension () const
 returns dimensionality of the 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 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 void setTime (const Real &a_time) const
 Set time for moving grids. More...
 

Protected Attributes

ProblemDomain m_domain
 
Real m_mapped_cell_volume
 
RealVect m_mapped_face_area
 
int m_block_type
 
RealVect m_origin
 
Real m_alpha
 
- 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...
 

Constructor & Destructor Documentation

◆ XPointBlockCoordSys()

XPointBlockCoordSys::XPointBlockCoordSys ( const RealVect a_origin,
const ProblemDomain a_domain,
const int  a_block_type 
)

Constructor.

Constructor with initialization. Input data is read from the parm_parse object, the cellSpacing is computed and the define() member is called.

Parameters
[in]parm_parsethe ParmParse database.
[in]domainthe configuration space domain.
[in]ghostVectvector of ghost cells stored for mapping.

◆ ~XPointBlockCoordSys()

virtual XPointBlockCoordSys::~XPointBlockCoordSys ( )
virtual

Destructor.

Member Function Documentation

◆ realCoord()

virtual RealVect XPointBlockCoordSys::realCoord ( const RealVect xi) const
virtual

Returns real coordinate.

Returns location $x$ in real-world coordinates of mapped-coordinate location $\xi$.

Parameters
[in]ximapped grid coordinate.

Implements NewFourthOrderCoordSys.

◆ mappedCoord()

virtual RealVect XPointBlockCoordSys::mappedCoord ( const RealVect x) const
virtual

Returns computational coordinate.

Returns location $\xi$ in mapped coordinate space of real-world location $x$.

Parameters
[in]xphysical space coordinate.

Implements NewFourthOrderCoordSys.

◆ dXdXi() [1/2]

virtual Real XPointBlockCoordSys::dXdXi ( const RealVect Xi,
int  dirX,
int  dirXi 
) const
virtual

Returns the derivatives of the physical coordinates with respect to the computational coordinate. Returns the derivatives of the physical coordinates with respect to the computational coordinates at location $xi$.

Parameters
[in]ximapped coordinate.

Implements NewFourthOrderCoordSys.

◆ dXdXi() [2/2]

void XPointBlockCoordSys::dXdXi ( FArrayBox dxdXi,
const FArrayBox Xi,
int  destComp,
int  dirX,
int  dirXi,
const Box box 
) const
virtual

Fills the destComp component of a_dxdXi with the derivative of x w/ respect to Xi in the dirX direction Fills the destComp component of a_dxdXi with the derivative of x w/ respect to Xi in the dirX direction

Parameters
[in]Ximapped coordinates
[in]destCompdestination component
[in]dirXphysical coordinate to be differentiated
[in]dirXicomputational coordinate
[in]boxbox within which derivatives are computed
[out]dxdXioutput derivatives

Reimplemented from NewFourthOrderCoordSys.

◆ dX2dXi2()

virtual Real XPointBlockCoordSys::dX2dXi2 ( const RealVect Xi,
int  dirX,
int  dirXi0,
int  dirXi1 
) const
virtual

◆ getRBpoloidal()

virtual void XPointBlockCoordSys::getRBpoloidal ( const int  dir,
FArrayBox RBpol,
FArrayBox dRBpoldt 
) const
virtual

◆ getRBtoroidal()

virtual double XPointBlockCoordSys::getRBtoroidal ( ) const
inlinevirtual

◆ blockType()

int XPointBlockCoordSys::blockType ( ) const
inline

References m_block_type.

◆ domainSmallEnd()

IntVect XPointBlockCoordSys::domainSmallEnd ( ) const
inline

◆ centralMajorRadius()

Real XPointBlockCoordSys::centralMajorRadius ( ) const
inline

References m_origin.

◆ computeFieldData()

virtual void XPointBlockCoordSys::computeFieldData ( const int  dir,
FArrayBox BField,
FArrayBox BFieldMag,
FArrayBox BFieldDirl,
FArrayBox gradBFieldMag,
FArrayBox curlBFieldDir,
FArrayBox BFieldDirdotcurlBFieldDir 
) const
inlinevirtual

◆ lowerMappedCoordinate()

Real XPointBlockCoordSys::lowerMappedCoordinate ( int  dir) const
inline

◆ upperMappedCoordinate()

Real XPointBlockCoordSys::upperMappedCoordinate ( int  dir) const
inline

Member Data Documentation

◆ m_domain

ProblemDomain XPointBlockCoordSys::m_domain
protected

◆ m_mapped_cell_volume

Real XPointBlockCoordSys::m_mapped_cell_volume
protected

◆ m_mapped_face_area

RealVect XPointBlockCoordSys::m_mapped_face_area
protected

◆ m_block_type

int XPointBlockCoordSys::m_block_type
protected

Referenced by blockType().

◆ m_origin

RealVect XPointBlockCoordSys::m_origin
protected

Referenced by centralMajorRadius().

◆ m_alpha

Real XPointBlockCoordSys::m_alpha
protected

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