Overture  Version 25
GridSmoother.h
Go to the documentation of this file.
1 #ifndef GRID_SMOOTHER_H
2 #define GRID_SMOOTHER_H
3 
4 #include "Mapping.h"
7 
8 #ifndef OV_USE_OLD_STL_HEADERS
9 #include <vector>
11 #else
12 #include <vector.h>
13 #endif
14 
15 class MatchingCurve;
16 class DataPointMapping;
17 class DialogData;
18 class MappingInformation;
19 
21 {
22  public:
23 
25  {
30  };
31 
33  {
34  lineAttraction=1, // must be the same as the value in ellipticSmooth.f
36  };
37 
39  ~GridSmoother();
40 
41  int buildDialog(DialogData & dialog);
42 
43  bool updateOptions(aString & answer, DialogData & dialog, MappingInformation & mapInfo );
44 
45  void reset(); // call this function when the initial grid has been recomputed and thus control function will change
46 
47  void setWeights( real arcLength, real curvature, real area );
48 
49  int setBoundaryConditions( int bc[2][3] );
51 
53  int setMatchingCurves(vector<MatchingCurve> & matchingCurves );
54 
55  int periodicUpdate( realArray & x, const
56  IntegerArray & indexRange );
57 
58  int smooth(Mapping & map,
59  DataPointMapping & dpm,
61  GraphicsParameters & parameters,
62  int projectGhost[2][3] );
63 
64 
66  realArray & x,
67  const IntegerArray & indexRange, const IntegerArray & gids,
68  const Index Iv[3], const Index Jv[3], const Index Kv[3], realArray & normal,
69  bool projectSurfaceGrids=true );
70 
71 
72  protected:
73 
74  void computeNormals( realArray & normal, const Index & I1, const Index & I2, const Index & I3, const realArray & x );
75 
77 
81 
85 
89 
93 
96  int smoothingOffset[2][3];
97  int smoothingRegion[2][3];
99 
102 
106 
109 
111  vector<MatchingCurve> matchingCurves; // array of matching curves
112 
113  realArray source; // holds control function
114 
115 };
116 
117 
118 #endif