37 #ifndef BGEOT_CONVEX_REF_H__
38 #define BGEOT_CONVEX_REF_H__
49 public std::vector<base_node> {
51 {
return std::vector<base_node>::operator [](i); }
53 : std::vector<base_node>(it, ite)
54 { DAL_STORED_OBJECT_DEBUG_CREATED(
this,
"Stored point tab"); }
56 { DAL_STORED_OBJECT_DEBUG_DESTROYED(
this,
"Stored point tab"); }
59 typedef std::shared_ptr<const stored_point_tab> pstored_point_tab;
64 template<
class CONT> pstored_point_tab store_point_tab(
const CONT &TAB)
69 class convex_of_reference;
70 typedef std::shared_ptr<const convex_of_reference> pconvex_ref;
93 std::vector<base_small_vector> normals_;
94 pstored_point_tab ppoints;
95 std::shared_ptr<mesh_structure> psimplexified_convex;
96 pconvex_ref basic_convex_ref_;
97 const bool auto_basic;
113 GMM_ASSERT1(!auto_basic,
"This method has to be overloaded in every "
115 basic_convex_ref_->project_into(pt);
117 bool is_basic()
const {
return auto_basic; }
119 const std::vector<base_small_vector> &
normals()
const
124 pstored_point_tab pspt()
const {
return ppoints; }
125 virtual ~convex_of_reference()
126 { DAL_STORED_OBJECT_DEBUG_DESTROYED(
this,
"Convex of reference"); }
138 {
return cvr->auto_basic ? cvr : cvr->basic_convex_ref_; }
141 void qhull_delaunay(
const std::vector<base_node> &pts,
142 gmm::dense_matrix<size_type>& simplexes);
161 IS_DEPRECATED pconvex_ref
inline
Convex objects (structure + vertices)
Base class for reference convexes.
const stored_point_tab & points() const
return the vertices of the reference convex.
friend pconvex_ref basic_convex_ref(pconvex_ref cvr)
return the associated order 1 reference convex.
const mesh_structure * simplexified_convex() const
return a mesh structure composed of simplexes whose union is the reference convex.
virtual void project_into(base_node &pt) const
will project any given point lying outside the convex onto the convex outer surface
virtual scalar_type is_in(const base_node &) const =0
return a negative or null number if the base_node is in the convex.
const std::vector< base_small_vector > & normals() const
return the normal vector for each face.
virtual scalar_type is_in_face(short_type, const base_node &) const =0
return a null (or almost zero) if pt is in the face of the convex.
generic definition of a convex ( bgeot::convex_structure + vertices coordinates )
base class for static stored objects
pconvex_ref convex_ref_product(pconvex_ref a, pconvex_ref b)
tensorial product of two convex ref.
gmm::uint16_type short_type
used as the common short type integer in the library
pconvex_ref equilateral_simplex_of_reference(dim_type nc)
equilateral simplex (degree 1).
pconvex_ref pyramid_QK_of_reference(dim_type k)
pyramidal element of reference of degree k (k = 1 or 2 only)
pconvex_ref simplex_of_reference(dim_type nc, short_type K)
returns a simplex of reference of dimension nc and degree k
std::shared_ptr< const convex_structure > pconvex_structure
Pointer on a convex structure description.
pconvex_ref pyramid_Q2_incomplete_of_reference()
incomplete quadratic pyramidal element of reference (13-node)
pconvex_ref prism_incomplete_P2_of_reference()
incomplete quadratic prism element of reference (15-node)
pconvex_ref parallelepiped_of_reference(dim_type nc, dim_type k)
parallelepiped of reference of dimension nc (and degree 1)
pconvex_ref generic_dummy_convex_ref(dim_type nc, size_type n, short_type nf)
generic convex with n global nodes
size_t size_type
used as the common size type in the library
pconvex_ref Q2_incomplete_of_reference(dim_type nc)
incomplete Q2 quadrilateral/hexahedral of reference of dimension d = 2 or 3
pconvex_ref basic_convex_ref(pconvex_ref cvr)
return the associated order 1 reference convex.
pconvex_ref prism_of_reference(dim_type nc)
prism of reference of dimension nc (and degree 1)