estimator.hh

Go to the documentation of this file.
1 
6 #ifndef aglowavEstimator_hh
7 #define aglowavEstimator_hh
8 
9 #ifdef __GUNG__
10  #pragma interface
11 #endif
12 
13 #include "function/vector.hh"
14 #include "bem/space.hh"
15 #include "aglowav/space.hh"
16 
17 namespace aglowav {
18 
19  // ***************************************************************** Est01 **
20 
33  template <class F = concepts::Real>
34  class Est01 {
35  public:
37  Est01(bem::AdaptiveSpace<F>& spc, uint maxdim, concepts::Real trshld);
38 
42  bool refine() const {return ref_;}
43 
47  void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
48  void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
49 
50  private:
52  bool ref_;
53  uint maxdim_;
58  };
59 
60  template <class F>
62  uint maxdim, concepts::Real trshld)
63  : maxdim_(maxdim), trshld_(trshld), spc_(spc) {
64  ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
65  }
66 
67  // ***************************************************************** Est02 **
68 
87  template <class F = concepts::Real>
88  class Est02 {
89  public:
96  uint maxdim, concepts::Real trshld, concepts::Real s = 1.0);
97 
101  bool refine() const {return ref_;}
105  void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
107  void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
108  private:
110  bool ref_;
111  uint maxdim_;
118  };
119 
120  template <class F>
122  uint maxdim, concepts::Real trshld, concepts::Real s)
123  : maxdim_(maxdim), trshld2_(trshld*trshld), s_(s), spc_(spc) {
124 
125  ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
126  if (s_ > 1.0)
127  std::cout << "Uuups really s > 1.0 ??" << std::endl;
128  }
129 
130  // ***************************************************************** Est03 **
131 
145  template <class F = concepts::Real>
146  class Est03 {
147  public:
150  uint maxdim, concepts::Real trshld);
151 
155  bool refine() const {return ref_;}
156 
160  void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
161  void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
162  private:
164  bool ref_;
165  uint maxdim_;
170  };
171 
172  template <class F>
174  uint maxdim, concepts::Real trshld)
175  : maxdim_(maxdim), trshld_(trshld), spc_(spc) {
176  ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
177  }
178 
179  // ***************************************************************** Est04 **
180 
192  template <class F = concepts::Real>
193  class Est04 {
194  public:
197  uint maxdim, concepts::Real trshld, concepts::Real s = 1.0);
198 
202  bool refine() const {return ref_;}
206  void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
208  void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
209  private:
211  bool ref_;
212  uint maxdim_;
219  };
220 
221  template <class F>
223  uint maxdim, concepts::Real trshld, concepts::Real s)
224  : maxdim_(maxdim), trshld2_(trshld*trshld), s_(s), spc_(spc) {
225  ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
226  }
227 
228 } // namespace aglowav
229 
230 #endif // aglowavEstimator_hh
concepts::Real trshld_
Threshold.
Definition: estimator.hh:167
bool refine() const
Return 1 if there was some refinement Return 0 else.
Definition: estimator.hh:101
bool ref_
Refinement.
Definition: estimator.hh:52
void operator()(const Haar3d< F > &wavspc, const concepts::Function< F > &f)
Refines the adaptive constant space.
void operator()(const Haar3d< F > &wavspc, const concepts::Function< F > &f)
Refines the adaptive constant space.
Abstract class for a function.
Definition: basis.hh:21
bem::AdaptiveSpace< F > & spc_
Space to refine.
Definition: estimator.hh:218
Error estimator for the constant space.
Definition: estimator.hh:88
Est02(bem::AdaptiveSpace< F > &spc, uint maxdim, concepts::Real trshld, concepts::Real s=1.0)
Constructor.
Definition: estimator.hh:121
bool refine() const
Return 1 if there was some refinement Return 0 else.
Definition: estimator.hh:42
void operator()(const Haar3d< F > &wavspc, const concepts::Vector< F > &f)
void operator()(const Haar3d< F > &wavspc, const concepts::Vector< F > &f)
bool refine() const
Return 1 if there was some refinement Return 0 else.
Definition: estimator.hh:202
Error estimator for the constant space.
Definition: estimator.hh:34
bool refine() const
Return 1 if there was some refinement Return 0 else.
Definition: estimator.hh:155
concepts::Real s_
Smoothness of the solution.
Definition: estimator.hh:115
void operator()(const Haar3d< F > &wavspc, const concepts::Vector< F > &f)
void operator()(const Haar3d< F > &wavspc, const concepts::Function< F > &f)
Refines the adaptive constant space.
Error estimator for the constant space.
Definition: estimator.hh:193
bem::AdaptiveSpace< F > & spc_
Space to refine.
Definition: estimator.hh:117
Est04(bem::AdaptiveSpace< F > &spc, uint maxdim, concepts::Real trshld, concepts::Real s=1.0)
Constructor.
Definition: estimator.hh:222
Est03(bem::AdaptiveSpace< F > &spc, uint maxdim, concepts::Real trshld)
Constructor.
Definition: estimator.hh:173
concepts::Real s_
Regularity.
Definition: estimator.hh:216
Agglomerated wavelet space.
Definition: space.hh:56
concepts::Real trshld_
Threshold.
Definition: estimator.hh:55
concepts::Real trshld2_
Threshold squared.
Definition: estimator.hh:214
void operator()(const Haar3d< F > &wavspc, const concepts::Vector< F > &f)
Error estimator for the constant space.
Definition: estimator.hh:146
Est01(bem::AdaptiveSpace< F > &spc, uint maxdim, concepts::Real trshld)
Constructor.
Definition: estimator.hh:61
bem::AdaptiveSpace< F > & spc_
Space to refine.
Definition: estimator.hh:57
void operator()(const Haar3d< F > &wavspc, const concepts::Function< F > &f)
Refines the adaptive constant space.
bool ref_
Refinement.
Definition: estimator.hh:164
bool ref_
Refinement.
Definition: estimator.hh:110
Used for the aglowav classes for the boundary element method.
Definition: element.hh:21
bem::AdaptiveSpace< F > & spc_
Space to refine.
Definition: estimator.hh:169
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
concepts::Real trshld2_
Threshold squared.
Definition: estimator.hh:113
bool ref_
Refinement.
Definition: estimator.hh:211
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich