Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
ComposeMapping.h
Go to the documentation of this file.
1
#ifndef COMPOSE_MAPPING_H
2
#define COMPOSE_MAPPING_H "ComposeMapping.h"
3
4
#include "
Mapping.h
"
5
#include "
Inverse.h
"
6
#include "
MappingRC.h
"
7
8
class
ComposeMapping
:
public
Mapping
{
9
//----------------------------------------------------------------
10
// Compose two Mapping functions
11
// -----------------------------
12
// Constructor example:
13
// ComposeMapping mapc( mapa,mapb );
14
// ...means
15
// mapc <- (mapb o mapa)
16
// mapc means to apply mapa followed by mapb
17
//----------------------------------------------------------------
18
public
:
19
20
// keep reference counted versions of the mappings that we compose
21
MappingRC
map1
;
22
MappingRC
map2
;
23
24
ComposeMapping
( );
25
26
//
27
// Constructor specifying the two mappings to compose, mapb o mapa
28
//
29
ComposeMapping
(
Mapping
& mapa,
Mapping
& mapb );
30
31
//
32
// specify the two mappings to compose, mapb o mapa
33
//
34
void
setMappings
(
Mapping
& mapa,
Mapping
& mapb );
35
36
// Copy constructor is deep by default
37
ComposeMapping
(
const
ComposeMapping
&,
const
CopyType
copyType=
DEEP
);
38
39
~ComposeMapping
();
40
41
ComposeMapping
&
operator =
(
const
ComposeMapping
& X );
42
43
const
realArray
&
getGrid
(
MappingParameters
& params=
Overture::nullMappingParameters
(),
44
bool
includeGhost=
false
);
45
46
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
47
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
48
49
Mapping
*
make
(
const
aString
&
mappingClassName
);
50
51
aString
getClassName
()
const
{
return
ComposeMapping::className; }
52
53
virtual
void
useRobustInverse
(
const
bool
trueOrFalse=
TRUE
);
54
55
void
map
(
const
realArray
&
r
,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
56
MappingParameters
& params=
Overture::nullMappingParameters
());
57
58
void
inverseMap
(
const
realArray
& x,
realArray
& r,
realArray
& rx =
Overture::nullRealDistributedArray
(),
59
MappingParameters
& params =
Overture::nullMappingParameters
() );
60
61
void
basicInverse
(
const
realArray
& x,
realArray
& r,
realArray
& rx=
Overture::nullRealDistributedArray
(),
62
MappingParameters
& params=
Overture::nullMappingParameters
());
63
64
void
mapS
(
const
RealArray
& r,
RealArray
& x,
RealArray
&xr =
Overture::nullRealArray
(),
65
MappingParameters
& params =
Overture::nullMappingParameters
());
66
67
void
inverseMapS
(
const
RealArray
& x,
RealArray
& r,
RealArray
& rx =
Overture::nullRealArray
(),
68
MappingParameters
& params =
Overture::nullMappingParameters
() );
69
70
void
basicInverseS
(
const
RealArray
& x,
71
RealArray
& r,
72
RealArray
& rx =
Overture::nullRealArray
(),
73
MappingParameters
& params =
Overture::nullMappingParameters
());
74
75
// Use default Mapping inverse instead of optimized inverse defined by this mapping
76
int
useDefaultMappingInverse
(
bool
trueOrFalse =
TRUE
);
77
78
virtual
real
sizeOf
(FILE *file =
NULL
)
const
;
79
80
virtual
int
update
(
MappingInformation
& mapInfo ) ;
81
82
83
private
:
84
aString
className;
85
Range Rr,Ry,Rx;
86
87
protected
:
88
89
// ApproximateGlobalInverse *approximateGlobalInverse;
90
// ExactLocalInverse *exactLocalInverse;
91
// MappingWorkSpace workSpace; // work space for inverse
92
bool
useDefaultInverse
;
93
94
private
:
95
96
void
setup(
Mapping
& mapa,
Mapping
& mapb );
97
98
//
99
// Virtual member functions used only through class ReferenceCounting:
100
//
101
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
102
{
return
operator=
((
ComposeMapping
&)x); }
103
virtual
void
reference(
const
ReferenceCounting
& x)
104
{ reference((
ComposeMapping
&)x); }
// *** Conversion to this class for the virtual = ****
105
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
106
{ return ::new
ComposeMapping
(*
this
, ct); }
107
};
108
109
110
#endif // COMPOSE_MAPPING_H
111
Generated on Fri Jan 4 2013 10:17:49 for Overture by
1.8.3