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 
14 namespace hp3D {
15 // forward declarations
16  class Hexahedron;
17  class TrivialWeight;
18 
19  using concepts::Real;
20 
21  // ********************************************************** SingularEdge **
22 
30  class SingularEdge {
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) {
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:
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_; }
122  Real distance(concepts::Real3d point, const Hexahedron* elm) const;
123  private:
128  };
129 
130  // *********************************************************** SingularSet **
131 
136  class SingularSet {
137  friend std::ostream& operator<<(std::ostream& os, const SingularSet& s);
138  public:
144  void add(const concepts::Attribute& attrib, concepts::Mesh3& msh);
148  }
152  }
153  private:
158  };
159 
160 } // namespace hp3D
161 
162 #endif // singularSet_hh
const concepts::Connector1 * edge() const
Returns a pointer to the edge object (topological, connector)
Definition: singularSet.hh:48
const concepts::Real3d vtx0_
Coordinates of the vertices of the edge ( and )
Definition: singularSet.hh:84
A 3D FEM element: a hexahedron.
Definition: hexahedron.hh:37
Real distanceV1(const concepts::Real3d point, const Hexahedron *elm) const
Returns the the square of the distance of point to vtx1_.
concepts::Real3d diffVectorNormed_
Scaled difference vector: .
Definition: singularSet.hh:88
Real distance(concepts::Real3d point, const Hexahedron *elm) const
Returns the distance from the vertex to a point inside an Hexahedron (point in reference coordinates)
const concepts::Connector1 * edge_
Pointer to the edge object (topological, connector)
Definition: singularSet.hh:82
const concepts::Connector0 * vertex_
Pointer to the vertex object (topological, connector)
Definition: singularSet.hh:125
friend std::ostream & operator<<(std::ostream &os, const SingularEdge &s)
SingularVertex(const concepts::Connector0 *vertex, const concepts::Real3d vtx0)
Constructor.
Definition: singularSet.hh:111
concepts::Real3d diffVector_
Difference vector between the 2 vertices: .
Definition: singularSet.hh:86
An abstract class for 3D meshes.
Definition: mesh.hh:112
Joiner class with multiple successors, i.e.
Real distance(const concepts::Real3d point, const Hexahedron *elm) const
Returns the square of the distance from the edge to a point inside elm.
concepts::Joiner< SingularVertex *, 1 > * vertices_
List of singular vertices.
Definition: singularSet.hh:155
const concepts::Connector0 * vertex() const
Returns a pointer to the vertex object (topological, connector)
Definition: singularSet.hh:115
Class for storing a singular edge with coordinates of its corners.
Definition: singularSet.hh:30
concepts::Joiner< SingularEdge *, 1 > * edges_
List of singular edges.
Definition: singularSet.hh:157
const concepts::Real3d vtx0_
Coordinates of the vertex.
Definition: singularSet.hh:127
Real l2_2() const
Returns the square of the Euclidian norm of the vector.
const concepts::Real3d vtx1_
Definition: singularSet.hh:84
friend std::ostream & operator<<(std::ostream &os, const SingularSet &s)
concepts::Real diffVectorTimesVtx0Normed_
Scalar product of the scaled difference vector and the vector to the first vertex:
Definition: singularSet.hh:92
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
Real distance(concepts::Real3d point) const
Returns the square of the distance from the vertex to the point (in physical coordinates)
friend std::ostream & operator<<(std::ostream &os, const SingularVertex &s)
concepts::Scan< SingularVertex > * verticesScan() const
Scanner over all singular vertices.
Definition: singularSet.hh:146
concepts::Scan< SingularEdge > * edgesScan() const
Scanner over all singular edges.
Definition: singularSet.hh:150
SingularEdge(const concepts::Connector1 *edge, const concepts::Real3d vtx0, const concepts::Real3d vtx1)
Constructor.
Definition: singularSet.hh:40
A 1D element of the topology.
Definition: connector.hh:182
Class for handling a set of singular edges and vertices.
Definition: singularSet.hh:136
Real distanceV0(const concepts::Real3d point, const Hexahedron *elm) const
Returns the the square of the distance of point to vtx0_.
3D hp-FEM for H1-conforming elements.
Definition: meshDX.hh:23
void add(const concepts::Attribute &attrib, concepts::Mesh3 &msh)
Add all vertices and edges in the mesh with attrib to the set of singular vertices and edges.
Attributes for elements of the topology.
Definition: connector.hh:22
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Class for storing a singular vertex with the coordinates.
Definition: singularSet.hh:104
A 0D element of the topology.
Definition: connector.hh:147
Scanner for a list of pointers.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich