Overture  Version 25
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 
22 
24 
25  // return a reference to the stretching function along a given coordinate direction
26  StretchMapping & stretchFunction( const int & axis = 0 );
27 
30 
33 
34  void mapS( const RealArray & r, RealArray & x, RealArray &xr = Overture::nullRealArray(),
36 
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 
45 
46  int update( MappingInformation & mapInfo ) ;
47 
48 protected:
51 
52  private:
53 
54  //
55  // Virtual member functions used only through class ReferenceCounting:
56  //
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