Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
DerivedFunctions.h
Go to the documentation of this file.
1
#ifndef DERIVED_FUNCTIONS_H
2
#define DERIVED_FUNCTIONS_H
3
4
#include "
ShowFileReader.h
"
5
#include "
GenericGraphicsInterface.h
"
6
7
// Derive new functions from old ones. This class is used by plotStuff to
8
// create derived quantities such as vorticity, mach-number, derivatives etc.
9
10
class
DerivedFunctions
11
{
12
public
:
13
14
enum
DerivedItems
15
{
16
vorticity
=0,
17
xVorticity
,
18
yVorticity
,
19
zVorticity
,
20
enstrophy
,
// || vorticity ||
21
divergence
,
22
machNumber
,
23
pressure
,
24
temperature
,
25
speed
,
26
entropy
,
27
schlieren
,
28
minimumScale
,
29
r1MinimumScale
,
30
r2MinimumScale
,
31
r3MinimumScale
,
32
r1Velocity
,
33
r2Velocity
,
34
r3Velocity
,
35
xDerivative
,
36
yDerivative
,
37
zDerivative
,
38
xxDerivative
,
39
yyDerivative
,
40
zzDerivative
,
41
laplaceDerivative
,
42
gradientNorm
,
43
cellVolume
,
44
minimumEdgeLength
,
45
logarithm
,
46
userDefined
,
47
// -- E&M variables
48
energyDensity
,
// E*E + H*H
49
eFieldNorm
,
// || E ||
50
hFieldNorm
,
// || H ||
51
// Solid mechanics
52
displacementNorm
,
53
stressNorm
,
54
numberOfDerivedItems
55
};
56
57
58
DerivedFunctions
(
ShowFileReader
&
showFileReader
);
59
DerivedFunctions
();
60
~DerivedFunctions
();
61
62
63
int
add
(
int
derivative,
const
aString
& name_,
int
n1=0,
int
n2=0 );
64
65
int
getASolution
(
int
& solutionNumber,
66
MappedGrid
& cg,
67
realMappedGridFunction
& u);
68
69
int
getASolution
(
int
& solutionNumber,
70
CompositeGrid
& cg,
71
realCompositeGridFunction
& u);
72
73
int
getDisplacementComponents
(
int
&u1c,
int
& u2c,
int
& u3c );
74
75
int
getVelocityComponents
(
int
&v1c,
int
& v2c,
int
& v3c );
76
77
int
getStressComponents
(
int
& s11c,
int
& s12c,
int
& s13c,
78
int
& s21c,
int
& s22c,
int
& s23c,
79
int
& s31c,
int
& s32c,
int
& s33c );
80
81
82
int
numberOfDerivedTypes
()
const
{
return
numberOfDerivedFunctions
; }
83
84
int
remove
(
int
i );
85
86
void
set
(
ShowFileReader
&
showFileReader
);
87
88
// A user can define new derived functions using these functions
89
int
setupUserDefinedDerivedFunction
(
GenericGraphicsInterface
& gi,
90
int
numberOfComponents,
91
aString
*componentNames );
92
93
int
getUserDefinedDerivedFunction
(
int
index,
94
int
indexOut,
95
const
aString
&
name
,
96
const
int
numberOfComponents,
97
realCompositeGridFunction
& uIn,
98
realCompositeGridFunction
& uOut,
99
bool
& interpolationRequired );
100
101
// update current list of derived grid functions
102
int
update
(
GenericGraphicsInterface
& gi,
103
int
numberOfComponents,
104
aString
*componentNames,
105
GraphicsParameters
*pgp=
NULL
);
106
107
108
protected
:
109
110
int
computeDerivedFunctions
(
realCompositeGridFunction
& u );
111
int
getComponent
(
int
& c,
const
aString
& cName );
112
void
initialize
();
113
114
ShowFileReader
*
showFileReader
;
115
int
numberOfDerivedFunctions
;
116
IntegerArray
derived
;
117
aString
*
name
;
118
119
// Schlieren parameters
120
real
exposure
,
amplification
;
121
122
123
int
velocityComponent
[3];
// Array holding the velocity components
124
int
displacementComponent
[3];
// displacement components
125
int
stressComponent
[9];
// stress components
126
127
};
128
129
#endif
Generated on Fri Jan 4 2013 10:17:50 for Overture by
1.8.3