Chombo + EB + MF
3.2
src
HOMappedGeometry
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
*/
24
class
TwistedCS
:
public
NewFourthOrderCoordSys
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
50
Real
m_R
;
51
52
// Amount of twist in the grid
53
Real
m_theta
;
54
55
// convenience
56
Real
m_Pi
;
57
Real
m_scale
;
58
59
};
60
61
62
/// factory for TwistedCS
63
/**
64
*/
65
class
66
TwistedCSFactory
:
public
NewCoordSysFactory
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
///
81
Real
m_R
;
82
Real
m_twist
;
83
};
84
85
#include "NamespaceFooter.H"
86
87
#endif
TwistedCS::dXdXi
virtual Real dXdXi(const RealVect &a_Xi, int a_dirX, int a_dirXi) const
note that a_Xi is in mapped space.
ProblemDomain
A class to facilitate interaction with physical boundary conditions.
Definition:
ProblemDomain.H:141
TwistedCS::TwistedCS
TwistedCS(const RealVect &a_dX, const Real &a_R, const Real &a_twist)
constructor
TwistedCS::realCoord
RealVect realCoord(const RealVect &a_Xi) const
given coordinate in mapped space, return its location in real space
NewFourthOrderCoordSys
Virtual base class encapsulating mapped-grid coordinate systems.
Definition:
NewFourthOrderCoordSys.H:77
TwistedCSFactory::m_twist
Real m_twist
Definition:
TwistedCS.H:82
TwistedCS::m_theta
Real m_theta
Definition:
TwistedCS.H:53
TwistedCS::~TwistedCS
virtual ~TwistedCS()
NewCoordSysFactory
pure-virtual base class defining factory interface for CoordSys
Definition:
NewCoordSys.H:236
Real
double Real
Definition:
REAL.H:33
NewFourthOrderCoordSys.H
TwistedCS::m_R
Real m_R
Definition:
TwistedCS.H:50
RealVect
A Real vector in SpaceDim-dimensional space.
Definition:
RealVect.H:41
TwistedCS::m_scale
Real m_scale
Definition:
TwistedCS.H:57
TwistedCS::mappedCoord
RealVect mappedCoord(const RealVect &a_x) const
given coordinate in real space, return its location in the mapped space
TwistedCSFactory::m_R
Real m_R
Definition:
TwistedCS.H:81
TwistedCSFactory
factory for TwistedCS
Definition:
TwistedCS.H:65
TwistedCS
Definition:
TwistedCS.H:24
NewCoordSys
Virtual base class encapsulating mapped-grid coordinate systems.
Definition:
NewCoordSys.H:30
TwistedCS::m_Pi
Real m_Pi
Definition:
TwistedCS.H:56
Generated by
1.8.13