if (line->manifold_id() != numbers::flat_manifold_id)
{
CellData<1> boundary_line;
+
boundary_line.vertices[0] =
line->vertex_index(0) + offset;
boundary_line.vertices[1] =
line->vertex_index(1) + offset;
+
boundary_line.manifold_id = line->manifold_id();
+ boundary_line.boundary_id =
+ numbers::internal_face_boundary_id; // default
+
subcell_data.boundary_lines.push_back(
boundary_line); // trivially-copyable
}
if (face->manifold_id() != numbers::flat_manifold_id)
{
CellData<2> boundary_quad;
+
boundary_quad.vertices[0] =
face->vertex_index(0) + offset;
boundary_quad.vertices[1] =
face->vertex_index(3) + offset;
boundary_quad.manifold_id = face->manifold_id();
+ boundary_quad.boundary_id =
+ numbers::internal_face_boundary_id; // default
+
subcell_data.boundary_quads.push_back(
boundary_quad); // trivially-copyable
}
numbers::flat_manifold_id)
{
CellData<1> boundary_line;
+
boundary_line.vertices[0] =
cell->line(l)->vertex_index(0) + offset;
boundary_line.vertices[1] =
cell->line(l)->vertex_index(1) + offset;
+
boundary_line.manifold_id =
cell->line(l)->manifold_id();
+ boundary_line.boundary_id =
+ numbers::internal_face_boundary_id; // default
+
subcell_data.boundary_lines.push_back(
boundary_line); // trivially_copyable
}
(subcell_data.boundary_lines[i].vertices[1] ==
map_vert_index[face->line(e)->vertex_index(0)])))
{
+ subcell_data.boundary_lines[i].boundary_id =
+ numbers::internal_face_boundary_id;
edge_found = true;
break;
}
map_vert_index[face->line(e)->vertex_index(0)];
edge.vertices[1] =
map_vert_index[face->line(e)->vertex_index(1)];
- edge.boundary_id = numbers::internal_face_boundary_id;
+ edge.boundary_id = 0;
edge.manifold_id = face->line(e)->manifold_id();
subcell_data.boundary_lines.push_back(edge);
numbers::internal_face_boundary_id));
if (apply_all_indicators_to_manifolds)
- subcelldata.boundary_lines.back().manifold_id =
- static_cast<types::manifold_id>(material_id);
+ {
+ subcelldata.boundary_lines.back().boundary_id =
+ numbers::internal_face_boundary_id;
+ subcelldata.boundary_lines.back().manifold_id =
+ static_cast<types::manifold_id>(material_id);
+ }
else
- subcelldata.boundary_lines.back().boundary_id =
- static_cast<types::boundary_id>(material_id);
+ {
+ subcelldata.boundary_lines.back().boundary_id =
+ static_cast<types::boundary_id>(material_id);
+ subcelldata.boundary_lines.back().manifold_id =
+ numbers::flat_manifold_id;
+ }
// transform from ucd to
// consecutive numbering
numbers::internal_face_boundary_id));
if (apply_all_indicators_to_manifolds)
- subcelldata.boundary_quads.back().manifold_id =
- static_cast<types::manifold_id>(material_id);
+ {
+ subcelldata.boundary_quads.back().boundary_id =
+ numbers::internal_face_boundary_id;
+ subcelldata.boundary_quads.back().manifold_id =
+ static_cast<types::manifold_id>(material_id);
+ }
else
- subcelldata.boundary_quads.back().boundary_id =
- static_cast<types::boundary_id>(material_id);
+ {
+ subcelldata.boundary_quads.back().boundary_id =
+ static_cast<types::boundary_id>(material_id);
+ subcelldata.boundary_quads.back().manifold_id =
+ numbers::flat_manifold_id;
+ }
// transform from ucd to
// consecutive numbering
"manifold ids"));
line->set_manifold_id(subcell_line.manifold_id);
- // Assert that only exterior lines are given a boundary
- // indicator; however, it is possible that someone may
- // want to give an interior line a manifold id (and thus
- // lists this line in the subcell_data structure), and we
- // need to allow that
+ // assert that only exterior lines are given a boundary
+ // indicator
if (subcell_line.boundary_id != numbers::internal_face_boundary_id)
{
- if (line->boundary_id() == numbers::internal_face_boundary_id)
- {
- // if we are here, it means that we want to assign a
- // boundary indicator different from
- // numbers::internal_face_boundary_id to an internal line.
- // As said, this would be not allowed, and an exception
- // should be immediately thrown. Still, there is the
- // possibility that one only wants to specify a manifold_id
- // here. If that is the case (manifold_id !=
- // numbers::flat_manifold_id) the operation is allowed.
- // Otherwise, we really tried to specify a boundary_id (and
- // not a manifold_id) to an internal face. The exception
- // must be thrown.
- if (subcell_line.manifold_id == numbers::flat_manifold_id)
- {
- // If we are here, this assertion will surely fail, for
- // the aforementioned reasons
- AssertThrow(!(line->boundary_id() ==
- numbers::internal_face_boundary_id),
- ExcInteriorLineCantBeBoundary(
- line->vertex_index(0),
- line->vertex_index(1),
- subcell_line.boundary_id));
- }
- }
- else
- line->set_boundary_id_internal(subcell_line.boundary_id);
+ AssertThrow(
+ line->boundary_id() != numbers::internal_face_boundary_id,
+ ExcInteriorLineCantBeBoundary(line->vertex_index(0),
+ line->vertex_index(1),
+ subcell_line.boundary_id));
+ line->set_boundary_id_internal(subcell_line.boundary_id);
}
}