Chombo + EB + MF
3.2
src
HOMappedGeometry
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
*/
24
class
CartesianCS
:
public
NewFourthOrderCoordSys
25
{
26
public
:
27
CartesianCS
()
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
52
RealVect
m_origin
;
53
// allows for stretched Cartesian grids
54
RealVect
m_stretch
;
55
56
};
57
58
59
/// factory for CartesianCS
60
/**
61
*/
62
class
63
CartesianCSFactory
:
public
NewCoordSysFactory
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
///
78
RealVect
m_origin
;
79
///
80
RealVect
m_stretch
;
81
};
82
83
84
#include "NamespaceFooter.H"
85
86
#endif
CartesianCSFactory::m_origin
RealVect m_origin
Definition:
CartesianCS.H:78
ProblemDomain
A class to facilitate interaction with physical boundary conditions.
Definition:
ProblemDomain.H:141
CartesianCSFactory::m_stretch
RealVect m_stretch
Definition:
CartesianCS.H:80
NewFourthOrderCoordSys
Virtual base class encapsulating mapped-grid coordinate systems.
Definition:
NewFourthOrderCoordSys.H:77
CartesianCS::m_stretch
RealVect m_stretch
Definition:
CartesianCS.H:54
CartesianCS::CartesianCS
CartesianCS()
Definition:
CartesianCS.H:27
CartesianCS::m_origin
RealVect m_origin
Definition:
CartesianCS.H:52
CartesianCSFactory
factory for CartesianCS
Definition:
CartesianCS.H:62
RealVect::Unit
static const RealVect Unit
Definition:
RealVect.H:427
CartesianCS::~CartesianCS
virtual ~CartesianCS()
RealVect::Zero
static const RealVect Zero
Definition:
RealVect.H:421
CartesianCS::mappedCoord
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
NewCoordSysFactory
pure-virtual base class defining factory interface for CoordSys
Definition:
NewCoordSys.H:236
Real
double Real
Definition:
REAL.H:33
NewFourthOrderCoordSys.H
RealVect
A Real vector in SpaceDim-dimensional space.
Definition:
RealVect.H:41
CartesianCS::realCoord
RealVect realCoord(const RealVect &a_X) const
given coordinate in mapped space, return its location in real space
CartesianCS
Basic (possibly stretched) Cartesian fourth-order oordinate system.
Definition:
CartesianCS.H:24
NewCoordSys
Virtual base class encapsulating mapped-grid coordinate systems.
Definition:
NewCoordSys.H:30
CartesianCS::dXdXi
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.
Generated by
1.8.13