Overture  Version 25
ErrorEstimator.h
Go to the documentation of this file.
1 #ifndef ERROR_ESTIMATOR_H
2 #define ERROR_ESTIMATOR_H
3 
4 #include "Overture.h"
5 #include "PlotStuffParameters.h"
6 
7 class GL_GraphicsInterface;// would a GenericGI do?
8 // class PlotStuffParameters;
11 
13 {
14  public:
15 
16  enum
17  {
19  };
20 
22  {
28  };
30  {
32  };
33 
36 
37 
38  // build an error with a predefined shape (for testing):
41 
42  // base error on undivided differences:
45 
47  int numberOfSmooths = defaultNumberOfSmooths );
48  // smooth the error function and interpolate across overlapping grid boundaries:
50  int numberOfSmooths = defaultNumberOfSmooths,
52 
53  int displayParameters(FILE *file = stdout ) const;
54 
55  int plotErrorPoints( realGridCollectionFunction & error, real errorThreshhold,
56  GL_GraphicsInterface & ps, PlotStuffParameters & psp ); // would a GenericGI do?
57 
58 
59  int setDefaultNumberOfSmooths( int numberOfSmooths );
60  int setMaximumNumberOfRefinementLevels( int maxLevels );
61 
62  // set scale factors for each component. Use these when scaling the errors.
64 
66  real topHatRadiusX_=0. , real topHatRadiusY_=0., real topHatRadiusZ_=0.);
67 
69 
70  int get( const GenericDataBase & dir, const aString & name);
71 
72  int put( GenericDataBase & dir, const aString & name) const;
73 
74  int update( GenericGraphicsInterface & gi );
75 
76  int debug;
77 
78  protected:
79 
81  int smooth( realGridCollectionFunction & error );
82  void openDebugFile();
83 
85 
88 
90 
92 
94  int maximumNumberOfRefinementLevels; // no need to compute errors on the finest level
95 
96  int myid;
97  FILE *debugFile;
98 
99 };
100 
101 
102 #endif