Overture  Version 25
AnnulusMapping.h
Go to the documentation of this file.
1 #ifndef ANNULUS_MAPPING_H
2 #define ANNULUS_MAPPING_H
3 
4 #include "Mapping.h"
5 
6 //-------------------------------------------------------------
7 // Here is a derived class to define a Annulus in 2D
8 //
9 //-------------------------------------------------------------
10 class AnnulusMapping : public Mapping
11 {
12 
13  private:
14  aString className;
15 
16  public:
18 
19  AnnulusMapping(const real innerRadius0=.5,
20  const real outerRadius0=1.,
21  const real x0=0.,
22  const real y0=0.,
23  const real startAngle=0.,
24  const real endAngle=1.,
25  const real aOverB=1. );
26 
27 
28 
29  // Copy constructor is deep by default
30  AnnulusMapping( const AnnulusMapping &, const CopyType copyType=DEEP );
31 
33 
36 
39 
40  virtual void mapS( const RealArray & r, RealArray & x, RealArray &xr = Overture::nullRealArray(),
42 
43  virtual void basicInverseS(const RealArray & x,
44  RealArray & r,
47 
49 
50  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
51  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
52 
53  int setRadii(const real & innerRadius=.5,
54  const real & outerRadius=1.,
55  const real aOverB=1. );
56  int setOrigin(const real & x0=0.,
57  const real & y0=0.,
58  const real & z0=0. );
59  int setAngleBounds(const real & startAngle=0.,
60  const real & endAngle=1. );
61 
63 
64  aString getClassName() const;
65 
66  int update( MappingInformation & mapInfo );
67 
68  private:
69 
70  //
71  // Virtual member functions used only through class ReferenceCounting:
72  //
74  { return operator=( (AnnulusMapping &)x); }
75  virtual void reference( const ReferenceCounting& x)
76  { reference( (AnnulusMapping &)x); }
77  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
78  { return ::new AnnulusMapping(*this, ct); }
79 };
80 
81 #endif