38 #ifndef GETFEM_MESH_REGION 39 #define GETFEM_MESH_REGION 68 typedef std::bitset<MAX_FACES_PER_CV+1> face_bitset;
75 typedef std::map<size_type,face_bitset> map_t;
80 typedef map_t::const_iterator const_iterator;
92 std::shared_ptr<impl> p;
111 void update_partition_iterators()
const;
113 impl &wp() {
return *p.get(); }
114 const impl &rp()
const {
return *p.get(); }
117 void touch_parent_mesh();
121 const_iterator partition_begin( )
const;
125 const_iterator partition_end ( )
const;
128 const_iterator begin( )
const;
131 const_iterator end ( )
const;
175 size_type get_type()
const {
return type_; }
177 void set_type(
size_type type) { type_ = type; }
182 void allow_partitioning();
185 void bounding_box(base_node& Pmin, base_node& Pmax)
const;
190 void prohibit_partitioning();
192 bool is_partitioning_allowed()
const;
209 face_bitset operator[](
size_t cv)
const;
213 const dal::bit_vector& index()
const;
214 void add(
const dal::bit_vector &bv);
230 bool is_empty()
const;
232 bool is_only_faces()
const;
233 bool is_boundary()
const {
return is_only_faces(); }
235 bool is_only_convexes()
const;
236 face_bitset faces_of_convex(
size_type cv)
const;
237 face_bitset and_mask()
const;
238 face_bitset or_mask()
const;
239 void error_if_not_faces()
const;
240 void error_if_not_convexes()
const;
241 void error_if_not_homogeneous()
const;
242 const mesh *get_parent_mesh(
void)
const {
return parent_mesh; }
243 void set_parent_mesh(
mesh *pm) { parent_mesh = pm; }
254 typedef mesh_region::map_t::const_iterator const_iterator;
256 dal::bit_const_iterator itb, iteb;
257 const_iterator it, ite;
262 #if GETFEM_PARA_LEVEL > 1 263 std::unique_ptr<mesh_region> mpi_rg;
266 void init(
const dal::bit_vector &s);
271 bool intersect_with_mpi =
false);
273 size_type is_face()
const {
return f_ != 0; }
277 bool operator++() {
return next(); }
279 bool finished()
const {
return finished_; }
283 if (whole_mesh)
return false;
284 if (c.none())
return false;
285 do { ++f_; }
while (!c.test(f_));
291 friend std::ostream & operator <<(std::ostream &os,
const mesh_region &w);
structure used to hold a set of convexes and/or convex faces.
static mesh_region all_convexes()
provide a default value for the mesh_region parameters of assembly procedures etc.
Provide a dynamic bit container.
specialization for bool, to circumvent the shortcommings of standards library specialization for std:...
Definition of convex structures.
Describe a mesh (collection of convexes (elements) and points).
size_t size_type
used as the common size type in the library
"iterator" class for regions.
GEneric Tool for Finite Element Methods.
gmm::uint16_type short_type
used as the common short type integer in the library
size_type nb_convex() const
Number of convexes in the region, or on the partition on the current thread.
defines and typedefs for namespace getfem