Chombo + EB + MF  3.2
CartesianBlockRotateCS.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 _CARTESIANBLOCKROTATECS_H_
12 #define _CARTESIANBLOCKROTATECS_H_
13 
14 // #include <utility>
15 // using std::pair;
16 
17 #include "NewFourthOrderCoordSys.H"
18 #include "IndicesTransformation.H"
19 #include "VectorTransformation.H"
20 
21 #include "NamespaceHeader.H"
22 
23 /// Single Cartesian block
24 /**
25  The CartesianBlockRotateCS class implements the
26  NewFourthOrderCoordSys class for a cartesian block.
27 */
29 {
30 public:
31  /// constructor
32  /**
33  a_blockNum: block number
34  a_dx: cell spacing
35  a_baseCell: index of bottom-left corner of this block in mapped space.
36  */
37  CartesianBlockRotateCS(int a_blockNum,
38  const IntVect& a_blockIndex,
39  const RealVect& a_dx,
40  const Box& a_blockBox,
41  IntVect a_perm = IntVect(D_DECL6(0,1,2,3,4,5)),
42  IntVect a_sign = IntVect::Unit);
43 
44  /**
45  Destructor.
46  */
47  virtual ~CartesianBlockRotateCS();
48 
49  /// given coordinate in mapped space, return its location in real space
50  RealVect realCoord(const RealVect& a_Xi) const;
51 
52  /// given coordinate in real space, return its location in the mapped space
53  RealVect mappedCoord(const RealVect& a_x) const;
54 
55  // Calculate the derivative of each coordinate vector
56  virtual Real dXdXi(const RealVect& a_Xi, int a_dirX, int a_dirXi) const;
57 
58  virtual void volFlux(FluxBox& a_volFlux,
59  const FluxBox& a_Nt,
60  const Box& a_box) const;
61 
62  // From mapped space to rotated mapped space.
63  RealVect rotateFwd(const RealVect& a_xi) const;
64 
65  // From rotated mapped space back to mapped space.
66  RealVect rotateBack(const RealVect& a_xi) const;
67 
68  // accessor
70  { return m_vecTransform; }
71 
72 protected:
73 
74  // Block id (this object has different behaviour depending on the number)
76 
77  // Block index in [0:1]^D
79 
80  // Box containing the block
82 
83  // permutation of this block
85 
86  // signs of this block
88 
89  // shift of center of block
91 
92  // transformation from mapped space to rotated mapped space
94 };
95 
96 #include "NamespaceFooter.H"
97 
98 #endif // include guard
#define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39
IntVect m_perm
Definition: CartesianBlockRotateCS.H:84
VectorTransformation m_vecTransform
Definition: CartesianBlockRotateCS.H:93
IntVect m_sign
Definition: CartesianBlockRotateCS.H:87
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewFourthOrderCoordSys.H:77
int m_blockNum
Definition: CartesianBlockRotateCS.H:75
Class to describe transformation of SpaceDim-vectors, typically from one block to another...
Definition: VectorTransformation.H:23
IntVect m_blockIndex
Definition: CartesianBlockRotateCS.H:78
RealVect rotateFwd(const RealVect &a_xi) const
RealVect realCoord(const RealVect &a_Xi) const
given coordinate in mapped space, return its location in real space
A FArrayBox-like container for face-centered fluxes.
Definition: FluxBox.H:22
RealVect rotateBack(const RealVect &a_xi) const
virtual void volFlux(FluxBox &a_volFlux, const FluxBox &a_Nt, const Box &a_box) const
computes the volume flux on the faces
static const IntVect Unit
Definition: IntVect.H:663
double Real
Definition: REAL.H:33
RealVect m_blockCenter
Definition: CartesianBlockRotateCS.H:90
Box m_blockBox
Definition: CartesianBlockRotateCS.H:81
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
CartesianBlockRotateCS(int a_blockNum, const IntVect &a_blockIndex, const RealVect &a_dx, const Box &a_blockBox, IntVect a_perm=IntVect(D_DECL6(0, 1, 2, 3, 4, 5)), IntVect a_sign=IntVect::Unit)
constructor
Single Cartesian block.
Definition: CartesianBlockRotateCS.H:28
VectorTransformation vecTransform() const
Definition: CartesianBlockRotateCS.H:69
virtual ~CartesianBlockRotateCS()