Chombo + EB + MF  3.2
CylinderCS.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 // CylinderCS.H
12 // petermc, 22 Apr 2010
13 
14 #ifndef _CYLINDERCS_H_
15 #define _CYLINDERCS_H_
16 
17 #include "MultiBlockCoordSys.H"
18 #include "NamespaceHeader.H"
19 
20 /// MultiBlockCoordSys with a central cubic box and four sectors.
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  */
35  CylinderCS();
36 
37  ///
38  /** Destructor.
39  */
40  virtual ~CylinderCS();
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  void setAllPhysical(const RealVect& a_centerPoint,
58  const RealVect& a_centralRectSize,
59  const Real& a_outerRadius);
60 
61  void setCenterPoint(const RealVect& a_centerPoint)
62  { m_centerPoint = a_centerPoint; }
63 
64  void setCentralRectSize(const RealVect& a_centralRectSize)
65  { m_centralRectSize = a_centralRectSize; }
66 
67  void setOuterRadius(Real a_outerRadius)
68  { m_outerRadius = a_outerRadius; }
69 
70 protected:
71 
72  const static int NUMBLOCKS = 5;
73 
74  const static int CENTRAL = 0;
75  const static int XPOS = 1;
76  const static int YPOS = 2;
77  const static int XNEG = 3;
78  const static int YNEG = 4;
79 
81 
83 
85 
87 
89 
90  // call only after m_centerPoint, m_centralRectSize, m_outerRadius
91  // have already been set.
92  void setFortranCommon();
93 
94  // define m_boundaries
95  void defineBoundaries();
96 
97 private:
98 
99  void operator = (const CylinderCS&)
100  {
101  }
102 
104  {
105  }
106 };
107 
108 
110 {
111 
112 public:
113 
115  {
116  }
117 
119  {
120  }
121 
122  virtual MultiBlockCoordSys* getCoordSys(const ProblemDomain& a_levelDomain,
123  const RealVect& a_dx) const = 0;
124 
125  void setCenterPoint(const RealVect& a_centerPoint)
126  { m_centerPoint = a_centerPoint; }
127 
128  void setCentralRectSize(const RealVect& a_centralRectSize)
129  { m_centralRectSize = a_centralRectSize; }
130 
131  void setOuterRadius(Real a_outerRadius)
132  { m_outerRadius = a_outerRadius; }
133 
134 protected:
135 
137 
139 
141 
142  virtual void setAllPhysical(CylinderCS* a_coordSysPtr) const;
143 };
144 
145 #include "NamespaceFooter.H"
146 
147 #endif
void setAllPhysical(const RealVect &a_centerPoint, const RealVect &a_centralRectSize, const Real &a_outerRadius)
Real m_outerRadius
Definition: CylinderCS.H:140
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
void setOuterRadius(Real a_outerRadius)
Definition: CylinderCS.H:67
Real m_outerRadius
Definition: CylinderCS.H:84
RealVect m_centralRectHi
Definition: CylinderCS.H:88
RealVect m_centralRectSize
Definition: CylinderCS.H:82
virtual void define(const ProblemDomain &a_levelDomain, const RealVect &a_dx)
void setCentralRectSize(const RealVect &a_centralRectSize)
Definition: CylinderCS.H:128
CylinderCS(const CylinderCS &)
Definition: CylinderCS.H:103
MultiBlockCoordSys with a central cubic box and four sectors.
Definition: CylinderCS.H:21
virtual ~CylinderCS()
static const int YNEG
Definition: CylinderCS.H:78
static const int CENTRAL
Definition: CylinderCS.H:74
void setCenterPoint(const RealVect &a_centerPoint)
Definition: CylinderCS.H:61
void setCenterPoint(const RealVect &a_centerPoint)
Definition: CylinderCS.H:125
RealVect m_centerPoint
Definition: CylinderCS.H:136
void setFortranCommon()
static const int XNEG
Definition: CylinderCS.H:77
double Real
Definition: REAL.H:33
static const int XPOS
Definition: CylinderCS.H:75
void setOuterRadius(Real a_outerRadius)
Definition: CylinderCS.H:131
RealVect m_centerPoint
Definition: CylinderCS.H:80
void defineBoundaries()
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
void setCentralRectSize(const RealVect &a_centralRectSize)
Definition: CylinderCS.H:64
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual void blockRemapping(RealVect &a_xi_valid, int &a_n_valid, const RealVect &a_xiSrc, int a_nSrc) const
block mapping conversion function
static const int NUMBLOCKS
Definition: CylinderCS.H:72
CylinderCSFactory()
Definition: CylinderCS.H:114
pure-virtual base class defining factory interface for MultiBlockCoordSys
Definition: MultiBlockCoordSys.H:409
static const int YPOS
Definition: CylinderCS.H:76
RealVect m_centralRectLo
Definition: CylinderCS.H:86
Definition: CylinderCS.H:109
RealVect m_centralRectSize
Definition: CylinderCS.H:138
void operator=(const CylinderCS &)
Definition: CylinderCS.H:99
virtual ~CylinderCSFactory()
Definition: CylinderCS.H:118