56 using face_bitset = std::bitset<MAX_FACES_PER_CV+1>;
57 using map_t = std::map<size_type, face_bitset>;
61 using const_iterator = map_t::const_iterator;
66 mutable dal::bit_vector serial_index_;
68 std::shared_ptr<impl> p;
76 std::atomic_bool partitioning_allowed;
92 mutable bool serial_index_updated;
94 void mark_region_changed()
const;
96 void update_index()
const;
98 void update_partition_iterators()
const;
100 impl &wp() {
return *p.get(); }
101 const impl &rp()
const {
return *p.get(); }
104 void touch_parent_mesh();
108 const_iterator partition_begin()
const;
112 const_iterator partition_end()
const;
115 const_iterator begin()
const;
118 const_iterator end()
const;
162 size_type get_type()
const {
return type_; }
164 void set_type(
size_type type) { type_ = type; }
169 void allow_partitioning();
172 void bounding_box(base_node& Pmin, base_node& Pmax)
const;
177 void prohibit_partitioning();
179 bool is_partitioning_allowed()
const;
189 const mesh_region& from_mesh(
const mesh &m)
const;
191 mesh_region& operator=(
const mesh_region &mr);
193 bool compare(
const mesh &m1,
const mesh_region &mr,
const mesh &m2)
const;
195 face_bitset operator[](
size_t cv)
const;
199 const dal::bit_vector& index()
const;
200 void add(
const dal::bit_vector &bv);
216 bool is_empty()
const;
218 bool is_only_faces()
const;
219 bool is_boundary()
const {
return is_only_faces(); }
221 bool is_only_convexes()
const;
222 face_bitset faces_of_convex(
size_type cv)
const;
223 face_bitset and_mask()
const;
224 face_bitset or_mask()
const;
225 void error_if_not_faces()
const;
226 void error_if_not_convexes()
const;
227 void error_if_not_homogeneous()
const;
228 const mesh *get_parent_mesh(
void)
const {
return parent_mesh; }
229 void set_parent_mesh(mesh *pm) { parent_mesh = pm; }
238 typedef mesh_region::map_t::const_iterator const_iterator;
240 dal::bit_const_iterator itb, iteb;
241 const_iterator it, ite;
246 #if GETFEM_PARA_LEVEL > 1
247 std::unique_ptr<mesh_region> mpi_rg;
250 void init(
const dal::bit_vector &s);
255 bool intersect_with_mpi =
false);
257 size_type is_face()
const {
return f_ != 0; }
261 bool operator++() {
return next(); }
263 bool finished()
const {
return finished_; }
266 if (whole_mesh)
return false;
267 if (c.none())
return false;
268 do { ++f_; }
while (!c.test(f_));
274 friend std::ostream & operator <<(std::ostream &os,
const mesh_region &w);
Definition of convex structures.
"iterator" class for regions.
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.
size_type nb_convex() const
Number of convexes in the region, or on the partition on the current thread.
Describe a mesh (collection of convexes (elements) and points).
Provide a dynamic bit container.
defines and typedefs for namespace getfem
void clear(L &l)
clear (fill with zeros) a vector or matrix.
void add(const L1 &l1, L2 &l2)
*/
gmm::uint16_type short_type
used as the common short type integer in the library
size_t size_type
used as the common size type in the library
GEneric Tool for Finite Element Methods.
const mesh_region & dummy_mesh_region()
Dummy mesh_region for default parameter of functions.