32 #ifndef BGEOT_CONVEX_STRUCTURE_H__ 33 #define BGEOT_CONVEX_STRUCTURE_H__ 52 # define MAX_FACES_PER_CV 31 59 typedef std::vector<pconvex_structure> convex_structure_faces_ct;
60 typedef std::vector<short_type> convex_ind_ct;
77 convex_structure_faces_ct faces_struct;
78 std::vector<convex_ind_ct> faces;
79 convex_ind_ct dir_points_;
80 pconvex_structure basic_pcvs;
83 pconvex_structure prod_a, prod_b;
86 mutable std::map<std::vector<short_type>, convex_ind_ct> intersection_points;
93 inline dim_type
dim()
const {
return Nc; }
111 const convex_ind_ct &
117 {
return dir_points_; }
122 {
return faces_struct; }
127 return ref_convex_ind_ct(faces[i].begin(),
132 void init_for_adaptative(pconvex_structure cvs);
140 pconvex_structure *pprod2=0)
const {
141 if (pprod1) *pprod1 = prod_a;
142 if (pprod2) *pprod2 = prod_b;
143 return prod_a ?
true :
false;
146 : auto_basic(auto_b), prod_a(0), prod_b(0)
147 { DAL_STORED_OBJECT_DEBUG_CREATED(
this,
"Convex structure"); }
149 { DAL_STORED_OBJECT_DEBUG_DESTROYED(
this,
"Convex structure"); }
152 { DAL_STORED_OBJECT_DEBUG_CREATED(
this,
"Convex structure"); }
153 friend std::shared_ptr<convex_structure> new_convex_structure();
159 {
if (cv->auto_basic)
return cv;
else return cv->basic_pcvs; }
161 inline std::shared_ptr<convex_structure> new_convex_structure()
162 {
return std::make_shared<convex_structure>(
false); }
203 IS_DEPRECATED
inline pconvex_structure
205 IS_DEPRECATED
inline pconvex_structure
friend pconvex_structure basic_structure(pconvex_structure cv)
Original structure (if concerned)
indexed array reference (given a container X, and a set of indexes I, this class provides a pseudo-co...
base class for static stored objects
Stores interdependent getfem objects.
std::ostream & operator<<(std::ostream &o, const convex_structure &cv)
Print the details of the convex structure cvs to the output stream o.
bool is_product(pconvex_structure *pprod1=0, pconvex_structure *pprod2=0) const
Return true if the convex structure is indeed a direct product of two convex structures.
ref_convex_ind_ct ind_dir_points_of_face(short_type i) const
Return "direct" points indexes for a given face.
pconvex_structure prism_P1_structure(dim_type nc)
Give a pointer on the structures of a prism of dimension d.
Multivariate polynomials.
std::shared_ptr< const convex_structure > pconvex_structure
Pointer on a convex structure description.
size_t size_type
used as the common size type in the library
pconvex_structure pyramid_QK_structure(dim_type k)
Give a pointer on the 3D pyramid structure for a degree k = 1 or 2.
Provide some simple pseudo-containers.
pconvex_structure prism_incomplete_P2_structure()
Give a pointer on the 3D quadratic incomplete prism structure.
pconvex_structure convex_product_structure(pconvex_structure a, pconvex_structure b)
Give a pointer on the structures of a convex which is the direct product of the convexes represented ...
short_type nb_points() const
Number of vertices.
gmm::uint16_type short_type
used as the common short type integer in the library
pconvex_structure parallelepiped_structure(dim_type nc, dim_type k)
Give a pointer on the structures of a parallelepiped of dimension d.
pconvex_structure generic_dummy_structure(dim_type nc, size_type n, short_type nf)
Generic convex with n global nodes.
pconvex_structure Q2_incomplete_structure(dim_type nc)
Give a pointer on the structures of a incomplete Q2 quadrilateral/hexahedral of dimension d = 2 or 3...
const convex_structure_faces_ct & faces_structure() const
Give a pointer array on the structures of the faces.
tensor class, used in mat_elem computations.
pconvex_structure simplex_structure(dim_type nc)
Give a pointer on the structures of a simplex of dimension d.
dim_type dim() const
Dimension of the convex.
short_type nb_faces() const
Number of faces.
const convex_ind_ct & ind_points_of_face(short_type i) const
Give an array of the indexes of the vertices of a face.
const convex_ind_ct & ind_dir_points() const
Return "direct" points indexes.
defines and typedefs for namespace bgeot
const convex_ind_ct & ind_common_points_of_faces(const std::vector< short_type > &ftab) const
Give an array of the indexes of the vertices at the intersection of a set of faces.
pconvex_structure polygon_structure(short_type nbt)
Give a pointer on the structures of a polygon with n vertex.
short_type nb_points_of_face(short_type i) const
Number of vertices of a face.
pconvex_structure pyramid_Q2_incomplete_structure()
Give a pointer on the 3D quadratic incomplete pyramid structure.