Go to the documentation of this file.
6 #ifndef singularSet2D_hh
7 #define singularSet2D_hh
11 #include "geometry/topology.hh"
12 #include "geometry/mesh.hh"
13 #include "hp2D/quad.hh"
15 namespace hp2D {
17  using concepts::Real;
19  // ******************************************************** SingularVertex **
29  friend std::ostream& operator<<(std::ostream& os, const SingularVertex& s);
30  public:
36  const concepts::Real2d vtx0) :
37  vertex_(vertex), vtx0_(vtx0) {}
39  const concepts::Connector0* vertex() const { return vertex_; }
47  Real distance(concepts::Real2d point, const Quad<Real>* elm) const {
48  return distance(elm->chi(point[0], point[1]));
49  }
50  private:
55  };
57  // *********************************************************** SingularSet **
63  class SingularSet {
64  friend std::ostream& operator<<(std::ostream& os, const SingularSet& s);
65  public:
71  void add(const concepts::Attribute& attrib, concepts::Mesh2& msh);
75  }
76  private:
79  };
81 } // namespace hp2D
83 #endif // singularSet2D_hh
const concepts::Connector0 * vertex_
Pointer to the vertex object (topological, connector)
Definition: singularSet.hh:52
const concepts::Real2d vtx0_
Coordinates of the vertex.
Definition: singularSet.hh:54
friend std::ostream & operator<<(std::ostream &os, const SingularVertex &s)
Joiner class with multiple successors, i.e.
void add(const concepts::Attribute &attrib, concepts::Mesh2 &msh)
Add all vertices and edges in the mesh with attrib to the set of singular vertices and edges.
2D hp-FEM for H1-conforming elements.
Class for handling a set of singular vertices.
Definition: singularSet.hh:63
concepts::Scan< SingularVertex > * verticesScan() const
Scanner over all singular vertices.
Definition: singularSet.hh:73
Real distance(concepts::Real2d point, const Quad< Real > *elm) const
Returns the distance from the vertex to a point inside an Quad (point in reference coordinates)
Definition: singularSet.hh:47
friend std::ostream & operator<<(std::ostream &os, const SingularSet &s)
Class for storing a singular vertex with the coordinates.
Definition: singularSet.hh:28
concepts::Joiner< SingularVertex *, 1 > * vertices_
List of singular vertices.
Definition: singularSet.hh:78
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
SingularVertex(const concepts::Connector0 *vertex, const concepts::Real2d vtx0)
Definition: singularSet.hh:35
An abstract class for 2D meshes.
Definition: mesh.hh:103
Real distance(concepts::Real2d point) const
Returns the square of the distance from the vertex to the point (in physical coordinates)
Attributes for elements of the topology.
Definition: connector.hh:22
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
const concepts::Connector0 * vertex() const
Returns a pointer to the vertex object (topological, connector)
Definition: singularSet.hh:39
A 0D element of the topology.
Definition: connector.hh:147
Scanner for a list of pointers.
Page URL:
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich