Overture  Version 25
CylinderMapping.h
Go to the documentation of this file.
1 #ifndef CYLINDER_MAPPING_H
2 #define CYLINDER_MAPPING_H
3 
4 #include "Mapping.h"
5 
6 class CylinderMapping : public Mapping{
7 //-------------------------------------------------------------
8 // Here is a derived class to define a Cylindrical Surface in 3D
9 //-------------------------------------------------------------
10 
11 
12  public:
14 
15  CylinderMapping(const real & startAngle=0.,
16  const real & endAngle=1.,
17  const real & startAxis=-1.,
18  const real & endAxis=+1.,
19  const real & innerRadius=1.,
20  const real & outerRadius=1.5,
21  const real & x0=0.,
22  const real & y0=0.,
23  const real & z0=0.,
24  const int & domainDimension=3,
25  const int & cylAxis1 = axis1,
26  const int & cylAxis2 = axis2,
27  const int & cylAxis3 = axis3 );
28 
29  // Copy constructor is deep by default
30  CylinderMapping( const CylinderMapping & map, const CopyType copyType=DEEP );
31 
33 
35 
36  int setAngle(const real & startAngle=0., const real & endAngle=1. );
37  int setAxis(const real & startAxis=-1., const real & endAxis=+1. );
38  int setOrientation( const int & cylAxis1=axis1, const int & cylAxis2=axis2, const int & cylAxis3=axis3 );
39  int setOrigin(const real & x0=0., const real & y0=0., const real & z0=0. );
40  int setRadius(const real & innerRadius=1., const real & outerRadius=1.5 );
41 
44 
47 
48  virtual void mapS( const RealArray & r, RealArray & x, RealArray &xr = Overture::nullRealArray(),
50 
51  virtual void basicInverseS(const RealArray & x,
52  RealArray & r,
55 
56  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
57  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
58 
60 
61  aString getClassName() const;
62 
63  int update( MappingInformation & mapInfo ) ;
64 
65  protected:
66  int checkAxes();
67  int updatePeriodVector();
68 
69  private:
70  aString className;
71  int cylAxis1, cylAxis2, cylAxis3;
72 
73  private:
74 
75  //
76  // Virtual member functions used only through class ReferenceCounting:
77  //
79  { return operator=((CylinderMapping &)x); }
80  virtual void reference( const ReferenceCounting& x)
81  { reference((CylinderMapping &)x); } // *** Conversion to this class for the virtual = ****
82  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
83  { return ::new CylinderMapping(*this, ct); }
84 };
85 
86 #endif