38 _mesh = std::make_unique<Mesh>(*TestCommWorld);
44 0.2, 0.8, 0.2, 0.7,
QUAD9);
49 if (!
_mesh->is_serial())
51 _mesh->skip_noncritical_partitioning(
true);
75 for (
auto & elem :
_mesh->active_element_ptr_range())
77 const Point c = elem->vertex_average();
78 if (c(0) < 0.6 && c(1) < 0.4)
79 elem->subdomain_id() = 1;
81 elem->subdomain_id() = 2;
90 unsigned int parent_side_index_tag =
96 belem->get_extra_integer(parent_side_index_tag);
99 (static_cast<dof_id_type>(belem->interior_parent()->which_side_am_i(belem)),
103 std::set<boundary_id_type> left_id, right_id;
111 _mesh->get_boundary_info().add_elements
112 (right_id, *
_mesh,
false);
113 _mesh->prepare_for_use();
128 for (
auto & elem :
_mesh->active_element_ptr_range())
130 const Point c = elem->vertex_average();
131 if (c(0) < 0.6 && c(1) < 0.4)
140 if (c(0) < 0.75 && c(1) < 0.4)
142 if (c(0) < 0.6 && c(1) < 0.5)
150 std::set<boundary_id_type> requested_boundary_ids;
151 requested_boundary_ids.insert(bid);
152 std::set<subdomain_id_type> subdomains_relative_to;
153 subdomains_relative_to.insert(1);
154 _mesh->get_boundary_info().sync(requested_boundary_ids,
156 subdomains_relative_to);
std::unique_ptr< Mesh > _internal_boundary_mesh
std::unique_ptr< Mesh > _mesh
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
std::unique_ptr< Mesh > _left_boundary_mesh
void add_side(const dof_id_type elem, const unsigned short int side, const boundary_id_type id)
Add side side of element number elem with boundary id id to the boundary information data structure...
A Point defines a location in LIBMESH_DIM dimensional Real space.
std::unique_ptr< Mesh > _all_boundary_mesh