Class documentation of Concepts

Loading...
Searching...
No Matches
shortestDist.hh
Go to the documentation of this file.
1
6#ifndef shortestDist2D_hh
7#define shortestDist2D_hh
8
9#include <cmath>
11#include "hp2D/singularSet.hh"
12
13namespace hp2D {
14
15 // forward declarations
16 template<class F>
17 class Quad;
18 using concepts::Real;
19
20 // ********************************************************* TrivialWeight **
21
27 public:
30 const Quad<Real>*) const { return 1.0; }
31 };
32
33 std::ostream& operator<<(std::ostream& os, const TrivialWeight& p);
34
35 // ********************************************************** ShortestDist **
36
44 public:
52 Real operator()(const SingularSet& singularities,
53 concepts::Real2d point, const Quad<Real>* elm) const;
54 };
55
56 std::ostream& operator<<(std::ostream& os, const ShortestDist& p);
57
58 // ********************************************************** DistancePost **
59
69 template<typename DistClass, typename Function>
71 public:
75 Real operator()(const SingularSet& singularities,
76 concepts::Real2d point, const Quad<Real>* elm) const {
77 return Function::post(dist_(singularities, point, elm));
78 }
79 private:
80 DistClass dist_;
81 };
82
83 template<typename DistClass, typename Function>
84 inline std::ostream& operator<<(std::ostream& os,
85 const DistancePost<DistClass, Function>& p) {
86 return os << Function() << '(' << DistClass() << ')';
87 }
88
89
90 // ********************************************************** Postprocess4 **
91
97 public:
98 static Real post(Real x) { return std::pow(x, 0.4); }
99 };
100
101 std::ostream& operator<<(std::ostream& os, const Postprocess4& p);
102
103 // ********************************************************** Postprocess7 **
104
110 public:
111 static Real post(Real x) { return std::pow(x, 0.7); }
112 };
113
114 std::ostream& operator<<(std::ostream& os, const Postprocess7& p);
115
116 // ********************************************************** Postprocess8 **
117
123 public:
124 static Real post(Real x) { return std::pow(x, 0.8); }
125 };
126
127 std::ostream& operator<<(std::ostream& os, const Postprocess8& p);
128
129 // ********************************************************** Postprocess9 **
130
136 public:
137 static Real post(Real x) { return std::pow(x, 0.9); }
138 };
139
140 std::ostream& operator<<(std::ostream& os, const Postprocess9& p);
141
142 // ******************************************************* PostprocessSqrt **
143
149 public:
150 static Real post(Real x) { return std::sqrt(x); }
151 };
152
153 std::ostream& operator<<(std::ostream& os, const PostprocessSqrt& p);
154
155} // namespace hp2D
156
157#endif // shortestDist2D_hh
Real operator()(const SingularSet &singularities, concepts::Real2d point, const Quad< Real > *elm) const
Real operator()(const SingularSet &singularities, concepts::Real2d point, const Quad< Real > *elm) const
Real operator()(const SingularSet &, concepts::Real2d, const Quad< Real > *) const
Returns 1.
double Real
Definition typedefs.hh:39