Chombo + EB + MF  3.2
CartesianCS.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 _CARTESIANCS_H_
12 #define _CARTESIANCS_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:
28  {
29  }
30 
31  /// constructor
32  CartesianCS(const RealVect& a_dX,
33  const RealVect& a_origin = RealVect::Zero,
34  const RealVect& a_stretch = RealVect::Unit);
35 
36  /**
37  Destructor.
38  */
39  virtual ~CartesianCS();
40 
41  /// given coordinate in mapped space, return its location in real space
42  RealVect realCoord(const RealVect& a_X) const;
43 
44  /// given coordinate in real space, return its location in the mapped space
45  RealVect mappedCoord(const RealVect& a_x) const;
46 
47  // Calculate the derivative of each coordinate vector
48  virtual Real dXdXi(const RealVect& a_Xi, int a_dirX, int a_dirXi) const;
49 
50 protected:
51  // Allow for translations
53  // allows for stretched Cartesian grids
55 
56 };
57 
58 
59 /// factory for CartesianCS
60 /**
61  */
62 class
64 {
65 
66 public:
67  /// constructor
68  CartesianCSFactory(const RealVect& a_origin = RealVect::Zero,
69  const RealVect& a_stretch = RealVect::Unit);
70 
71  ///
72  virtual NewCoordSys* getCoordSys(const ProblemDomain& a_domain,
73  const RealVect& a_dx) const;
74 
75 protected:
76 
77  ///
79  ///
81 };
82 
83 
84 #include "NamespaceFooter.H"
85 
86 #endif
RealVect m_origin
Definition: CartesianCS.H:78
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
RealVect m_stretch
Definition: CartesianCS.H:80
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewFourthOrderCoordSys.H:77
RealVect m_stretch
Definition: CartesianCS.H:54
CartesianCS()
Definition: CartesianCS.H:27
RealVect m_origin
Definition: CartesianCS.H:52
factory for CartesianCS
Definition: CartesianCS.H:62
static const RealVect Unit
Definition: RealVect.H:427
virtual ~CartesianCS()
static const RealVect Zero
Definition: RealVect.H:421
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
pure-virtual base class defining factory interface for CoordSys
Definition: NewCoordSys.H:236
double Real
Definition: REAL.H:33
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
RealVect realCoord(const RealVect &a_X) const
given coordinate in mapped space, return its location in real space
Basic (possibly stretched) Cartesian fourth-order oordinate system.
Definition: CartesianCS.H:24
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewCoordSys.H:30
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.