Chombo + EB + MF  3.2
RThetaZCS.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 _RTHETAZCS_H_
12 #define _RTHETAZCS_H_
13 
14 #include "NewFourthOrderCoordSys.H"
15 
16 
17 #include "NamespaceHeader.H"
18 
19 /// Basic (possibly stretched) Cartesian fourth-order oordinate system
20 /**
21  The CartesianCS class implements the NewFourthOrderCoordSys class
22  for Cartesian mappings
23 */
25 {
26 public:
27  /// constructor
28  RThetaZCS(const RealVect& a_dX, const RealVect a_stretch = RealVect::Unit,
30 
31  /**
32  Destructor.
33  */
34  virtual ~RThetaZCS();
35 
36  /// given coordinate in mapped space, return its location in real space
37  RealVect realCoord(const RealVect& a_Xi) const;
38 
39  /// given coordinate in real space, return its location in the mapped space
40  RealVect mappedCoord(const RealVect& a_x) const;
41 
42  // Calculate the derivative of each coordinate vector
43  virtual Real dXdXi(const RealVect& a_Xi, int a_dirX, int a_dirXi) const;
44 
45 protected:
46  // allows for stretched Cartesian grids
48 
49  // allows for offsets (allows avoiding singularity at center)
51 
52  // convenience. It's always good to have some pi around
54 
55 };
56 
57 
58 /// factory for RThetaZCS
59 /**
60  */
61 class
63 {
64 
65 public:
66  /// constructor
67  RThetaZCSFactory(const RealVect& a_stretch = RealVect::Unit,
68  const RealVect& a_origin = RealVect::Zero);
69 
70  ///
71  virtual NewCoordSys* getCoordSys(const ProblemDomain& a_domain,
72  const RealVect& a_dx) const;
73 
74 protected:
75 
76  ///
78  ///
80 };
81 
82 #include "NamespaceFooter.H"
83 
84 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Basic (possibly stretched) Cartesian fourth-order oordinate system.
Definition: RThetaZCS.H:24
Real m_Pi
Definition: RThetaZCS.H:53
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewFourthOrderCoordSys.H:77
virtual ~RThetaZCS()
RealVect m_stretch
Definition: RThetaZCS.H:47
static const RealVect Unit
Definition: RealVect.H:427
RealVect m_origin
Definition: RThetaZCS.H:50
static const RealVect Zero
Definition: RealVect.H:421
RealVect m_stretch
Definition: RThetaZCS.H:77
pure-virtual base class defining factory interface for CoordSys
Definition: NewCoordSys.H:236
double Real
Definition: REAL.H:33
factory for RThetaZCS
Definition: RThetaZCS.H:61
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.
RealVect realCoord(const RealVect &a_Xi) const
given coordinate in mapped space, return its location in real space
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
RThetaZCS(const RealVect &a_dX, const RealVect a_stretch=RealVect::Unit, const RealVect &m_origin=RealVect::Zero)
constructor
RealVect m_origin
Definition: RThetaZCS.H:79
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewCoordSys.H:30