Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
CrossSectionMapping.h
Go to the documentation of this file.
1
#ifndef CROSS_SECTION_MAPPING_H
2
#define CROSS_SECTION_MAPPING_H
3
4
#include "
Mapping.h
"
5
class
SplineMapping
;
6
7
class
CrossSectionMapping
:
public
Mapping
{
8
//-----------------------------------------------------------------------------------
9
// Here is a derived class to define a Cylindrical Surface in 3D
10
//
11
// The surface is defined in terms of cylindrical coordinates
12
//
13
// (s,theta/(2pi),r) : s in [0,1], theta in [0,2pi], r in [0,1]
14
//-----------------------------------------------------------------------------------
15
16
17
public
:
18
19
enum
CrossSectionTypes
20
{
21
general
,
22
ellipse
,
23
banana
,
24
joukowsky
,
25
m6
,
26
numberOfCrossSectionTypes
// this entry counts the number of items in this list
27
};
28
29
enum
Parameterization
30
{
31
arcLength
=0,
32
index
,
33
userDefined
34
};
35
36
enum
AxialApproximation
37
{
38
linear
=0,
39
cubic
40
};
41
42
CrossSectionMapping
(
const
real
startS
=0.,
// staring value for "s"
43
const
real
endS
=1.,
// ending value for "s"
44
const
real
startAngle
=0.,
45
const
real
endAngle
=1.,
46
const
real
innerRadius
=1.,
47
const
real
outerRadius
=1.5,
48
const
real
x0
=0.,
49
const
real
y0
=0.,
50
const
real
z0
=0.,
51
const
real
length
=1.,
52
const
int
domainDimension
=3 );
53
54
// Copy constructor is deep by default
55
CrossSectionMapping
(
const
CrossSectionMapping
&
map
,
const
CopyType
copyType=
DEEP
);
56
57
~CrossSectionMapping
();
58
59
CrossSectionMapping
&
operator =
(
const
CrossSectionMapping
& X );
60
61
int
setCrossSectionType
(
CrossSectionTypes
type);
62
63
void
map
(
const
realArray
&
r
,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
64
MappingParameters
& params=
Overture::nullMappingParameters
() );
65
66
void
basicInverse
(
const
realArray
& x,
realArray
& r,
realArray
& rx =
Overture::nullRealDistributedArray
(),
67
MappingParameters
& params =
Overture::nullMappingParameters
());
68
69
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
70
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
71
72
Mapping
*
make
(
const
aString
&
mappingClassName
);
73
74
aString
getClassName
()
const
;
75
76
int
update
(
MappingInformation
& mapInfo ) ;
77
78
protected
:
79
aString
className
;
80
81
int
tAxis
,
sAxis
;
82
CrossSectionTypes
crossSectionType
;
83
int
numberOfCrossSections
;
84
Mapping
**
crossSection
;
// array of pointers to mappings that define the cross-sections
85
AxialApproximation
axialApproximation
;
86
Parameterization
parameterization
;
87
realArray
s
;
// hold parameterization (by default arclength)
88
Mapping
*
parameterMap
;
// holds spline for non-index parameterization
89
realArray
centroid
;
// centroid of each cross-section, xc0(axis,cs)
90
realArray
csRadius
;
// "radius" of each cross section is csRadius(cs)
91
SplineMapping
*
radiusSpline
;
92
real
polarSingularityFactor
;
93
94
// parameters for built-in cross section types
95
real
innerRadius
,
outerRadius
,
x0
,
y0
,
z0
,
length
,
startAngle
,
endAngle
,
a
,
b
,
c
,
startS
,
endS
;
96
real
joukowskyDelta
,
joukowskyD
,
joukowskyA
,
joukowskyLength
,
joukowskyBeta
;
97
98
// evaluate cross section cs (also evaluate ghost cross-sections cs=-1 and cs=numberOfCrossSections.)
99
int
crossSectionMap
(
const
int
& cs,
const
realArray
& r,
realArray
& x,
realArray
& xr);
100
101
void
mapGeneral
(
const
realArray
& r,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
102
MappingParameters
& params=
Overture::nullMappingParameters
() );
103
void
mapGeneralWithPolarSingularity
(
const
realArray
& r,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
104
MappingParameters
& params=
Overture::nullMappingParameters
() );
105
void
mapBuiltin
(
const
realArray
& r,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
106
MappingParameters
& params=
Overture::nullMappingParameters
() );
107
108
int
initialize
();
109
110
private
:
111
112
//
113
// Virtual member functions used only through class ReferenceCounting:
114
//
115
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
116
{
return
operator=
((
CrossSectionMapping
&)x); }
117
virtual
void
reference(
const
ReferenceCounting
& x)
118
{ reference((
CrossSectionMapping
&)x); }
// *** Conversion to this class for the virtual = ****
119
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
120
{ return ::new
CrossSectionMapping
(*
this
, ct); }
121
};
122
123
#endif
Generated on Fri Jan 4 2013 10:17:50 for Overture by
1.8.3