Chombo + EB + MF  3.2
DoubleCartesianCS.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 // DoubleCartesianCS.H
12 // petermc, 3 Sep 2010
13 
14 #ifndef _DOUBLECARTESIANCS_H_
15 #define _DOUBLECARTESIANCS_H_
16 
17 #include "MultiBlockCoordSys.H"
18 #include "NamespaceHeader.H"
19 
20 /// MultiBlockCoordSys consisting of two blocks in each dimension.
22 /** MultiBlockCoordSys with a central cubic box and four sectors.
23  */
24 {
25 public:
26 
27  /**
28  \name Constructors, destructor and defines
29  */
30  /*@{*/
31 
32  ///
33  /** Default constructor.
34  */
36 
37  ///
38  /** Destructor.
39  */
40  virtual ~DoubleCartesianCS();
41 
42  virtual void define(const ProblemDomain& a_levelDomain,
43  const RealVect& a_dx);
44 
45  /*@}*/
46 
47  /// block mapping conversion function
48  /** given xi_k in block k, returns which block (k_valid)
49  contains that location in its valid region and its
50  location in that block's computational coordinate space.
51  */
52  virtual void blockRemapping(RealVect& a_xi_valid,
53  int& a_n_valid,
54  const RealVect& a_xiSrc,
55  int a_nSrc) const;
56 
57  virtual Vector<RealVect> displacements(const Vector<RealVect>& a_dstCoords,
58  const Vector<int>& a_dstBlocks,
59  const RealVect& a_srcCoords,
60  int a_srcBlock) const;
61 
62  /// Have separate volume flux on each block. Normally does nothing, but double-cartesian coordinate system needs it.
63  virtual void separateVolFlux(LevelData<FluxBox>& a_flux) const;
64 
65 protected:
66 
67  const static int NUMBLOCKS = D_TERM6(2, *2, *2, *2, *2, *2);
68 
70 
72 
74 
75  // define m_boundaries
76  void defineBoundaries();
77 
78 private:
79 
81  {
82  }
83 
85  {
86  }
87 };
88 
89 
91 {
92 
93 public:
94 
96  {
97  }
98 
100  {
101  }
102 
103  virtual MultiBlockCoordSys* getCoordSys(const ProblemDomain& a_levelDomain,
104  const RealVect& a_dx) const;
105 };
106 
107 #include "NamespaceFooter.H"
108 
109 #endif
#define D_TERM6(a, b, c, d, e, f)
Definition: CHArray.H:40
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Tuple< IntVect, NUMBLOCKS > m_origin
Definition: DoubleCartesianCS.H:69
virtual void define(const ProblemDomain &a_levelDomain, const RealVect &a_dx)
DoubleCartesianCSFactory()
Definition: DoubleCartesianCS.H:95
virtual ~DoubleCartesianCS()
Box m_blockIndicesBox
Definition: DoubleCartesianCS.H:71
static const int NUMBLOCKS
Definition: DoubleCartesianCS.H:67
BaseFab< int > m_blockIndices
Definition: DoubleCartesianCS.H:73
virtual const NewCoordSys * getCoordSys(int a_n) const
Return the mapping which corresponds to the block with the given index.
Definition: MultiBlockCoordSys.H:250
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
Definition: DoubleCartesianCS.H:90
DoubleCartesianCS(const DoubleCartesianCS &)
Definition: DoubleCartesianCS.H:84
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual Vector< RealVect > displacements(const Vector< RealVect > &a_dstCoords, const Vector< int > &a_dstBlocks, const RealVect &a_srcCoords, int a_srcBlock) const
return displacements
virtual ~DoubleCartesianCSFactory()
Definition: DoubleCartesianCS.H:99
virtual void blockRemapping(RealVect &a_xi_valid, int &a_n_valid, const RealVect &a_xiSrc, int a_nSrc) const
block mapping conversion function
pure-virtual base class defining factory interface for MultiBlockCoordSys
Definition: MultiBlockCoordSys.H:409
virtual void separateVolFlux(LevelData< FluxBox > &a_flux) const
Have separate volume flux on each block. Normally does nothing, but double-cartesian coordinate syste...
void operator=(const DoubleCartesianCS &)
Definition: DoubleCartesianCS.H:80
MultiBlockCoordSys consisting of two blocks in each dimension.
Definition: DoubleCartesianCS.H:21