Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
SquareMapping.h
Go to the documentation of this file.
1
#ifndef SQUARE_MAPPING_H
2
#define SQUARE_MAPPING_H "Square.h"
3
4
#include "
Mapping.h
"
5
6
class
SquareMapping
:
public
Mapping
7
{
8
//-------------------------------------------------------------
9
// Here is a derived class to define a square in 2D
10
//-------------------------------------------------------------
11
public
:
12
13
SquareMapping
(
const
real
xa=0.,
14
const
real
xb=1.,
15
const
real
ya=0.,
16
const
real
yb=1. );
17
18
// Copy constructor is deep by default
19
SquareMapping
(
const
SquareMapping
&,
const
CopyType
copyType=
DEEP
);
20
21
~SquareMapping
();
22
23
SquareMapping
&
operator =
(
const
SquareMapping
&
X0
);
24
25
void
map
(
const
realArray
&
r
,
realArray
&
x
,
realArray
&
xr
=
Overture::nullRealDistributedArray
(),
26
MappingParameters
& params =
Overture::nullMappingParameters
() );
27
28
void
basicInverse
(
const
realArray
& x,
realArray
& r,
realArray
&
rx
=
Overture::nullRealDistributedArray
(),
29
MappingParameters
& params =
Overture::nullMappingParameters
() );
30
31
virtual
void
mapS
(
const
RealArray
& r,
RealArray
& x,
RealArray
&
xr
=
Overture::nullRealArray
(),
32
MappingParameters
& params =
Overture::nullMappingParameters
());
33
34
virtual
void
basicInverseS
(
const
RealArray
& x,
35
RealArray
& r,
36
RealArray
&
rx
=
Overture::nullRealArray
(),
37
MappingParameters
& params =
Overture::nullMappingParameters
());
38
39
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
40
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
41
42
void
setVertices
(
const
real
xa=0.,
43
const
real
xb=1.,
44
const
real
ya=0.,
45
const
real
yb=1.,
46
const
real
z=0. );
47
48
real
getVertices
(
real
& xa,
real
& xb,
real
& ya,
real
& yb )
const
;
49
50
Mapping
*
make
(
const
aString
&
mappingClassName
);
51
aString
getClassName
()
const
{
return
SquareMapping::className; }
52
53
int
update
(
MappingInformation
& mapInfo ) ;
54
55
virtual
RealArray
getBoundingBox
(
const
int
& side=-1,
const
int
& axis=-1 )
const
;
56
virtual
int
getBoundingBox
(
const
IntegerArray
& indexRange,
const
IntegerArray
&
gridIndexRange
,
57
RealArray
& xBounds,
bool
local=
false
)
const
;
58
virtual
int
getBoundingBox
(
const
RealArray
& rBounds,
RealArray
& xBounds )
const
;
59
60
private
:
61
aString
className;
62
RealArray
xyab;
63
real
xa,xb,ya,yb;
64
real
z;
// z level if 3D
65
66
private
:
67
68
//
69
// Virtual member functions used only through class ReferenceCounting:
70
//
71
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
72
{
return
operator=
((
SquareMapping
&)x); }
73
virtual
void
reference(
const
ReferenceCounting
& x)
74
{ reference((
SquareMapping
&)x); }
// *** Conversion to this class for the virtual = ****
75
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
76
{ return ::new
SquareMapping
(*
this
, ct); }
77
78
};
79
80
81
#endif // SQUARE_H
82
83
Generated on Fri Jan 4 2013 10:17:59 for Overture by
1.8.3