Overture  Version 25
CrossSectionMapping.h
Go to the documentation of this file.
1 #ifndef CROSS_SECTION_MAPPING_H
2 #define CROSS_SECTION_MAPPING_H
3 
4 #include "Mapping.h"
5 class SplineMapping;
6 
7 class CrossSectionMapping : public Mapping{
8 //-----------------------------------------------------------------------------------
9 // Here is a derived class to define a Cylindrical Surface in 3D
10 //
11 // The surface is defined in terms of cylindrical coordinates
12 //
13 // (s,theta/(2pi),r) : s in [0,1], theta in [0,2pi], r in [0,1]
14 //-----------------------------------------------------------------------------------
15 
16 
17  public:
18 
20  {
25  m6,
26  numberOfCrossSectionTypes // this entry counts the number of items in this list
27  };
28 
30  {
34  };
35 
37  {
38  linear=0,
40  };
41 
42  CrossSectionMapping(const real startS=0., // staring value for "s"
43  const real endS=1., // ending value for "s"
44  const real startAngle=0.,
45  const real endAngle=1.,
46  const real innerRadius=1.,
47  const real outerRadius=1.5,
48  const real x0=0.,
49  const real y0=0.,
50  const real z0=0.,
51  const real length=1.,
52  const int domainDimension=3 );
53 
54  // Copy constructor is deep by default
55  CrossSectionMapping( const CrossSectionMapping & map, const CopyType copyType=DEEP );
56 
58 
60 
62 
65 
68 
69  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
70  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
71 
73 
74  aString getClassName() const;
75 
76  int update( MappingInformation & mapInfo ) ;
77 
78  protected:
80 
81  int tAxis,sAxis;
84  Mapping **crossSection; // array of pointers to mappings that define the cross-sections
87  realArray s; // hold parameterization (by default arclength)
88  Mapping *parameterMap; // holds spline for non-index parameterization
89  realArray centroid; // centroid of each cross-section, xc0(axis,cs)
90  realArray csRadius; // "radius" of each cross section is csRadius(cs)
93 
94  // parameters for built-in cross section types
97 
98  // evaluate cross section cs (also evaluate ghost cross-sections cs=-1 and cs=numberOfCrossSections.)
99  int crossSectionMap( const int & cs, const realArray & r, realArray & x, realArray & xr);
100 
107 
108  int initialize();
109 
110  private:
111 
112  //
113  // Virtual member functions used only through class ReferenceCounting:
114  //
116  { return operator=((CrossSectionMapping &)x); }
117  virtual void reference( const ReferenceCounting& x)
118  { reference((CrossSectionMapping &)x); } // *** Conversion to this class for the virtual = ****
119  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
120  { return ::new CrossSectionMapping(*this, ct); }
121 };
122 
123 #endif