Go to the documentation of this file.00001
00002
00003
00004 #ifndef aglowavEstimator_hh
00005 #define aglowavEstimator_hh
00006
00007 #ifdef __GUNG__
00008 #pragma interface
00009 #endif
00010
00011 #include "function/vector.hh"
00012 #include "bem/space.hh"
00013 #include "aglowav/space.hh"
00014
00015 namespace aglowav {
00016
00017
00018
00031 template <class F = concepts::Real>
00032 class Est01 {
00033 public:
00035 Est01(bem::AdaptiveSpace<F>& spc, uint maxdim, concepts::Real trshld);
00036
00040 bool refine() const {return ref_;}
00041
00045 void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
00046 void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
00047
00048 private:
00050 bool ref_;
00051 uint maxdim_;
00053 concepts::Real trshld_;
00055 bem::AdaptiveSpace<F>& spc_;
00056 };
00057
00058 template <class F>
00059 inline Est01<F>::Est01(bem::AdaptiveSpace<F>& spc,
00060 uint maxdim, concepts::Real trshld)
00061 : maxdim_(maxdim), trshld_(trshld), spc_(spc) {
00062 ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
00063 }
00064
00065
00066
00085 template <class F = concepts::Real>
00086 class Est02 {
00087 public:
00093 Est02(bem::AdaptiveSpace<F>& spc,
00094 uint maxdim, concepts::Real trshld, concepts::Real s = 1.0);
00095
00099 bool refine() const {return ref_;}
00103 void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
00105 void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
00106 private:
00108 bool ref_;
00109 uint maxdim_;
00111 concepts::Real trshld2_;
00113 concepts::Real s_;
00115 bem::AdaptiveSpace<F>& spc_;
00116 };
00117
00118 template <class F>
00119 inline Est02<F>::Est02(bem::AdaptiveSpace<F>& spc,
00120 uint maxdim, concepts::Real trshld, concepts::Real s)
00121 : maxdim_(maxdim), trshld2_(trshld*trshld), s_(s), spc_(spc) {
00122
00123 ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
00124 if (s_ > 1.0)
00125 std::cout << "Uuups really s > 1.0 ??" << std::endl;
00126 }
00127
00128
00129
00143 template <class F = concepts::Real>
00144 class Est03 {
00145 public:
00147 Est03(bem::AdaptiveSpace<F>& spc,
00148 uint maxdim, concepts::Real trshld);
00149
00153 bool refine() const {return ref_;}
00154
00158 void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
00159 void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
00160 private:
00162 bool ref_;
00163 uint maxdim_;
00165 concepts::Real trshld_;
00167 bem::AdaptiveSpace<F>& spc_;
00168 };
00169
00170 template <class F>
00171 inline Est03<F>::Est03(bem::AdaptiveSpace<F>& spc,
00172 uint maxdim, concepts::Real trshld)
00173 : maxdim_(maxdim), trshld_(trshld), spc_(spc) {
00174 ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
00175 }
00176
00177
00178
00190 template <class F = concepts::Real>
00191 class Est04 {
00192 public:
00194 Est04(bem::AdaptiveSpace<F>& spc,
00195 uint maxdim, concepts::Real trshld, concepts::Real s = 1.0);
00196
00200 bool refine() const {return ref_;}
00204 void operator()(const Haar3d<F>& wavspc, const concepts::Function<F>& f);
00206 void operator()(const Haar3d<F>& wavspc, const concepts::Vector<F>& f);
00207 private:
00209 bool ref_;
00210 uint maxdim_;
00212 concepts::Real trshld2_;
00214 concepts::Real s_;
00216 bem::AdaptiveSpace<F>& spc_;
00217 };
00218
00219 template <class F>
00220 inline Est04<F>::Est04(bem::AdaptiveSpace<F>& spc,
00221 uint maxdim, concepts::Real trshld, concepts::Real s)
00222 : maxdim_(maxdim), trshld2_(trshld*trshld), s_(s), spc_(spc) {
00223 ref_ = (maxdim_ > spc_.dim()) ? 1 : 0;
00224 }
00225
00226 }
00227
00228 #endif // aglowavEstimator_hh