Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef shortestDist_hh
00006 #define shortestDist_hh
00007
00008 #include <cmath>
00009 #include "basics/vectorsMatrices.hh"
00010 #include "singularSet.hh"
00011
00012 namespace hp3D {
00013
00014
00015 class Hexahedron;
00016 using concepts::Real;
00017
00018
00019
00024 class TrivialWeight {
00025 public:
00026 Real operator()(const SingularSet&, concepts::Real3d,
00027 const Hexahedron*) const { return 1.0; }
00028 };
00029
00030 std::ostream& operator<<(std::ostream& os, const TrivialWeight& p);
00031
00032
00033
00040 class ShortestDist {
00041 public:
00050 Real operator()(const SingularSet& singularities,
00051 concepts::Real3d point, const Hexahedron* elm) const;
00052 };
00053
00054 std::ostream& operator<<(std::ostream& os, const ShortestDist& p);
00055
00056
00057
00062 class PostprocessSquare {
00063 public:
00064 static Real post(Real x) { return x*x; }
00065 };
00066
00067 std::ostream& operator<<(std::ostream& os, const PostprocessSquare& p);
00068
00069
00070
00075 class PostprocessRoot {
00076 public:
00077 static Real post(Real x) { return std::sqrt(x); }
00078 };
00079
00080 std::ostream& operator<<(std::ostream& os, const PostprocessRoot& p);
00081
00082
00083
00088 class PostprocessRoot4 {
00089 public:
00090 static Real post(Real x) { return std::sqrt(std::sqrt(x)); }
00091 };
00092
00093 std::ostream& operator<<(std::ostream& os, const PostprocessRoot4& p);
00094
00095
00096
00101 class Postprocess34 {
00102 public:
00103 static Real post(Real x) { return std::pow(x, 0.75); }
00104 };
00105
00106 std::ostream& operator<<(std::ostream& os, const Postprocess34& p);
00107
00108
00109
00114 class Postprocess14 {
00115 public:
00116 static Real post(Real x) { return std::pow(x, 0.25); }
00117 };
00118
00119 std::ostream& operator<<(std::ostream& os, const Postprocess14& p);
00120
00121
00122
00127 class Postprocess4 {
00128 public:
00129 static Real post(Real x) { return x*x*x*x; }
00130 };
00131
00132 std::ostream& operator<<(std::ostream& os, const Postprocess4& p);
00133
00134
00135
00140 class Postprocess3 {
00141 public:
00142 static Real post(Real x) { return x*x*x; }
00143 };
00144
00145 std::ostream& operator<<(std::ostream& os, const Postprocess3& p);
00146
00147
00148
00158 template<typename DistClass, typename Function>
00159 class DistancePost {
00160 public:
00164 Real operator()(const SingularSet& singularities,
00165 concepts::Real3d point, const Hexahedron* elm) const {
00166 return Function::post(dist_(singularities, point, elm));
00167 }
00168 private:
00169 DistClass dist_;
00170 };
00171
00172 template<typename DistClass, typename Function>
00173 inline std::ostream& operator<<(std::ostream& os,
00174 const DistancePost<DistClass, Function>& p) {
00175 return os << Function() << '(' << DistClass() << ')';
00176 }
00177
00178
00179
00190 class ProductOfAll {
00191 public:
00192 Real operator()(const SingularSet& singularities,
00193 concepts::Real3d point, const Hexahedron* elm) const;
00194 };
00195
00196 std::ostream& operator<<(std::ostream& os, const ProductOfAll& p);
00197
00198
00199
00227 class DaugeWeight {
00228 public:
00229 Real operator()(const SingularSet& singularities,
00230 concepts::Real3d point, const Hexahedron* elm) const;
00231 };
00232
00233 std::ostream& operator<<(std::ostream& os, const DaugeWeight& p);
00234
00235
00236
00244 class ShortestDistLimited {
00245 public:
00246 ShortestDistLimited() : shortestdist_() {}
00255 Real operator()(const SingularSet& singularities,
00256 concepts::Real3d point, const Hexahedron* elm) const {
00257 return shortestdist_(singularities, point, elm);
00258 }
00259 private:
00260 const ShortestDist shortestdist_;
00261 };
00262
00263 std::ostream& operator<<(std::ostream& os, const ShortestDistLimited& p);
00264
00265 }
00266
00267 #endif // shortestDist_hh