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