Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
RestrictionMapping.h
Go to the documentation of this file.
1
#ifndef RESTRICTION_H
2
#define RESTRICTION_H "Restriction.h"
3
4
#include "
Mapping.h
"
5
class
ReparameterizationTransform
;
6
7
//-------------------------------------------------------------
8
// This mapping restricts parameter space to a sub-rectangle
9
//
10
// For example, in 2D it maps [0,1]x[0,1] -> [ra,rb]x[sa,sb]
11
//
12
//-------------------------------------------------------------
13
class
RestrictionMapping
:
public
Mapping
14
{
15
friend
class
ReparameterizationTransform
;
16
17
private
:
18
aString
className
;
19
real
ra,rb,sa,sb,ta,tb;
20
int
spaceIsPeriodic[3];
// true if the space we are reparameterizing is periodic.
21
22
public
:
23
24
RestrictionMapping
(
const
real
ra=0.,
25
const
real
rb=1.,
26
const
real
sa=0.,
27
const
real
sb=1.,
28
const
real
ta=0.,
29
const
real
tb=1.,
30
const
int
dimension=2,
31
Mapping
*restrictedMapping=
NULL
);
// 2D by default
32
33
// Copy constructor is deep by default
34
RestrictionMapping
(
const
RestrictionMapping
&,
const
CopyType
copyType=
DEEP
);
35
36
~RestrictionMapping
();
37
38
RestrictionMapping
&
operator =
(
const
RestrictionMapping
& X0 );
39
40
void
map
(
const
realArray
&
r
,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
41
MappingParameters
& params =
Overture::nullMappingParameters
() );
42
43
void
basicInverse
(
const
realArray
& x,
realArray
& r,
realArray
& rx =
Overture::nullRealDistributedArray
(),
44
MappingParameters
& params =
Overture::nullMappingParameters
() );
45
46
void
mapS
(
const
RealArray
& r,
RealArray
& x,
RealArray
&xr =
Overture::nullRealArray
(),
47
MappingParameters
& params =
Overture::nullMappingParameters
());
48
49
void
basicInverseS
(
const
RealArray
& x,
50
RealArray
& r,
51
RealArray
& rx =
Overture::nullRealArray
(),
52
MappingParameters
& params =
Overture::nullMappingParameters
());
53
54
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
55
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
56
57
Mapping
*
make
(
const
aString
&
mappingClassName
);
58
aString
getClassName
()
const
{
return
RestrictionMapping::className; }
59
60
int
update
(
MappingInformation
& mapInfo ) ;
61
62
// scale the current bounds
63
int
scaleBounds
(
const
real
ra=0.,
64
const
real
rb=1.,
65
const
real
sa=0.,
66
const
real
sb=1.,
67
const
real
ta=0.,
68
const
real
tb=1. );
69
// set absolute bounds
70
int
setBounds
(
const
real
ra=0.,
71
const
real
rb=1.,
72
const
real
sa=0.,
73
const
real
sb=1.,
74
const
real
ta=0.,
75
const
real
tb=1. );
76
77
int
getBounds
(
real
& ra,
real
& rb,
real
& sa,
real
& sb,
real
& ta,
real
& tb )
const
;
78
79
// indicate whether the mapping being reparameterized is periodic
80
int
setSpaceIsPeriodic
(
int
axis,
bool
trueOrFalse =
true
);
81
82
private
:
83
84
//
85
// Virtual member functions used only through class ReferenceCounting:
86
//
87
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
88
{
return
operator=
((
RestrictionMapping
&)x); }
89
virtual
void
reference(
const
ReferenceCounting
& x)
90
{ reference((
RestrictionMapping
&)x); }
// *** Conversion to this class for the virtual = ****
91
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
92
{ return ::new
RestrictionMapping
(*
this
, ct); }
93
94
};
95
96
97
#endif // RESTRICTION_H
98
99
Generated on Fri Jan 4 2013 10:17:58 for Overture by
1.8.3