Chombo + EB + MF  3.2
CartesianBlockCS.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 _CARTESIANBLOCKCS_H_
12 #define _CARTESIANBLOCKCS_H_
13 
14 // #include <utility>
15 // using std::pair;
16 
17 #include "NewFourthOrderCoordSys.H"
18 
19 #include "NamespaceHeader.H"
20 
21 /// Single Cartesian block
22 /**
23  The CartesianBlockCS class implements the
24  NewFourthOrderCoordSys class for a cartesian block.
25 */
27 {
28 public:
29  /// constructor
30  /**
31  a_blockNum: block number
32  a_dx: cell spacing
33  a_baseCell: index of bottom-left corner of this block in mapped space.
34  */
35  CartesianBlockCS(int a_blockNum,
36  const IntVect& a_blockIndex,
37  const RealVect& a_dx,
38  const Box& a_blockBox);
39 
40  /**
41  Destructor.
42  */
43  virtual ~CartesianBlockCS();
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  virtual void volFlux(FluxBox& a_volFlux,
55  const FluxBox& a_Nt,
56  const Box& a_box) const;
57 
58 protected:
59 
60  // Block id (this object has different behaviour depending on the number)
62 
63  // Block index in [0:1]^D for DoubleCartesian, 0:count-1 generally
65 
66  // Box containing the block in mapped space (where blocks are separated)
68 };
69 
70 #include "NamespaceFooter.H"
71 
72 #endif // include guard
RealVect realCoord(const RealVect &a_Xi) const
given coordinate in mapped space, return its location in real space
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewFourthOrderCoordSys.H:77
virtual void volFlux(FluxBox &a_volFlux, const FluxBox &a_Nt, const Box &a_box) const
computes the volume flux on the faces
A FArrayBox-like container for face-centered fluxes.
Definition: FluxBox.H:22
virtual ~CartesianBlockCS()
Single Cartesian block.
Definition: CartesianBlockCS.H:26
Box m_blockBox
Definition: CartesianBlockCS.H:67
double Real
Definition: REAL.H:33
IntVect m_blockIndex
Definition: CartesianBlockCS.H:64
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
int m_blockNum
Definition: CartesianBlockCS.H:61
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.
CartesianBlockCS(int a_blockNum, const IntVect &a_blockIndex, const RealVect &a_dx, const Box &a_blockBox)
constructor