Chombo + EB + MF  3.2
MultiCartesianCS.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 // MultiCartesianCS.H
12 // petermc, 25 Jul 2016
13 
14 #ifndef _MULTICARTESIANCS_H_
15 #define _MULTICARTESIANCS_H_
16 
17 #include "MultiBlockCoordSys.H"
18 #include "NamespaceHeader.H"
19 
20 /// MultiBlockCoordSys consisting of rectangular array of boxes, with Cartesian mapping in each
22 {
23 public:
24 
25  /**
26  \name Constructors, destructor and defines
27  */
28  /*@{*/
29 
30  ///
31  /** Default constructor.
32  */
34 
35  ///
36  /** Constructor.
37  */
38  MultiCartesianCS(IntVect a_count,
39  IntVect a_wraparound);
40 
41  ///
42  /** Destructor.
43  */
44  virtual ~MultiCartesianCS();
45 
46  virtual void define(const ProblemDomain& a_levelDomain,
47  const RealVect& a_dx);
48 
49  /*@}*/
50 
51  /// block mapping conversion function
52  /** given xi_k in block k, returns which block (k_valid)
53  contains that location in its valid region and its
54  location in that block's computational coordinate space.
55  */
56  virtual void blockRemapping(RealVect& a_xi_valid,
57  int& a_n_valid,
58  const RealVect& a_xiSrc,
59  int a_nSrc) const;
60 
61  virtual Vector<RealVect> displacements(const Vector<RealVect>& a_dstCoords,
62  const Vector<int>& a_dstBlocks,
63  const RealVect& a_srcCoords,
64  int a_srcBlock) const;
65 
66 protected:
67 
69 
71 
73 
74  // number of cells in m_blockIndicesBox
76 
77  // lives on m_blockIndicesBox; entry is the block index
79 
81 
82  // define m_boundaries
83  void defineBoundaries();
84 
85 private:
86 
88  {
89  }
90 
92  {
93  }
94 };
95 
96 
98 {
99 
100 public:
101 
103  {
106  }
107 
109  {
110  }
111 
112  virtual MultiBlockCoordSys* getCoordSys(const ProblemDomain& a_levelDomain,
113  const RealVect& a_dx) const;
114 
115  void setCount(const IntVect& a_count)
116  {
117  m_count = a_count;
118  }
119 
120  void setWraparound(const IntVect& a_wraparound)
121  {
122  m_wraparound = a_wraparound;
123  }
124 
125 protected:
126 
128 
130 };
131 
132 #include "NamespaceFooter.H"
133 
134 #endif
IntVect m_count
Definition: MultiCartesianCS.H:127
virtual ~MultiCartesianCS()
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
virtual void blockRemapping(RealVect &a_xi_valid, int &a_n_valid, const RealVect &a_xiSrc, int a_nSrc) const
block mapping conversion function
MultiCartesianCSFactory()
Definition: MultiCartesianCS.H:102
IntVect m_wraparound
Definition: MultiCartesianCS.H:129
int m_numBlocks
Definition: MultiCartesianCS.H:75
void setWraparound(const IntVect &a_wraparound)
Definition: MultiCartesianCS.H:120
IntVect m_count
Definition: MultiCartesianCS.H:68
virtual void define(const ProblemDomain &a_levelDomain, const RealVect &a_dx)
void operator=(const MultiCartesianCS &)
Definition: MultiCartesianCS.H:87
BaseFab< int > m_blockIndices
Definition: MultiCartesianCS.H:78
Box m_blockIndicesBox
Definition: MultiCartesianCS.H:72
MultiCartesianCS(const MultiCartesianCS &)
Definition: MultiCartesianCS.H:91
static const IntVect Unit
Definition: IntVect.H:663
void defineBoundaries()
Vector< IntVect > m_origin
Definition: MultiCartesianCS.H:80
virtual ~MultiCartesianCSFactory()
Definition: MultiCartesianCS.H:108
virtual Vector< RealVect > displacements(const Vector< RealVect > &a_dstCoords, const Vector< int > &a_dstBlocks, const RealVect &a_srcCoords, int a_srcBlock) const
return displacements
IntVect m_wraparound
Definition: MultiCartesianCS.H:70
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
static const IntVect Zero
Definition: IntVect.H:658
Definition: MultiCartesianCS.H:97
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
void setCount(const IntVect &a_count)
Definition: MultiCartesianCS.H:115
MultiBlockCoordSys consisting of rectangular array of boxes, with Cartesian mapping in each...
Definition: MultiCartesianCS.H:21
virtual MultiBlockCoordSys * getCoordSys(const ProblemDomain &a_levelDomain, const RealVect &a_dx) const
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
pure-virtual base class defining factory interface for MultiBlockCoordSys
Definition: MultiBlockCoordSys.H:409