Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
StretchedSquare.h
Go to the documentation of this file.
1
#ifndef STRETCHED_SQUARE_H
2
#define STRETCHED_SQUARE_H "StretchedSquare.h"
3
4
#include "
StretchMapping.h
"
5
6
//-------------------------------------------------------------------------
7
// Here is a derived class to define a Stretched Unit Square or Unit Cube
8
//
9
// This stretched unit square (cube) can be composed with another Mapping
10
// in order to stretch grid lines on the latter Mapping
11
//-------------------------------------------------------------------------
12
class
StretchedSquare
:
public
Mapping
13
{
14
public
:
15
16
StretchedSquare
(
const
int
&
domainDimension
=2 );
17
18
// Copy constructor is deep by default
19
StretchedSquare
(
const
StretchedSquare
&,
const
CopyType
copyType=
DEEP
);
20
21
~StretchedSquare
();
22
23
StretchedSquare
&
operator =
(
const
StretchedSquare
&
X0
);
24
25
// return a reference to the stretching function along a given coordinate direction
26
StretchMapping
&
stretchFunction
(
const
int
& axis = 0 );
27
28
void
map
(
const
realArray
&
r
,
realArray
&
x
,
realArray
&
xr
=
Overture::nullRealDistributedArray
(),
29
MappingParameters
& params =
Overture::nullMappingParameters
() );
30
31
void
basicInverse
(
const
realArray
& x,
realArray
& r,
realArray
&
rx
=
Overture::nullRealDistributedArray
(),
32
MappingParameters
& params =
Overture::nullMappingParameters
() );
33
34
void
mapS
(
const
RealArray
& r,
RealArray
& x,
RealArray
&
xr
=
Overture::nullRealArray
(),
35
MappingParameters
& params =
Overture::nullMappingParameters
());
36
37
void
basicInverseS
(
const
RealArray
& x,
RealArray
& r,
RealArray
&
rx
=
Overture::nullRealArray
(),
38
MappingParameters
& params =
Overture::nullMappingParameters
() );
39
40
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
41
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
42
43
Mapping
*
make
(
const
aString
&
mappingClassName
);
44
aString
getClassName
()
const
{
return
StretchedSquare::className
; }
45
46
int
update
(
MappingInformation
& mapInfo ) ;
47
48
protected
:
49
aString
className
;
50
StretchMapping
stretch
[3];
51
52
private
:
53
54
//
55
// Virtual member functions used only through class ReferenceCounting:
56
//
57
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
58
{
return
operator=
((
StretchedSquare
&)x); }
59
virtual
void
reference(
const
ReferenceCounting
& x)
60
{ reference((
StretchedSquare
&)x); }
// *** Conversion to this class for the virtual = ****
61
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
62
{ return ::new
StretchedSquare
(*
this
, ct); }
63
64
};
65
66
67
#endif // STRETCHEDSQUARE_H
68
69
Generated on Fri Jan 4 2013 10:17:59 for Overture by
1.8.3