Chombo + EB + MF  3.2
CylinderSpokesBlockCS.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _CYLINDERSPOKESBLOCKCS_H_
12 #define _CYLINDERSPOKESBLOCKCS_H_
13 
14 // #include <utility>
15 // using std::pair;
16 
17 #include "NewFourthOrderCoordSys.H"
18 
19 #include "NamespaceHeader.H"
20 
21 /// Basic single-panel cubed sphere Coordinates
22 /**
23  The CylinderSpokesBlockCS class implements the
24  NewFourthOrderCoordSys class for cylindrical panels in equiangular
25  coordinates.
26 */
28 {
29 public:
30  /// constructor
31  /**
32  a_blockNum: block number
33  a_dx: cell spacing
34  a_baseCell: index of bottom-left corner of this block in mapped space.
35  */
36  CylinderSpokesBlockCS(int a_blockNum,
37  const RealVect& a_dx,
38  const Box& a_blockBox);
39 
40  /**
41  Destructor.
42  */
43  virtual ~CylinderSpokesBlockCS();
44 
45  /// given coordinate in mapped space, return its location in real space
46  RealVect realCoord(const RealVect& a_Xi) const;
47 
48  /// given coordinate in real space, return its location in the mapped space
49  RealVect mappedCoord(const RealVect& a_x) const;
50 
51  // Calculate the derivative of each coordinate vector
52  virtual Real dXdXi(const RealVect& a_Xi, int a_dirX, int a_dirXi) const;
53 
54 protected:
55 
56  const static int CENTRAL = 0;
57  const static int XPOS = 1;
58  const static int YPOS = 2;
59  const static int XNEG = 3;
60  const static int YNEG = 4;
61 
62  // Block id (this object has different behaviour depending on the number)
64 
65  // Box containing the block
67 
68  // coordinates of low corner in mapped space
70 
71  // index (0 or 1) of real variable in radial direction
72  int m_rCoord;
73 
74  // index (0 or 1) of real variable multiplied by a
75  int m_aCoord;
76 
77  // signs of real variables
79 };
80 
81 #include "NamespaceFooter.H"
82 
83 #endif // include guard
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.
virtual ~CylinderSpokesBlockCS()
CylinderSpokesBlockCS(int a_blockNum, const RealVect &a_dx, const Box &a_blockBox)
constructor
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewFourthOrderCoordSys.H:77
Box m_blockBox
Definition: CylinderSpokesBlockCS.H:66
int m_rCoord
Definition: CylinderSpokesBlockCS.H:72
static const int YNEG
Definition: CylinderSpokesBlockCS.H:60
int m_blockNum
Definition: CylinderSpokesBlockCS.H:63
static const int XNEG
Definition: CylinderSpokesBlockCS.H:59
int m_aCoord
Definition: CylinderSpokesBlockCS.H:75
static const int XPOS
Definition: CylinderSpokesBlockCS.H:57
static const int CENTRAL
Definition: CylinderSpokesBlockCS.H:56
double Real
Definition: REAL.H:33
static const int YPOS
Definition: CylinderSpokesBlockCS.H:58
RealVect m_mappedLo
Definition: CylinderSpokesBlockCS.H:69
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
RealVect m_signCoord
Definition: CylinderSpokesBlockCS.H:78
Basic single-panel cubed sphere Coordinates.
Definition: CylinderSpokesBlockCS.H:27
RealVect realCoord(const RealVect &a_Xi) const
given coordinate in mapped space, return its location in real space