57 using face_bitset = std::bitset<MAX_FACES_PER_CV+1>;
58 using map_t = std::map<size_type, face_bitset>;
62 using const_iterator = map_t::const_iterator;
67 mutable dal::bit_vector serial_index_;
69 std::shared_ptr<impl> p;
77 std::atomic_bool partitioning_allowed;
93 mutable bool serial_index_updated;
95 void mark_region_changed()
const;
97 void update_index()
const;
99 void update_partition_iterators()
const;
101 impl &wp() {
return *p.get(); }
102 const impl &rp()
const {
return *p.get(); }
105 void touch_parent_mesh();
109 const_iterator partition_begin()
const;
113 const_iterator partition_end()
const;
116 const_iterator begin()
const;
119 const_iterator end()
const;
163 size_type get_type()
const {
return type_; }
165 void set_type(
size_type type) { type_ = type; }
170 void allow_partitioning();
173 void bounding_box(base_node& Pmin, base_node& Pmax)
const;
178 void prohibit_partitioning();
180 bool is_partitioning_allowed()
const;
190 const mesh_region& from_mesh(
const mesh &m)
const;
192 mesh_region& operator=(
const mesh_region &mr);
194 bool compare(
const mesh &m1,
const mesh_region &mr,
const mesh &m2)
const;
196 face_bitset operator[](
size_t cv)
const;
200 const dal::bit_vector& index()
const;
201 void add(
const dal::bit_vector &bv);
217 bool is_empty()
const;
219 bool is_only_faces()
const;
220 bool is_boundary()
const {
return is_only_faces(); }
222 bool is_only_convexes()
const;
223 face_bitset faces_of_convex(
size_type cv)
const;
224 face_bitset and_mask()
const;
225 face_bitset or_mask()
const;
226 void error_if_not_faces()
const;
227 void error_if_not_convexes()
const;
228 void error_if_not_homogeneous()
const;
229 const mesh *get_parent_mesh(
void)
const {
return parent_mesh; }
230 void set_parent_mesh(mesh *pm) { parent_mesh = pm; }
239 typedef mesh_region::map_t::const_iterator const_iterator;
241 dal::bit_const_iterator itb, iteb;
242 const_iterator it, ite;
247 #if GETFEM_PARA_LEVEL > 1
248 std::unique_ptr<mesh_region> mpi_rg;
251 void init(
const dal::bit_vector &s);
256 bool intersect_with_mpi =
false);
258 size_type is_face()
const {
return f_ != 0; }
262 bool operator++() {
return next(); }
264 bool finished()
const {
return finished_; }
267 if (whole_mesh)
return false;
268 if (c.none())
return false;
269 do { ++f_; }
while (!c.test(f_));
275 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.