Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

hp2D/singularSet.hh
Go to the documentation of this file.
00001 /* singular vertices
00002  */
00003 
00004 #ifndef singularSet2D_hh
00005 #define singularSet2D_hh
00006 
00007 #include "basics/vectorsMatrices.hh"
00008 #include "toolbox/scannerConnectors.hh"
00009 #include "geometry/topology.hh"
00010 #include "geometry/mesh.hh"
00011 #include "hp2D/quad.hh"
00012 
00013 namespace hp2D {
00014 
00015   using concepts::Real;
00016 
00017   // ******************************************************** SingularVertex **
00018 
00026   class SingularVertex {
00027     friend std::ostream& operator<<(std::ostream& os, const SingularVertex& s);
00028   public:
00033     SingularVertex(const concepts::Connector0* vertex,
00034        const concepts::Real2d vtx0) :
00035       vertex_(vertex), vtx0_(vtx0) {}
00037     const concepts::Connector0* vertex() const { return vertex_; }
00040     Real distance(concepts::Real2d point) const;
00044     Real distance(concepts::Real2d point, const Quad<Real>* elm) const {
00045       return distance(elm->chi(point[0], point[1]));
00046     }
00047   private:
00049     const concepts::Connector0* vertex_;
00051     const concepts::Real2d vtx0_;
00052   };
00053 
00054   // *********************************************************** SingularSet **
00055 
00060   class SingularSet {
00061     friend std::ostream& operator<<(std::ostream& os, const SingularSet& s);
00062   public:
00063     SingularSet() : vertices_(0) {}
00064     ~SingularSet();
00068     void add(const concepts::Attribute& attrib, concepts::Mesh2& msh);
00070     concepts::Scan<SingularVertex>* verticesScan() const {
00071       return new concepts::PListScan<SingularVertex>(*vertices_);
00072     }
00073   private:
00075     concepts::Joiner<SingularVertex*, 1>* vertices_;
00076   };
00077 
00078 } // namespace hp2D
00079 
00080 #endif // singularSet2D_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)