Overture  Version 25
ReorientMapping.h
Go to the documentation of this file.
1 #ifndef REORIENT_H
2 #define REORIENT_H "Reorient.h"
3 
4 #include "Mapping.h"
6 
7 //-------------------------------------------------------------
8 // This mapping can be used to re-orient the order of the domain parameter space
9 //
10 // For example, it can change a mapping x(r,s,t) -> x(s,r,t) or x(t,s,r) etc.
11 //
12 //-------------------------------------------------------------
13 class ReorientMapping : public Mapping
14 {
16 
17 private:
19  int dir1,dir2,dir3; // permutation of (0,1,2)
20 
21 
22 public:
23 
24  ReorientMapping(const int dir1=0, const int dir2=1, const int dir3=2,
25  const int dimension=2 ); // 2D by default
26 
27  // Copy constructor is deep by default
28  ReorientMapping( const ReorientMapping &, const CopyType copyType=DEEP );
29 
31 
33 
36 
39 
40 
41  virtual void mapS( const RealArray & r, RealArray & x, RealArray &xr = Overture::nullRealArray(),
43 
44  virtual void basicInverseS(const RealArray & x,
45  RealArray & r,
48 
49  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
50  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
51 
53  aString getClassName() const { return ReorientMapping::className; }
54 
55  int update( MappingInformation & mapInfo ) ;
56 
57  // scale the current bounds
58  int setOrientation(const int dir1, const int dir2, const int dir3=-1);
59  int getOrientation(int & dir1, int & dir2, int & dir3) const;
60 
61  private:
62 
63  //
64  // Virtual member functions used only through class ReferenceCounting:
65  //
67  { return operator=((ReorientMapping &)x); }
68  virtual void reference( const ReferenceCounting& x)
69  { reference((ReorientMapping &)x); } // *** Conversion to this class for the virtual = ****
70  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
71  { return ::new ReorientMapping(*this, ct); }
72 
73 };
74 
75 
76 #endif // REORIENT_H
77 
78