24#include <boost/algorithm/string.hpp>
25#include <boost/archive/binary_iarchive.hpp>
26#include <boost/io/ios_state.hpp>
27#include <boost/property_tree/ptree.hpp>
28#include <boost/property_tree/xml_parser.hpp>
29#include <boost/serialization/serialization.hpp>
31#ifdef DEAL_II_GMSH_WITH_API
42#ifdef DEAL_II_WITH_ASSIMP
43# include <assimp/Importer.hpp>
44# include <assimp/postprocess.h>
45# include <assimp/scene.h>
48#ifdef DEAL_II_TRILINOS_WITH_SEACAS
75 template <
int spacedim>
94 template <
int dim,
int spacedim>
108 template <
int dim,
int spacedim>
117 ReferenceCells::get_hypercube<dim>().n_vertices();
135template <
int dim,
int spacedim>
138 , default_format(ucd)
143template <
int dim,
int spacedim>
146 , default_format(ucd)
151template <
int dim,
int spacedim>
160template <
int dim,
int spacedim>
173 text[0] =
"# vtk DataFile Version 3.0";
176 text[3] =
"DATASET UNSTRUCTURED_GRID";
178 for (
unsigned int i = 0; i < 4; ++i)
181 if (i == 2 || i == 3)
183 line.compare(
text[i]) == 0,
186 "While reading VTK file, failed to find a header line with text <") +
193 std::vector<Point<spacedim>> vertices;
194 std::vector<CellData<dim>> cells;
205 unsigned int n_vertices;
210 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
214 in >>
x[0] >>
x[1] >>
x[2];
216 vertices.emplace_back();
217 for (
unsigned int d = 0; d < spacedim; ++d)
218 vertices.back()[d] =
x[d];
225 "While reading VTK file, failed to find POINTS section"));
235 std::vector<unsigned int> cell_types;
237 std::streampos
oldpos = in.tellg();
245 cell_types.resize(
n_ints);
247 for (
unsigned int i = 0; i <
n_ints; ++i)
263 unsigned int n_vertices;
267 if (cell_types[
count] == 10 || cell_types[
count] == 12)
275 cells.emplace_back(n_vertices);
277 for (
unsigned int j = 0;
j < n_vertices;
279 in >> cells.back().vertices[
j];
283 if (cell_types[
count] == 12)
285 std::swap(cells.back().vertices[2],
286 cells.back().vertices[3]);
287 std::swap(cells.back().vertices[6],
288 cells.back().vertices[7]);
291 cells.back().material_id = 0;
294 else if (cell_types[
count] == 5 || cell_types[
count] == 9)
301 subcelldata.boundary_quads.emplace_back(n_vertices);
303 for (
unsigned int j = 0;
j < n_vertices;
310 else if (cell_types[
count] == 3)
312 subcelldata.boundary_lines.emplace_back(n_vertices);
314 for (
unsigned int j = 0;
j < n_vertices;
325 "While reading VTK file, unknown cell type encountered"));
332 unsigned int n_vertices;
336 if (cell_types[
count] == 5 || cell_types[
count] == 9)
343 cells.emplace_back(n_vertices);
345 for (
unsigned int j = 0;
j < n_vertices;
347 in >> cells.back().vertices[
j];
351 if (cell_types[
count] == 9)
355 std::swap(cells.back().vertices[2],
356 cells.back().vertices[3]);
359 cells.back().material_id = 0;
362 else if (cell_types[
count] == 3)
366 subcelldata.boundary_lines.emplace_back(n_vertices);
368 for (
unsigned int j = 0;
j < n_vertices;
381 "While reading VTK file, unknown cell type encountered"));
392 cell_types[
count] == 3 && type == 2,
394 "While reading VTK file, unknown cell type encountered"));
395 cells.emplace_back(type);
397 for (
unsigned int j = 0;
j < type; ++
j)
398 in >> cells.back().vertices[
j];
400 cells.back().material_id = 0;
406 "While reading VTK file, failed to find CELLS section"));
415 "While reading VTK file, missing CELL_TYPES section. Found <" +
421 ExcMessage(
"The VTK reader found a CELL_DATA statement "
422 "that lists a total of " +
424 " cell data objects, but this needs to "
425 "equal the number of cells (which is " +
427 ") plus the number of quads (" +
429 " in 3d or the number of lines (" +
434 for (
unsigned int i = 0; i <
n_ints; ++i)
451 "The VTK reader found a CELL_DATA statement "
452 "that lists a total of " +
454 " cell data objects, but this needs to "
455 "equal the number of cells (which is " +
457 ") plus the number of quads (" +
459 " in 3d or the number of lines (" +
463 const std::vector<std::string> data_sets{
"MaterialID",
467 for (
unsigned int i = 0; i < data_sets.size(); ++i)
477 if (std::find(data_sets.begin(),
491 std::getline(in, line);
494 std::min(
static_cast<std::size_t
>(3),
495 line.size() - 1)) ==
"int",
497 "While reading VTK file, material- and manifold IDs can only have type 'int'."));
503 "While reading VTK file, missing keyword 'LOOKUP_TABLE'."));
509 "While reading VTK file, missing keyword 'default'."));
516 for (
unsigned int i = 0; i < cells.size(); ++i)
521 cells[i].material_id =
524 cells[i].manifold_id =
579 std::streampos
oldpos = in.tellg();
599 "While reading VTK file, missing keyword FieldData"));
603 for (
unsigned int i = 0; i <
n_fields; ++i)
605 std::string section_name;
606 std::string data_type;
615 "The VTK reader found a FIELD statement "
616 "that lists a total of " +
618 " cell data objects, but this needs to equal the number of cells (which is " +
620 ") plus the number of quads (" +
623 " in 3d or the number of lines (" +
630 for (
unsigned int j = 0;
j <
n_ids; ++
j)
633 if (
j < cells.size())
636 this->cell_data[section_name] = std::move(
temp_data);
648 tria->create_triangulation(vertices, cells,
subcelldata);
653 "While reading VTK file, failed to find CELLS section"));
656template <
int dim,
int spacedim>
657const std::map<std::string, Vector<double>> &
660 return this->cell_data;
663template <
int dim,
int spacedim>
667 namespace pt = boost::property_tree;
670 auto section = tree.get_optional<std::string>(
"VTKFile.dealiiData");
674 "While reading a VTU file, failed to find dealiiData section. "
675 "Notice that we can only read grid files in .vtu format that "
676 "were created by the deal.II library, using a call to "
677 "GridOut::write_vtu(), where the flag "
678 "GridOutFlags::Vtu::serialize_triangulation is set to true."));
690template <
int dim,
int spacedim>
694 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
698 skip_comment_lines(in,
'#');
709 "Expected '-1' before and after a section."));
721 std::getline(in, line);
723 boost::algorithm::trim(line);
724 if (line.compare(
"-1") == 0)
735 std::vector<Point<spacedim>> vertices;
754 in >> dummy >> dummy >> dummy;
757 in >>
x[0] >>
x[1] >>
x[2];
759 vertices.emplace_back();
761 for (
unsigned int d = 0; d < spacedim; ++d)
762 vertices.back()[d] =
x[d];
776 AssertThrow(tmp == 2412, ExcUnknownSectionType(tmp));
778 std::vector<CellData<dim>> cells;
805 in >> type >> dummy >> dummy >> dummy >> dummy;
807 AssertThrow((type == 11) || (type == 44) || (type == 94) || (type == 115),
808 ExcUnknownElementType(type));
810 if ((((type == 44) || (type == 94)) && (dim == 2)) ||
811 ((type == 115) && (dim == 3)))
813 const auto reference_cell = ReferenceCells::get_hypercube<dim>();
814 cells.emplace_back();
819 .vertices[reference_cell.unv_vertex_to_deal_vertex(v)];
821 cells.back().material_id = 0;
824 cells.back().vertices[v] =
vertex_indices[cells.back().vertices[v]];
826 cell_indices[object_index] = n_cells;
830 else if (((type == 11) && (dim == 2)) ||
831 ((type == 11) && (dim == 3)))
834 in >> dummy >> dummy >> dummy;
839 for (
unsigned int &vertex :
845 for (
unsigned int &vertex :
849 line_indices[object_index] = n_lines;
853 else if (((type == 44) || (type == 94)) && (dim == 3))
864 .vertices[reference_cell.unv_vertex_to_deal_vertex(v)];
868 for (
unsigned int &vertex :
880 "> when running in dim=" +
899 AssertThrow((tmp == 2467) || (tmp == 2477), ExcUnknownSectionType(tmp));
915 in >> dummy >> dummy >> dummy >> dummy >> dummy >> dummy >>
926 std::getline(in, line);
929 "The line before the line containing an ID has too "
930 "many entries. This is not a valid UNV file."));
932 std::getline(in, line);
939 "The given UNV file contains a boundary or material id set to '" +
941 "', which cannot be parsed as a fixed-width integer, whereas "
942 "deal.II only supports integer boundary and material ids. To fix "
943 "this, ensure that all such ids are given integer values."));
946 id <=
long(std::numeric_limits<types::material_id>::max()),
947 ExcMessage(
"The provided integer id '" + std::to_string(
id) +
948 "' is not convertible to either types::material_id nor "
949 "types::boundary_id."));
951 const unsigned int n_lines =
952 (n_entities % 2 == 0) ? (n_entities / 2) : ((n_entities + 1) / 2);
954 for (
unsigned int line = 0; line < n_lines; ++line)
958 if (line == n_lines - 1)
967 in >> dummy >>
no >> dummy >> dummy;
969 if (cell_indices.count(
no) > 0)
970 cells[cell_indices[
no]].material_id = id;
972 if (line_indices.count(
no) > 0)
985 tria->create_triangulation(vertices, cells,
subcelldata);
990template <
int dim,
int spacedim>
995 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
999 skip_comment_lines(in,
'#');
1002 unsigned int n_vertices;
1003 unsigned int n_cells;
1006 in >> n_vertices >> n_cells >> dummy
1012 std::vector<Point<spacedim>> vertices(n_vertices);
1018 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
1028 for (
unsigned int d = 0; d < spacedim; ++d)
1029 vertices[vertex][d] =
x[d];
1037 std::vector<CellData<dim>> cells;
1040 for (
unsigned int cell = 0; cell < n_cells; ++cell)
1049 std::string cell_type;
1053 unsigned int material_id;
1059 if (((cell_type ==
"line") && (dim == 1)) ||
1060 ((cell_type ==
"quad") && (dim == 2)) ||
1061 ((cell_type ==
"hex") && (dim == 3)))
1065 cells.emplace_back();
1070 Assert(material_id <= std::numeric_limits<types::material_id>::max(),
1073 std::numeric_limits<types::material_id>::max()));
1079 cells.back().manifold_id =
1081 cells.back().material_id = material_id;
1089 cells.back().vertices[i] =
1095 ExcInvalidVertexIndex(cell,
1096 cells.back().vertices[i]));
1101 else if ((cell_type ==
"line") && ((dim == 2) || (dim == 3)))
1105 in >>
subcelldata.boundary_lines.back().vertices[0] >>
1109 Assert(material_id <= std::numeric_limits<types::boundary_id>::max(),
1112 std::numeric_limits<types::boundary_id>::max()));
1138 for (
unsigned int &vertex :
1146 AssertThrow(
false, ExcInvalidVertexIndex(cell, vertex));
1150 else if ((cell_type ==
"quad") && (dim == 3))
1159 Assert(material_id <= std::numeric_limits<types::boundary_id>::max(),
1162 std::numeric_limits<types::boundary_id>::max()));
1188 for (
unsigned int &vertex :
1196 Assert(
false, ExcInvalidVertexIndex(cell, vertex));
1202 AssertThrow(
false, ExcUnknownIdentifier(cell_type));
1208 tria->create_triangulation(vertices, cells,
subcelldata);
1213 template <
int dim,
int spacedim>
1225 const double tolerance;
1232 std::vector<std::vector<double>> node_list;
1235 std::vector<std::vector<double>> cell_list;
1237 std::vector<std::vector<double>> face_list;
1240 std::map<std::string, std::vector<int>> elsets_list;
1244template <
int dim,
int spacedim>
1249 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
1254 Assert((spacedim == 2 && dim == spacedim) ||
1255 (spacedim == 3 && (dim == spacedim || dim == spacedim - 1)),
1264 std::stringstream
in_ucd;
1275 catch (std::exception &exc)
1277 std::cerr <<
"Exception on processing internal UCD data: " << std::endl
1278 << exc.what() << std::endl;
1283 "Internal conversion from ABAQUS file to UCD format was unsuccessful. "
1284 "More information is provided in an error message printed above. "
1285 "Are you sure that your ABAQUS mesh file conforms with the requirements "
1286 "listed in the documentation?"));
1293 "Internal conversion from ABAQUS file to UCD format was unsuccessful. "
1294 "Are you sure that your ABAQUS mesh file conforms with the requirements "
1295 "listed in the documentation?"));
1300template <
int dim,
int spacedim>
1304 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
1310 skip_comment_lines(in,
'#');
1316 AssertThrow(line ==
"MeshVersionFormatted 0", ExcInvalidDBMESHInput(line));
1318 skip_empty_lines(in);
1322 AssertThrow(line ==
"Dimension", ExcInvalidDBMESHInput(line));
1326 skip_empty_lines(in);
1339 while (
getline(in, line), line.find(
"# END") == std::string::npos)
1341 skip_empty_lines(in);
1346 AssertThrow(line ==
"Vertices", ExcInvalidDBMESHInput(line));
1348 unsigned int n_vertices;
1352 std::vector<Point<spacedim>> vertices(n_vertices);
1353 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
1356 for (
unsigned int d = 0; d < dim; ++d)
1357 in >> vertices[vertex][d];
1363 skip_empty_lines(in);
1369 AssertThrow(line ==
"Edges", ExcInvalidDBMESHInput(line));
1376 in >> dummy >> dummy;
1382 skip_empty_lines(in);
1391 AssertThrow(line ==
"CrackedEdges", ExcInvalidDBMESHInput(line));
1397 in >> dummy >> dummy;
1403 skip_empty_lines(in);
1409 AssertThrow(line ==
"Quadrilaterals", ExcInvalidDBMESHInput(line));
1412 {0, 1, 5, 4, 2, 3, 7, 6}};
1413 std::vector<CellData<dim>> cells;
1415 unsigned int n_cells;
1417 for (
unsigned int cell = 0; cell < n_cells; ++cell)
1421 cells.emplace_back();
1429 (
static_cast<unsigned int>(cells.back().vertices[i]) <=
1431 ExcInvalidVertexIndex(cell, cells.back().vertices[i]));
1433 --cells.back().vertices[i];
1441 skip_empty_lines(in);
1449 while (
getline(in, line), ((line.find(
"End") == std::string::npos) && (in)))
1456 tria->create_triangulation(vertices, cells,
subcelldata);
1461template <
int dim,
int spacedim>
1465 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
1468 const auto reference_cell = ReferenceCells::get_hypercube<dim>();
1472 std::getline(in, line);
1474 unsigned int n_vertices;
1475 unsigned int n_cells;
1479 std::getline(in, line);
1482 std::getline(in, line);
1485 for (
unsigned int i = 0; i < 8; ++i)
1486 std::getline(in, line);
1489 std::vector<CellData<dim>> cells(n_cells);
1501 in >> cell.vertices[reference_cell.exodusii_vertex_to_deal_vertex(i)];
1505 std::vector<Point<spacedim>> vertices(n_vertices);
1508 for (
unsigned int d = 0; d < spacedim; ++d)
1510 for (
unsigned int d = spacedim; d < 3; ++d)
1520 tria->create_triangulation(vertices, cells,
subcelldata);
1525template <
int dim,
int spacedim>
1529 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
1547 std::getline(in, line);
1555 if ((line.size() > 0) && (line.back() ==
'\r'))
1556 line.erase(line.size() - 1);
1561 if (line.find(
'#') != std::string::npos)
1562 line.erase(line.find(
'#'), std::string::npos);
1563 while ((line.size() > 0) && (line.back() ==
' '))
1564 line.erase(line.size() - 1);
1566 if (line.size() > 0)
1589 ExcMessage(
"deal.II can currently only read version 0.1 "
1590 "of the mphtxt file format."));
1597 for (
unsigned int i = 0; i <
n_tags; ++i)
1610 for (
unsigned int i = 0; i <
n_types; ++i)
1643 ExcMessage(
"Expected '4 Mesh', but got '" + s +
"'."));
1656 "The mesh file uses a different number of space dimensions "
1657 "than the triangulation you want to read it into."));
1659 unsigned int n_vertices;
1665 std::vector<Point<spacedim>> vertices(n_vertices);
1666 for (
unsigned int v = 0; v < n_vertices; ++v)
1697 std::vector<CellData<dim>> cells;
1702 for (
unsigned int type = 0; type <
n_types; ++type)
1716 static const std::map<std::string, ReferenceCell>
name_to_type = {
1727 ExcMessage(
"The input file contains a cell type <" +
1729 "> that the reader does not "
1730 "current support"));
1736 unsigned int n_elements;
1751 ExcMessage(
"Triangles should not appear in input files "
1759 "Quadrilaterals should not appear in input files "
1766 ExcMessage(
"Tetrahedra should not appear in input files "
1767 "for 1d or 2d meshes."));
1774 "Prisms (wedges) should not appear in input files "
1775 "for 1d or 2d meshes."));
1796 for (
unsigned int e = 0; e < n_elements; ++e)
1811 cells.emplace_back();
1826 cells.emplace_back();
1841 cells.emplace_back();
1877 cells[cells.size() - n_elements + e].material_id =
1881 .boundary_lines[
subcelldata.boundary_lines.size() -
1889 cells[cells.size() - n_elements + e].material_id =
1893 .boundary_quads[
subcelldata.boundary_quads.size() -
1901 cells[cells.size() - n_elements + e].material_id =
1918 tria->create_triangulation(vertices, cells, {});
1928 if (line.vertices[1] < line.vertices[0])
1929 std::swap(line.vertices[0], line.vertices[1]);
1934 return std::lexicographical_compare(a.vertices.begin(),
1956 Assert((face.vertices.size() == 3) || (face.vertices.size() == 4),
1958 std::sort(face.vertices.begin(), face.vertices.end());
1963 return std::lexicographical_compare(a.vertices.begin(),
1973 for (
const auto &cell : tria->active_cell_iterators())
1974 for (
const auto &face : cell->face_iterators())
1975 if (face->at_boundary())
1982 {face->vertex_index(0), face->vertex_index(1)}};
1988 std::lower_bound(
subcelldata.boundary_lines.begin(),
1992 const std::array<unsigned int, 2>
1994 return std::lexicographical_compare(
1997 face_vertex_indices.begin(),
1998 face_vertex_indices.end());
2005 face->set_boundary_id(p->boundary_id);
2014 face->n_vertices());
2015 for (
unsigned int v = 0; v < face->n_vertices(); ++v)
2022 std::lower_bound(
subcelldata.boundary_quads.begin(),
2026 const std::vector<unsigned int>
2028 return std::lexicographical_compare(
2031 face_vertex_indices.begin(),
2032 face_vertex_indices.end());
2038 face->set_boundary_id(p->boundary_id);
2043 for (
unsigned int e = 0; e < face->n_lines(); ++e)
2045 const auto edge = face->line(e);
2048 {
edge->vertex_index(0),
edge->vertex_index(1)}};
2055 std::lower_bound(
subcelldata.boundary_lines.begin(),
2059 const std::array<unsigned int, 2>
2061 return std::lexicographical_compare(
2064 edge_vertex_indices.begin(),
2065 edge_vertex_indices.end());
2072 edge->set_boundary_id(p->boundary_id);
2081template <
int dim,
int spacedim>
2085 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
2088 unsigned int n_vertices;
2089 unsigned int n_cells;
2095 std::array<std::map<int, int>, 4>
tag_maps;
2104 if (line ==
"@f$Comments")
2108 if (line ==
"@f$EndComments")
2125 if (line ==
"@f$NOD")
2127 else if (line ==
"@f$MeshFormat")
2150 AssertThrow(line ==
"@f$EndMeshFormat", ExcInvalidGMSHInput(line));
2154 if (line ==
"@f$PhysicalNames")
2160 while (line !=
"@f$EndPhysicalNames");
2165 if (line ==
"@f$Entities")
2170 for (
unsigned int i = 0; i < n_points; ++i)
2195 ExcMessage(
"More than one tag is not supported!"));
2202 for (
unsigned int i = 0; i <
n_curves; ++i)
2216 ExcMessage(
"More than one tag is not supported!"));
2226 for (
unsigned int j = 0;
j < n_points; ++
j)
2230 for (
unsigned int i = 0; i <
n_surfaces; ++i)
2244 ExcMessage(
"More than one tag is not supported!"));
2257 for (
unsigned int i = 0; i <
n_volumes; ++i)
2271 ExcMessage(
"More than one tag is not supported!"));
2285 AssertThrow(line ==
"@f$EndEntities", ExcInvalidGMSHInput(line));
2290 if (line ==
"@f$PartitionedEntities")
2296 while (line !=
"@f$EndPartitionedEntities");
2303 AssertThrow(line ==
"@f$Nodes", ExcInvalidGMSHInput(line));
2320 std::vector<Point<spacedim>> vertices(n_vertices);
2367 in >>
x[0] >>
x[1] >>
x[2];
2372 for (
unsigned int d = 0; d < spacedim; ++d)
2393 static const std::string
end_nodes_marker[] = {
"@f$ENDNOD",
"@f$EndNodes"};
2395 ExcInvalidGMSHInput(line));
2401 ExcInvalidGMSHInput(line));
2423 std::vector<CellData<dim>> cells;
2435 {0, 1, 5, 4, 2, 3, 7, 6}};
2439 unsigned int material_id;
2519 for (
unsigned int i = 1; i <
n_tags; ++i)
2524 else if (cell_type == 2)
2526 else if (cell_type == 3)
2528 else if (cell_type == 4)
2530 else if (cell_type == 5)
2541 else if (cell_type == 2)
2543 else if (cell_type == 3)
2545 else if (cell_type == 4)
2547 else if (cell_type == 5)
2573 if (((cell_type == 1) && (dim == 1)) ||
2574 ((cell_type == 2) && (dim == 2)) ||
2575 ((cell_type == 3) && (dim == 2)) ||
2576 ((cell_type == 4) && (dim == 3)) ||
2577 ((cell_type == 5) && (dim == 3)))
2580 unsigned int vertices_per_cell = 0;
2582 vertices_per_cell = 2;
2583 else if (cell_type == 2)
2584 vertices_per_cell = 3;
2585 else if (cell_type == 3)
2586 vertices_per_cell = 4;
2587 else if (cell_type == 4)
2588 vertices_per_cell = 4;
2589 else if (cell_type == 5)
2590 vertices_per_cell = 8;
2594 "Number of nodes does not coincide with the "
2595 "number required for this object"));
2598 cells.emplace_back();
2600 cell.vertices.resize(vertices_per_cell);
2601 for (
unsigned int i = 0; i < vertices_per_cell; ++i)
2604 if (vertices_per_cell ==
2606 in >> cell.vertices[dim == 3 ?
2610 in >> cell.vertices[i];
2615 std::numeric_limits<types::material_id>::max(),
2619 std::numeric_limits<types::material_id>::max()));
2624 cell.material_id = material_id;
2627 for (
unsigned int i = 0; i < vertices_per_cell; ++i)
2638 cell.vertices[i] = vertex;
2641 else if ((cell_type == 1) &&
2642 ((dim == 2) || (dim == 3)))
2646 in >>
subcelldata.boundary_lines.back().vertices[0] >>
2651 std::numeric_limits<types::boundary_id>::max(),
2655 std::numeric_limits<types::boundary_id>::max()));
2666 for (
unsigned int &vertex :
2680 else if ((cell_type == 2 || cell_type == 3) &&
2684 unsigned int vertices_per_cell = 0;
2687 vertices_per_cell = 3;
2688 else if (cell_type == 3)
2689 vertices_per_cell = 4;
2694 subcelldata.boundary_quads.back().vertices.resize(
2697 for (
unsigned int i = 0; i < vertices_per_cell; ++i)
2698 in >>
subcelldata.boundary_quads.back().vertices[i];
2702 std::numeric_limits<types::boundary_id>::max(),
2706 std::numeric_limits<types::boundary_id>::max()));
2717 for (
unsigned int &vertex :
2730 else if (cell_type == 15)
2754 AssertThrow(
false, ExcGmshUnsupportedGeometry(cell_type));
2764 ExcInvalidGMSHInput(line));
2769 ExcGmshNoCellInformation(
subcelldata.boundary_lines.size(),
2778 if (
pair.second == 1u)
2783 tria->create_triangulation(vertices, cells,
subcelldata);
2793#ifdef DEAL_II_GMSH_WITH_API
2794template <
int dim,
int spacedim>
2798 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
2801 {{15, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {7, 5}, {6, 6}, {5, 7}}};
2804 const std::array<std::vector<unsigned int>, 8>
gmsh_to_dealii = {
2811 {{0, 1, 2, 3, 4, 5}},
2812 {{0, 1, 3, 2, 4, 5, 7, 6}}}};
2814 std::vector<Point<spacedim>> vertices;
2815 std::vector<CellData<dim>> cells;
2826 gmsh::option::setNumber(
"General.Verbosity", 0);
2830 ExcMessage(
"You are trying to read a gmsh file with dimension " +
2831 std::to_string(gmsh::model::getDimension()) +
2832 " into a grid of dimension " + std::to_string(dim)));
2837 gmsh::model::mesh::removeDuplicateNodes();
2838 gmsh::model::mesh::renumberNodes();
2840 std::vector<double>
coord;
2842 gmsh::model::mesh::getNodes(
2845 for (
unsigned int i = 0; i <
node_tags.size(); ++i)
2849 for (
unsigned int d = 0; d < spacedim; ++d)
2850 vertices[i][d] =
coord[i * 3 + d];
2853 for (
unsigned int d = spacedim; d < 3; ++d)
2855 ExcMessage(
"The grid you are reading contains nodes that are "
2856 "nonzero in the coordinate with index " +
2858 ", but you are trying to save "
2859 "it on a grid embedded in a " +
2860 std::to_string(spacedim) +
" dimensional space."));
2867 std::vector<std::pair<int, int>>
entities;
2868 gmsh::model::getEntities(
entities);
2881 gmsh::model::getPhysicalGroupsForEntity(
entity_dim,
2897 std::map<std::string, int>
id_names;
2905 const auto &name =
it.first;
2906 const auto &
id =
it.second;
2907 if (
entity_dim == dim && name ==
"MaterialID")
2912 else if (
entity_dim < dim && name ==
"BoundaryID")
2917 else if (name ==
"ManifoldID")
2945 gmsh::model::mesh::getElements(
2954 for (
unsigned int j = 0;
j < elements.size(); ++
j)
2958 cells.emplace_back(n_vertices);
2959 auto &cell = cells.back();
2960 for (
unsigned int v = 0; v < n_vertices; ++v)
2967 cell.manifold_id = manifold_id;
2968 cell.material_id = boundary_id;
2972 subcelldata.boundary_quads.emplace_back(n_vertices);
2974 for (
unsigned int v = 0; v < n_vertices; ++v)
2978 face.manifold_id = manifold_id;
2979 face.boundary_id = boundary_id;
2983 subcelldata.boundary_lines.emplace_back(n_vertices);
2985 for (
unsigned int v = 0; v < n_vertices; ++v)
2989 line.manifold_id = manifold_id;
2990 line.boundary_id = boundary_id;
2996 for (
unsigned int j = 0;
j < elements.size(); ++
j)
3009 if (
pair.second == 1u)
3014 tria->create_triangulation(vertices, cells,
subcelldata);
3028template <
int dim,
int spacedim>
3033 unsigned int &n_vars,
3034 unsigned int &n_vertices,
3035 unsigned int &n_cells,
3036 std::vector<unsigned int> &
IJK,
3071 std::string::size_type
pos =
header.find(
'=');
3073 while (
pos !=
static_cast<std::string::size_type
>(std::string::npos))
3085 std::vector<std::string> entries =
3089 for (
unsigned int i = 0; i < entries.size(); ++i)
3101 while (entries[i][0] ==
'"')
3103 if (entries[i] ==
"\"X\"")
3105 else if (entries[i] ==
"\"Y\"")
3113 else if (entries[i] ==
"\"Z\"")
3131 "Tecplot file must contain at least one variable for each dimension"));
3132 for (
unsigned int d = 1; d < dim; ++d)
3136 "Tecplot file must contain at least one variable for each dimension."));
3141 "ZONETYPE=FELINESEG") &&
3145 "ZONETYPE=FEQUADRILATERAL") &&
3149 "ZONETYPE=FEBRICK") &&
3157 "The tecplot file contains an unsupported ZONETYPE."));
3160 "DATAPACKING=POINT"))
3163 "DATAPACKING=BLOCK"))
3186 "ET=QUADRILATERAL") &&
3198 "The tecplot file contains an unsupported ElementType."));
3206 dim > 1 ||
IJK[1] == 1,
3208 "Parameter 'J=' found in tecplot, although this is only possible for dimensions greater than 1."));
3214 dim > 2 ||
IJK[2] == 1,
3216 "Parameter 'K=' found in tecplot, although this is only possible for dimensions greater than 2."));
3231 for (
unsigned int d = 0; d < dim; ++d)
3236 "Tecplot file does not contain a complete and consistent set of parameters"));
3237 n_vertices *=
IJK[d];
3238 n_cells *= (
IJK[d] - 1);
3246 "Tecplot file does not contain a complete and consistent set of parameters"));
3252 n_cells = *std::max_element(
IJK.begin(),
IJK.end());
3256 "Tecplot file does not contain a complete and consistent set of parameters"));
3266 const unsigned int dim = 2;
3267 const unsigned int spacedim = 2;
3268 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
3272 skip_comment_lines(in,
'#');
3275 std::string line,
header;
3282 std::string
letters =
"abcdfghijklmnopqrstuvwxyzABCDFGHIJKLMNOPQRSTUVWXYZ";
3285 while (line.find_first_of(
letters) != std::string::npos)
3295 std::vector<unsigned int>
IJK(dim);
3296 unsigned int n_vars, n_vertices, n_cells;
3299 parse_tecplot_header(
header,
3314 std::vector<Point<spacedim>> vertices(n_vertices + 1);
3317 std::vector<CellData<dim>> cells(n_cells);
3333 unsigned int next_index = 0;
3344 for (
unsigned int i = 1; i <
first_var.size() + 1; ++i)
3350 for (
unsigned int j =
first_var.size() + 1;
j < n_vertices + 1; ++
j)
3351 in >> vertices[
j][next_index];
3358 for (
unsigned int i = 1; i < n_vars; ++i)
3370 if ((next_index < dim) && (i ==
tecplot2deal[next_index]))
3373 for (
unsigned int j = 1;
j < n_vertices + 1; ++
j)
3374 in >> vertices[
j][next_index];
3381 for (
unsigned int j = 1;
j < n_vertices + 1; ++
j)
3393 std::vector<double> vars(n_vars);
3401 for (
unsigned int d = 0; d < dim; ++d)
3407 for (
unsigned int v = 2; v < n_vertices + 1; ++v)
3409 for (
unsigned int i = 0; i < n_vars; ++i)
3415 for (
unsigned int i = 0; i < dim; ++i)
3424 unsigned int I =
IJK[0], J =
IJK[1];
3426 unsigned int cell = 0;
3428 for (
unsigned int j = 0;
j < J - 1; ++
j)
3429 for (
unsigned int i = 1; i < I; ++i)
3431 cells[cell].vertices[0] = i +
j * I;
3432 cells[cell].vertices[1] = i + 1 +
j * I;
3433 cells[cell].vertices[2] = i + (
j + 1) * I;
3434 cells[cell].vertices[3] = i + 1 + (
j + 1) * I;
3440 for (
unsigned int i = 1; i < I + 1; ++i)
3447 for (
unsigned int j = 1;
j < J - 1; ++
j)
3470 for (
unsigned int i = 0; i < n_cells; ++i)
3488 tria->create_triangulation(vertices, cells,
subcelldata);
3493template <
int dim,
int spacedim>
3502template <
int dim,
int spacedim>
3510#ifdef DEAL_II_WITH_ASSIMP
3519 importer.ReadFile(
filename.c_str(),
3529 ExcMessage(
"Input file contains no meshes."));
3542 std::vector<Point<spacedim>> vertices;
3543 std::vector<CellData<dim>> cells;
3551 {0, 1, 5, 4, 2, 3, 7, 6}};
3562 ExcMessage(
"Incompatible mesh " + std::to_string(m) +
3563 "/" + std::to_string(
scene->mNumMeshes)));
3569 ExcMessage(
"Incompatible mesh " + std::to_string(m) +
3570 "/" + std::to_string(
scene->mNumMeshes)));
3574 const unsigned int n_vertices =
mesh->mNumVertices;
3578 const unsigned int n_faces =
mesh->mNumFaces;
3581 vertices.resize(
v_offset + n_vertices);
3584 for (
unsigned int i = 0; i < n_vertices; ++i)
3585 for (
unsigned int d = 0; d < spacedim; ++d)
3589 for (
unsigned int i = 0; i < n_faces; ++i)
3606 ExcMessage(
"Face " + std::to_string(i) +
" of mesh " +
3607 std::to_string(m) +
" has " +
3609 " vertices. We expected only " +
3633 while (
n_verts != vertices.size())
3643 tria->create_triangulation(vertices, cells,
subcelldata);
3655#ifdef DEAL_II_TRILINOS_WITH_SEACAS
3673 [](
unsigned char c) { return std::toupper(c); });
3674 const std::string
numbers =
"0123456789";
3713 template <
int dim,
int spacedim = dim>
3714 std::pair<SubCellData, std::vector<std::vector<int>>>
3754 std::vector<int> elements(
n_sides);
3755 std::vector<int> faces(
n_sides);
3781 std::vector<std::pair<std::size_t, std::vector<int>>>
3793 [](
const auto &a,
const auto &b) {
3794 return std::lexicographical_compare(a.second.begin(),
3821 face_id % ReferenceCells::max_n_faces<dim>();
3823 cells[
face_id / ReferenceCells::max_n_faces<dim>()];
3841 for (
unsigned int j = 0;
j < face_reference_cell.
n_vertices();
3856 for (
unsigned int j = 0;
j < face_reference_cell.
n_vertices();
3873template <
int dim,
int spacedim>
3879#ifdef DEAL_II_TRILINOS_WITH_SEACAS
3892 ExcMessage(
"ExodusII failed to open the specified input file."));
3922 std::vector<Point<spacedim>> vertices;
3923 vertices.reserve(n_nodes);
3925 std::vector<double>
xs(n_nodes);
3926 std::vector<double>
ys(n_nodes);
3927 std::vector<double>
zs(n_nodes);
3955 std::vector<CellData<dim>> cells;
3956 cells.reserve(n_elements);
3985 " with element type " + std::string(
string_temp.data()) +
3987 ", which does not match the topological mesh dimension " +
3988 std::to_string(dim) +
"."));
4004 for (
unsigned int elem_n = 0;
elem_n < connection.size();
4011 connection[
elem_n + i] - 1;
4014 cells.push_back(std::move(cell));
4025 tria->create_triangulation(vertices, cells,
pair.first);
4038template <
int dim,
int spacedim>
4052 if (std::find_if(line.begin(), line.end(), [](
const char c) {
4057 for (
int i = line.size() - 1; i >= 0; --i)
4058 in.putback(line[i]);
4068template <
int dim,
int spacedim>
4079 while (in.get() !=
'\n')
4089 skip_empty_lines(in);
4094template <
int dim,
int spacedim>
4109 const std::vector<
Point<2>> &vertices,
4112 double min_x = vertices[cells[0].vertices[0]][0],
4113 max_x = vertices[cells[0].vertices[0]][0],
4114 min_y = vertices[cells[0].vertices[0]][1],
4115 max_y = vertices[cells[0].vertices[0]][1];
4117 for (
unsigned int i = 0; i < cells.size(); ++i)
4119 for (
const auto vertex : cells[i].vertices)
4121 const Point<2> &p = vertices[vertex];
4133 out <<
"# cell " << i << std::endl;
4135 for (
const auto vertex : cells[i].vertices)
4136 center += vertices[vertex];
4139 out <<
"set label \"" << i <<
"\" at " << center[0] <<
',' << center[1]
4140 <<
" center" << std::endl;
4143 for (
unsigned int f = 0; f < 2; ++f)
4144 out <<
"set arrow from " << vertices[cells[i].vertices[f]][0] <<
','
4145 << vertices[cells[i].vertices[f]][1] <<
" to "
4146 << vertices[cells[i].vertices[(f + 1) % 4]][0] <<
','
4147 << vertices[cells[i].vertices[(f + 1) % 4]][1] << std::endl;
4149 for (
unsigned int f = 2; f < 4; ++f)
4150 out <<
"set arrow from " << vertices[cells[i].vertices[(f + 1) % 4]][0]
4151 <<
',' << vertices[cells[i].vertices[(f + 1) % 4]][1] <<
" to "
4152 << vertices[cells[i].vertices[f]][0] <<
','
4153 << vertices[cells[i].vertices[f]][1] << std::endl;
4159 <<
"set nokey" << std::endl
4161 <<
"] " <<
min_y << std::endl
4162 <<
"pause -1" << std::endl;
4170 const std::vector<
Point<3>> &vertices,
4173 for (
const auto &cell : cells)
4176 out << vertices[cell.vertices[0]] << std::endl
4177 << vertices[cell.vertices[1]] << std::endl
4181 out << vertices[cell.vertices[1]] << std::endl
4182 << vertices[cell.vertices[2]] << std::endl
4186 out << vertices[cell.vertices[3]] << std::endl
4187 << vertices[cell.vertices[2]] << std::endl
4191 out << vertices[cell.vertices[0]] << std::endl
4192 << vertices[cell.vertices[3]] << std::endl
4196 out << vertices[cell.vertices[4]] << std::endl
4197 << vertices[cell.vertices[5]] << std::endl
4201 out << vertices[cell.vertices[5]] << std::endl
4202 << vertices[cell.vertices[6]] << std::endl
4206 out << vertices[cell.vertices[7]] << std::endl
4207 << vertices[cell.vertices[6]] << std::endl
4211 out << vertices[cell.vertices[4]] << std::endl
4212 << vertices[cell.vertices[7]] << std::endl
4216 out << vertices[cell.vertices[0]] << std::endl
4217 << vertices[cell.vertices[4]] << std::endl
4221 out << vertices[cell.vertices[1]] << std::endl
4222 << vertices[cell.vertices[5]] << std::endl
4226 out << vertices[cell.vertices[2]] << std::endl
4227 << vertices[cell.vertices[6]] << std::endl
4231 out << vertices[cell.vertices[3]] << std::endl
4232 << vertices[cell.vertices[7]] << std::endl
4240template <
int dim,
int spacedim>
4250 const std::string::size_type
dotpos =
filename.find_last_of(
'.');
4263 else if (
format == exodusii)
4275template <
int dim,
int spacedim>
4322 ExcMessage(
"There is no read_assimp(istream &) function. "
4323 "Use the read_assimp(string &filename, ...) "
4324 "functions, instead."));
4329 ExcMessage(
"There is no read_exodusii(istream &) function. "
4330 "Use the read_exodusii(string &filename, ...) "
4331 "function, instead."));
4342template <
int dim,
int spacedim>
4371 return ".unknown_format";
4377template <
int dim,
int spacedim>
4434template <
int dim,
int spacedim>
4438 return "dbmesh|exodusii|msh|unv|vtk|vtu|ucd|abaqus|xda|tecplot|assimp";
4445 template <
int dim,
int spacedim>
4446 Abaqus_to_UCD<dim, spacedim>::Abaqus_to_UCD()
4459 from_string(T &t,
const std::string &s, std::ios_base &(*f)(std::ios_base &))
4461 std::istringstream
iss(s);
4462 return !(
iss >> f >> t).
fail();
4472 for (
const char c : s)
4487 template <
int dim,
int spacedim>
4489 Abaqus_to_UCD<dim, spacedim>::read_in_abaqus(std::istream &
input_stream)
4501 std::transform(line.begin(), line.end(), line.begin(),
::toupper);
4503 if (line.compare(
"*HEADING") == 0 || line.compare(0, 2,
"**") == 0 ||
4504 line.compare(0, 5,
"*PART") == 0)
4513 else if (line.compare(0, 5,
"*NODE") == 0)
4527 std::vector<double>
node(spacedim + 1);
4529 std::istringstream
iss(line);
4531 for (
unsigned int i = 0; i < spacedim + 1; ++i)
4534 node_list.push_back(
node);
4537 else if (line.compare(0, 8,
"*ELEMENT") == 0)
4554 if (idx != std::string::npos)
4568 std::istringstream
iss(line);
4581 cell[0] =
static_cast<double>(
material);
4582 cell_list.push_back(cell);
4585 else if (line.compare(0, 8,
"*SURFACE") == 0)
4596 const std::string
name_key =
"NAME=";
4618 std::transform(line.begin(),
4626 std::istringstream
iss(line);
4634 const std::string
elset_name = line.substr(0, line.find(
','));
4641 const std::vector<int> cells = elsets_list[
elset_name];
4642 for (
const int cell : cells)
4666 else if (line.compare(0, 6,
"*ELSET") == 0)
4672 const std::string
elset_key =
"*ELSET, ELSET=";
4673 const std::size_t idx = line.find(
elset_key);
4674 if (idx != std::string::npos)
4676 const std::string
comma =
",";
4693 std::vector<int> elements;
4694 const std::size_t
generate_idx = line.find(
"GENERATE");
4699 std::istringstream
iss(line);
4713 "While reading an ABAQUS file, the reader "
4714 "expected a comma but found a <") +
4715 comma +
"> in the line <" + line +
">."));
4720 "While reading an ABAQUS file, the reader encountered "
4721 "a GENERATE statement in which the upper bound <") +
4723 "> for the element numbers is not larger or equal "
4724 "than the lower bound <" +
4728 if (
iss.rdbuf()->in_avail() != 0)
4733 "While reading an ABAQUS file, the reader "
4734 "expected a comma but found a <") +
4735 comma +
"> in the line <" + line +
">."));
4738 elements.push_back(i);
4751 std::istringstream
iss(line);
4761 "While reading an ABAQUS file, the reader "
4762 "expected a comma but found a <") +
4763 comma +
"> in the line <" + line +
">."));
4765 elements.push_back(
elid);
4774 else if (line.compare(0, 5,
"*NSET") == 0)
4783 else if (line.compare(0, 14,
"*SOLID SECTION") == 0)
4818 template <
int dim,
int spacedim>
4820 Abaqus_to_UCD<dim, spacedim>::get_global_node_numbers(
4916 template <
int dim,
int spacedim>
4918 Abaqus_to_UCD<dim, spacedim>::write_out_avs_ucd(std::ostream &output)
const
4931 output <<
"# Abaqus to UCD mesh conversion" << std::endl;
4932 output <<
"# Mesh type: AVS UCD" << std::endl;
4961 output << node_list.size() <<
"\t" << (cell_list.size() + face_list.size())
4962 <<
"\t0\t0\t0" << std::endl;
4965 output.precision(8);
4969 for (
const auto &
node : node_list)
4972 output <<
node[0] <<
"\t";
4975 output.setf(std::ios::scientific, std::ios::floatfield);
4976 for (
unsigned int jj = 1;
jj < spacedim + 1; ++
jj)
4982 output << 0.0 <<
"\t";
4985 output << 0.0 <<
"\t";
4987 output << std::endl;
4988 output.unsetf(std::ios::floatfield);
4992 for (
unsigned int ii = 0;
ii < cell_list.size(); ++
ii)
4994 output <<
ii + 1 <<
"\t" << cell_list[
ii][0] <<
"\t"
4995 << (dim == 2 ?
"quad" :
"hex") <<
"\t";
4998 output << cell_list[
ii][
jj] <<
"\t";
5000 output << std::endl;
5004 for (
unsigned int ii = 0;
ii < face_list.size(); ++
ii)
5006 output <<
ii + 1 <<
"\t" << face_list[
ii][0] <<
"\t"
5007 << (dim == 2 ?
"line" :
"quad") <<
"\t";
5010 output << face_list[
ii][
jj] <<
"\t";
5012 output << std::endl;
5019#include "grid/grid_in.inst"
void read_vtk(std::istream &in)
static void skip_empty_lines(std::istream &in)
void read_assimp(const std::string &filename, const unsigned int mesh_index=numbers::invalid_unsigned_int, const bool remove_duplicates=true, const double tol=1e-12, const bool ignore_unsupported_element_types=true)
void read_abaqus(std::istream &in, const bool apply_all_indicators_to_manifolds=false)
static std::string default_suffix(const Format format)
void read_xda(std::istream &in)
void read_comsol_mphtxt(std::istream &in)
static void skip_comment_lines(std::istream &in, const char comment_start)
void attach_triangulation(Triangulation< dim, spacedim > &tria)
const std::map< std::string, Vector< double > > & get_cell_data() const
void read_msh(std::istream &in)
static Format parse_format(const std::string &format_name)
void read_vtu(std::istream &in)
void read_tecplot(std::istream &in)
ExodusIIData read_exodusii(const std::string &filename, const bool apply_all_indicators_to_manifolds=false)
void read_dbmesh(std::istream &in)
void read_ucd(std::istream &in, const bool apply_all_indicators_to_manifolds=false)
void read(std::istream &in, Format format=Default)
static void debug_output_grid(const std::vector< CellData< dim > > &cells, const std::vector< Point< spacedim > > &vertices, std::ostream &out)
static std::string get_format_names()
void read_unv(std::istream &in)
static void parse_tecplot_header(std::string &header, std::vector< unsigned int > &tecplot2deal, unsigned int &n_vars, unsigned int &n_vertices, unsigned int &n_cells, std::vector< unsigned int > &IJK, bool &structured, bool &blocked)
std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices() const
unsigned int n_vertices() const
unsigned int exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const
unsigned int face_to_cell_vertices(const unsigned int face, const unsigned int vertex, const types::geometric_orientation face_orientation) const
unsigned int get_dimension() const
ReferenceCell face_reference_cell(const unsigned int face_no) const
unsigned int exodusii_face_to_deal_face(const unsigned int face_n) const
static ReferenceCell n_vertices_to_type(const int dim, const unsigned int n_vertices)
static constexpr unsigned int dimension
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_FALLTHROUGH
static ::ExceptionBase & ExcIO()
static ::ExceptionBase & ExcFileNotOpen(std::string arg1)
static ::ExceptionBase & ExcNeedsAssimp()
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
static ::ExceptionBase & ExcNeedsExodusII()
#define AssertDimension(dim1, dim2)
#define AssertThrowExodusII(error_code)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcIndexRange(std::size_t arg1, std::size_t arg2, std::size_t arg3)
static ::ExceptionBase & ExcInvalidState()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
void consistently_order_cells(std::vector< CellData< dim > > &cells)
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
std::vector< index_type > data
constexpr const ReferenceCell Tetrahedron
constexpr const ReferenceCell Quadrilateral
constexpr const ReferenceCell Wedge
constexpr const ReferenceCell Pyramid
constexpr const ReferenceCell Invalid
constexpr const ReferenceCell Triangle
constexpr const ReferenceCell Hexahedron
constexpr const ReferenceCell Vertex
constexpr const ReferenceCell Line
std::pair< int, unsigned int > get_integer_at_position(const std::string &name, const unsigned int position)
std::vector< unsigned char > decode_base64(const std::string &base64_input)
std::vector< std::string > break_text_into_lines(const std::string &original_text, const unsigned int width, const char delimiter=' ')
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
bool match_at_string_start(const std::string &name, const std::string &pattern)
std::string decompress(const std::string &compressed_input)
constexpr unsigned int invalid_unsigned_int
constexpr types::boundary_id internal_face_boundary_id
constexpr types::manifold_id flat_manifold_id
constexpr types::material_id invalid_material_id
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices()
std::vector< std::vector< int > > id_to_sideset_ids