Chombo + EB + MF  3.2
TwistedCS.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 _TWISTEDCS_H_
12 #define _TWISTEDCS_H_
13 
14 #include "NewFourthOrderCoordSys.H"
15 
16 
17 #include "NamespaceHeader.H"
18 
19 
20 /// Calhoun-Leveque "twisted" Coordinate mapping (constant Jacobian)
21 ///
22 /**
23 */
25 {
26 public:
27  /// constructor
28  TwistedCS(const RealVect& a_dX,
29  const Real& a_R,
30  const Real& a_twist);
31 
32  /**
33  Destructor.
34  */
35  virtual ~TwistedCS();
36 
37  /// given coordinate in mapped space, return its location in real space
38  RealVect realCoord(const RealVect& a_Xi) const;
39 
40  /// given coordinate in real space, return its location in the mapped space
41  RealVect mappedCoord(const RealVect& a_x) const;
42 
43  // Calculate the derivative of each coordinate vector
44  virtual Real dXdXi(const RealVect& a_Xi, int a_dirX, int a_dirXi) const;
45 
46 
47 protected:
48 
49  // radius for n-sphere of twisted grid
51 
52  // Amount of twist in the grid
54 
55  // convenience
58 
59 };
60 
61 
62 /// factory for TwistedCS
63 /**
64  */
65 class
67 {
68 
69 public:
70  /// constructor
71  TwistedCSFactory(const Real& a_R,
72  const Real& a_twist);
73 
74  ///
75  virtual NewCoordSys* getCoordSys(const ProblemDomain& a_domain,
76  const RealVect& a_dx) const;
77 
78 protected:
79 
80  ///
83 };
84 
85 #include "NamespaceFooter.H"
86 
87 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
TwistedCS(const RealVect &a_dX, const Real &a_R, const Real &a_twist)
constructor
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewFourthOrderCoordSys.H:77
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
Real m_twist
Definition: TwistedCS.H:82
RealVect realCoord(const RealVect &a_Xi) const
given coordinate in mapped space, return its location in real space
Real m_theta
Definition: TwistedCS.H:53
virtual ~TwistedCS()
pure-virtual base class defining factory interface for CoordSys
Definition: NewCoordSys.H:236
double Real
Definition: REAL.H:33
Real m_R
Definition: TwistedCS.H:50
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Real m_scale
Definition: TwistedCS.H:57
Real m_R
Definition: TwistedCS.H:81
factory for TwistedCS
Definition: TwistedCS.H:65
Definition: TwistedCS.H:24
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewCoordSys.H:30
Real m_Pi
Definition: TwistedCS.H:56