Class documentation of Concepts

Loading...
Searching...
No Matches
singularSet.hh
Go to the documentation of this file.
1
6#ifndef singularSet_hh
7#define singularSet_hh
8
11#include "geometry/topology.hh"
12#include "geometry/mesh.hh"
13
14namespace hp3D {
15// forward declarations
16 class Hexahedron;
17 class TrivialWeight;
18
19 using concepts::Real;
20
21 // ********************************************************** SingularEdge **
22
31 friend std::ostream& operator<<(std::ostream& os, const SingularEdge& s);
32 public:
41 const concepts::Real3d vtx1) :
42 edge_(edge), vtx0_(vtx0), vtx1_(vtx1) {
43 diffVector_ = diffVectorNormed_ = (vtx1_-vtx0_);
44 diffVectorNormed_ *= 1.0 / diffVectorNormed_.l2_2();
45 diffVectorTimesVtx0Normed_ = diffVectorNormed_ * vtx0_;
46 }
48 const concepts::Connector1* edge() const { return edge_; }
75 Real distance(const concepts::Real3d point, const Hexahedron* elm) const;
77 Real distanceV0(const concepts::Real3d point, const Hexahedron* elm) const;
79 Real distanceV1(const concepts::Real3d point, const Hexahedron* elm) const;
80 private:
82 const concepts::Connector1* edge_;
84 const concepts::Real3d vtx0_, vtx1_;
86 concepts::Real3d diffVector_;
88 concepts::Real3d diffVectorNormed_;
92 concepts::Real diffVectorTimesVtx0Normed_;
93 };
94
95 // ******************************************************** SingularVertex **
96
105 friend std::ostream& operator<<(std::ostream& os, const SingularVertex& s);
106 public:
112 const concepts::Real3d vtx0) :
113 vertex_(vertex), vtx0_(vtx0) {}
115 const concepts::Connector0* vertex() const { return vertex_; }
118 Real distance(concepts::Real3d point) const;
122 Real distance(concepts::Real3d point, const Hexahedron* elm) const;
123 private:
125 const concepts::Connector0* vertex_;
127 const concepts::Real3d vtx0_;
128 };
129
130 // *********************************************************** SingularSet **
131
137 friend std::ostream& operator<<(std::ostream& os, const SingularSet& s);
138 public:
139 SingularSet() : vertices_(0), edges_(0) {}
140 ~SingularSet();
144 void add(const concepts::Attribute& attrib, concepts::Mesh3& msh);
153 private:
158 };
159
160} // namespace hp3D
161
162#endif // singularSet_hh
Real l2_2() const
Returns the square of the Euclidian norm of the vector.
Real distance(const concepts::Real3d point, const Hexahedron *elm) const
const concepts::Connector1 * edge() const
Returns a pointer to the edge object (topological, connector)
Real distanceV1(const concepts::Real3d point, const Hexahedron *elm) const
Returns the the square of the distance of point to vtx1_.
Real distanceV0(const concepts::Real3d point, const Hexahedron *elm) const
Returns the the square of the distance of point to vtx0_.
SingularEdge(const concepts::Connector1 *edge, const concepts::Real3d vtx0, const concepts::Real3d vtx1)
void add(const concepts::Attribute &attrib, concepts::Mesh3 &msh)
concepts::Scan< SingularEdge > * edgesScan() const
Scanner over all singular edges.
concepts::Scan< SingularVertex > * verticesScan() const
Scanner over all singular vertices.
const concepts::Connector0 * vertex() const
Returns a pointer to the vertex object (topological, connector)
SingularVertex(const concepts::Connector0 *vertex, const concepts::Real3d vtx0)
Real distance(concepts::Real3d point) const
Real distance(concepts::Real3d point, const Hexahedron *elm) const
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320
Definition meshDX.hh:23