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;
607 unsigned int temp,
n_ids;
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];
2854 for (
unsigned int d = spacedim; d < 3; ++d)
2857 "The grid you are reading contains nodes that are "
2858 "nonzero in the coordinate with index " +
2860 ", but you are trying to save "
2861 "it on a grid embedded in a " +
2862 std::to_string(spacedim) +
" dimensional space."));
2869 std::vector<std::pair<int, int>>
entities;
2870 gmsh::model::getEntities(
entities);
2883 gmsh::model::getPhysicalGroupsForEntity(
entity_dim,
2899 std::map<std::string, int>
id_names;
2907 const auto &name =
it.first;
2908 const auto &
id =
it.second;
2909 if (
entity_dim == dim && name ==
"MaterialID")
2914 else if (
entity_dim < dim && name ==
"BoundaryID")
2919 else if (name ==
"ManifoldID")
2947 gmsh::model::mesh::getElements(
2956 for (
unsigned int j = 0;
j < elements.size(); ++
j)
2960 cells.emplace_back(n_vertices);
2961 auto &cell = cells.back();
2962 for (
unsigned int v = 0; v < n_vertices; ++v)
2969 cell.manifold_id = manifold_id;
2970 cell.material_id = boundary_id;
2974 subcelldata.boundary_quads.emplace_back(n_vertices);
2976 for (
unsigned int v = 0; v < n_vertices; ++v)
2980 face.manifold_id = manifold_id;
2981 face.boundary_id = boundary_id;
2985 subcelldata.boundary_lines.emplace_back(n_vertices);
2987 for (
unsigned int v = 0; v < n_vertices; ++v)
2991 line.manifold_id = manifold_id;
2992 line.boundary_id = boundary_id;
2998 for (
unsigned int j = 0;
j < elements.size(); ++
j)
3011 if (
pair.second == 1u)
3016 tria->create_triangulation(vertices, cells,
subcelldata);
3030template <
int dim,
int spacedim>
3035 unsigned int &n_vars,
3036 unsigned int &n_vertices,
3037 unsigned int &n_cells,
3038 std::vector<unsigned int> &
IJK,
3063 std::transform(
header.begin(),
3066 static_cast<int (*)(
int)
>(std::toupper));
3076 std::string::size_type
pos =
header.find(
'=');
3078 while (
pos !=
static_cast<std::string::size_type
>(std::string::npos))
3090 std::vector<std::string> entries =
3094 for (
unsigned int i = 0; i < entries.size(); ++i)
3106 while (entries[i][0] ==
'"')
3108 if (entries[i] ==
"\"X\"")
3110 else if (entries[i] ==
"\"Y\"")
3118 else if (entries[i] ==
"\"Z\"")
3136 "Tecplot file must contain at least one variable for each dimension"));
3137 for (
unsigned int d = 1; d < dim; ++d)
3141 "Tecplot file must contain at least one variable for each dimension."));
3146 "ZONETYPE=FELINESEG") &&
3150 "ZONETYPE=FEQUADRILATERAL") &&
3154 "ZONETYPE=FEBRICK") &&
3162 "The tecplot file contains an unsupported ZONETYPE."));
3165 "DATAPACKING=POINT"))
3168 "DATAPACKING=BLOCK"))
3191 "ET=QUADRILATERAL") &&
3203 "The tecplot file contains an unsupported ElementType."));
3211 dim > 1 ||
IJK[1] == 1,
3213 "Parameter 'J=' found in tecplot, although this is only possible for dimensions greater than 1."));
3219 dim > 2 ||
IJK[2] == 1,
3221 "Parameter 'K=' found in tecplot, although this is only possible for dimensions greater than 2."));
3236 for (
unsigned int d = 0; d < dim; ++d)
3241 "Tecplot file does not contain a complete and consistent set of parameters"));
3242 n_vertices *=
IJK[d];
3243 n_cells *= (
IJK[d] - 1);
3251 "Tecplot file does not contain a complete and consistent set of parameters"));
3257 n_cells = *std::max_element(
IJK.begin(),
IJK.end());
3261 "Tecplot file does not contain a complete and consistent set of parameters"));
3271 const unsigned int dim = 2;
3272 const unsigned int spacedim = 2;
3273 Assert(tria !=
nullptr, ExcNoTriangulationSelected());
3277 skip_comment_lines(in,
'#');
3280 std::string line,
header;
3287 std::string
letters =
"abcdfghijklmnopqrstuvwxyzABCDFGHIJKLMNOPQRSTUVWXYZ";
3290 while (line.find_first_of(
letters) != std::string::npos)
3300 std::vector<unsigned int>
IJK(dim);
3301 unsigned int n_vars, n_vertices, n_cells;
3304 parse_tecplot_header(
header,
3319 std::vector<Point<spacedim>> vertices(n_vertices + 1);
3322 std::vector<CellData<dim>> cells(n_cells);
3338 unsigned int next_index = 0;
3349 for (
unsigned int i = 1; i <
first_var.size() + 1; ++i)
3355 for (
unsigned int j =
first_var.size() + 1;
j < n_vertices + 1; ++
j)
3356 in >> vertices[
j][next_index];
3363 for (
unsigned int i = 1; i < n_vars; ++i)
3375 if ((next_index < dim) && (i ==
tecplot2deal[next_index]))
3378 for (
unsigned int j = 1;
j < n_vertices + 1; ++
j)
3379 in >> vertices[
j][next_index];
3386 for (
unsigned int j = 1;
j < n_vertices + 1; ++
j)
3398 std::vector<double> vars(n_vars);
3406 for (
unsigned int d = 0; d < dim; ++d)
3412 for (
unsigned int v = 2; v < n_vertices + 1; ++v)
3414 for (
unsigned int i = 0; i < n_vars; ++i)
3420 for (
unsigned int i = 0; i < dim; ++i)
3429 unsigned int I =
IJK[0], J =
IJK[1];
3431 unsigned int cell = 0;
3433 for (
unsigned int j = 0;
j < J - 1; ++
j)
3434 for (
unsigned int i = 1; i < I; ++i)
3436 cells[cell].vertices[0] = i +
j * I;
3437 cells[cell].vertices[1] = i + 1 +
j * I;
3438 cells[cell].vertices[2] = i + (
j + 1) * I;
3439 cells[cell].vertices[3] = i + 1 + (
j + 1) * I;
3445 for (
unsigned int i = 1; i < I + 1; ++i)
3452 for (
unsigned int j = 1;
j < J - 1; ++
j)
3475 for (
unsigned int i = 0; i < n_cells; ++i)
3493 tria->create_triangulation(vertices, cells,
subcelldata);
3498template <
int dim,
int spacedim>
3507template <
int dim,
int spacedim>
3515#ifdef DEAL_II_WITH_ASSIMP
3524 importer.ReadFile(
filename.c_str(),
3534 ExcMessage(
"Input file contains no meshes."));
3547 std::vector<Point<spacedim>> vertices;
3548 std::vector<CellData<dim>> cells;
3556 {0, 1, 5, 4, 2, 3, 7, 6}};
3567 ExcMessage(
"Incompatible mesh " + std::to_string(m) +
3568 "/" + std::to_string(
scene->mNumMeshes)));
3574 ExcMessage(
"Incompatible mesh " + std::to_string(m) +
3575 "/" + std::to_string(
scene->mNumMeshes)));
3579 const unsigned int n_vertices =
mesh->mNumVertices;
3583 const unsigned int n_faces =
mesh->mNumFaces;
3586 vertices.resize(
v_offset + n_vertices);
3589 for (
unsigned int i = 0; i < n_vertices; ++i)
3590 for (
unsigned int d = 0; d < spacedim; ++d)
3594 for (
unsigned int i = 0; i < n_faces; ++i)
3611 ExcMessage(
"Face " + std::to_string(i) +
" of mesh " +
3612 std::to_string(m) +
" has " +
3614 " vertices. We expected only " +
3638 while (
n_verts != vertices.size())
3648 tria->create_triangulation(vertices, cells,
subcelldata);
3660#ifdef DEAL_II_TRILINOS_WITH_SEACAS
3678 static_cast<int (*)(
int)
>(std::toupper));
3679 const std::string
numbers =
"0123456789";
3718 template <
int dim,
int spacedim = dim>
3719 std::pair<SubCellData, std::vector<std::vector<int>>>
3759 std::vector<int> elements(
n_sides);
3760 std::vector<int> faces(
n_sides);
3786 std::vector<std::pair<std::size_t, std::vector<int>>>
3798 [](
const auto &a,
const auto &b) {
3799 return std::lexicographical_compare(a.second.begin(),
3826 face_id % ReferenceCells::max_n_faces<dim>();
3828 cells[
face_id / ReferenceCells::max_n_faces<dim>()];
3846 for (
unsigned int j = 0;
j < face_reference_cell.
n_vertices();
3861 for (
unsigned int j = 0;
j < face_reference_cell.
n_vertices();
3878template <
int dim,
int spacedim>
3884#ifdef DEAL_II_TRILINOS_WITH_SEACAS
3897 ExcMessage(
"ExodusII failed to open the specified input file."));
3927 std::vector<Point<spacedim>> vertices;
3928 vertices.reserve(n_nodes);
3930 std::vector<double>
xs(n_nodes);
3931 std::vector<double>
ys(n_nodes);
3932 std::vector<double>
zs(n_nodes);
3960 std::vector<CellData<dim>> cells;
3961 cells.reserve(n_elements);
3990 " with element type " + std::string(
string_temp.data()) +
3992 ", which does not match the topological mesh dimension " +
3993 std::to_string(dim) +
"."));
4009 for (
unsigned int elem_n = 0;
elem_n < connection.size();
4016 connection[
elem_n + i] - 1;
4019 cells.push_back(std::move(cell));
4030 tria->create_triangulation(vertices, cells,
pair.first);
4043template <
int dim,
int spacedim>
4057 if (std::find_if(line.begin(), line.end(), [](
const char c) {
4062 for (
int i = line.size() - 1; i >= 0; --i)
4063 in.putback(line[i]);
4073template <
int dim,
int spacedim>
4084 while (in.get() !=
'\n')
4094 skip_empty_lines(in);
4099template <
int dim,
int spacedim>
4114 const std::vector<
Point<2>> &vertices,
4117 double min_x = vertices[cells[0].vertices[0]][0],
4118 max_x = vertices[cells[0].vertices[0]][0],
4119 min_y = vertices[cells[0].vertices[0]][1],
4120 max_y = vertices[cells[0].vertices[0]][1];
4122 for (
unsigned int i = 0; i < cells.size(); ++i)
4124 for (
const auto vertex : cells[i].vertices)
4126 const Point<2> &p = vertices[vertex];
4138 out <<
"# cell " << i << std::endl;
4140 for (
const auto vertex : cells[i].vertices)
4141 center += vertices[vertex];
4144 out <<
"set label \"" << i <<
"\" at " << center[0] <<
',' << center[1]
4145 <<
" center" << std::endl;
4148 for (
unsigned int f = 0; f < 2; ++f)
4149 out <<
"set arrow from " << vertices[cells[i].vertices[f]][0] <<
','
4150 << vertices[cells[i].vertices[f]][1] <<
" to "
4151 << vertices[cells[i].vertices[(f + 1) % 4]][0] <<
','
4152 << vertices[cells[i].vertices[(f + 1) % 4]][1] << std::endl;
4154 for (
unsigned int f = 2; f < 4; ++f)
4155 out <<
"set arrow from " << vertices[cells[i].vertices[(f + 1) % 4]][0]
4156 <<
',' << vertices[cells[i].vertices[(f + 1) % 4]][1] <<
" to "
4157 << vertices[cells[i].vertices[f]][0] <<
','
4158 << vertices[cells[i].vertices[f]][1] << std::endl;
4164 <<
"set nokey" << std::endl
4166 <<
"] " <<
min_y << std::endl
4167 <<
"pause -1" << std::endl;
4175 const std::vector<
Point<3>> &vertices,
4178 for (
const auto &cell : cells)
4181 out << vertices[cell.vertices[0]] << std::endl
4182 << vertices[cell.vertices[1]] << std::endl
4186 out << vertices[cell.vertices[1]] << std::endl
4187 << vertices[cell.vertices[2]] << std::endl
4191 out << vertices[cell.vertices[3]] << std::endl
4192 << vertices[cell.vertices[2]] << std::endl
4196 out << vertices[cell.vertices[0]] << std::endl
4197 << vertices[cell.vertices[3]] << std::endl
4201 out << vertices[cell.vertices[4]] << std::endl
4202 << vertices[cell.vertices[5]] << std::endl
4206 out << vertices[cell.vertices[5]] << std::endl
4207 << vertices[cell.vertices[6]] << std::endl
4211 out << vertices[cell.vertices[7]] << std::endl
4212 << vertices[cell.vertices[6]] << std::endl
4216 out << vertices[cell.vertices[4]] << std::endl
4217 << vertices[cell.vertices[7]] << std::endl
4221 out << vertices[cell.vertices[0]] << std::endl
4222 << vertices[cell.vertices[4]] << std::endl
4226 out << vertices[cell.vertices[1]] << std::endl
4227 << vertices[cell.vertices[5]] << std::endl
4231 out << vertices[cell.vertices[2]] << std::endl
4232 << vertices[cell.vertices[6]] << std::endl
4236 out << vertices[cell.vertices[3]] << std::endl
4237 << vertices[cell.vertices[7]] << std::endl
4245template <
int dim,
int spacedim>
4255 const std::string::size_type
dotpos =
filename.find_last_of(
'.');
4268 else if (
format == exodusii)
4280template <
int dim,
int spacedim>
4327 ExcMessage(
"There is no read_assimp(istream &) function. "
4328 "Use the read_assimp(string &filename, ...) "
4329 "functions, instead."));
4334 ExcMessage(
"There is no read_exodusii(istream &) function. "
4335 "Use the read_exodusii(string &filename, ...) "
4336 "function, instead."));
4347template <
int dim,
int spacedim>
4376 return ".unknown_format";
4382template <
int dim,
int spacedim>
4439template <
int dim,
int spacedim>
4443 return "dbmesh|exodusii|msh|unv|vtk|vtu|ucd|abaqus|xda|tecplot|assimp";
4450 template <
int dim,
int spacedim>
4451 Abaqus_to_UCD<dim, spacedim>::Abaqus_to_UCD()
4464 from_string(T &t,
const std::string &s, std::ios_base &(*f)(std::ios_base &))
4466 std::istringstream
iss(s);
4467 return !(
iss >> f >> t).
fail();
4477 for (
const char c : s)
4479 if (std::isdigit(c) != 0)
4492 template <
int dim,
int spacedim>
4494 Abaqus_to_UCD<dim, spacedim>::read_in_abaqus(std::istream &
input_stream)
4506 std::transform(line.begin(),
4509 static_cast<int (*)(
int)
>(std::toupper));
4511 if (line.compare(
"*HEADING") == 0 || line.compare(0, 2,
"**") == 0 ||
4512 line.compare(0, 5,
"*PART") == 0)
4521 else if (line.compare(0, 5,
"*NODE") == 0)
4535 std::vector<double>
node(spacedim + 1);
4537 std::istringstream
iss(line);
4539 for (
unsigned int i = 0; i < spacedim + 1; ++i)
4542 node_list.push_back(
node);
4545 else if (line.compare(0, 8,
"*ELEMENT") == 0)
4562 if (idx != std::string::npos)
4576 std::istringstream
iss(line);
4589 cell[0] =
static_cast<double>(
material);
4590 cell_list.push_back(cell);
4593 else if (line.compare(0, 8,
"*SURFACE") == 0)
4604 const std::string
name_key =
"NAME=";
4626 std::transform(line.begin(),
4629 static_cast<int (*)(
int)
>(std::toupper));
4634 std::istringstream
iss(line);
4642 const std::string
elset_name = line.substr(0, line.find(
','));
4647 iss >>
stmp >> temp >> face_number;
4649 const std::vector<int> cells = elsets_list[
elset_name];
4650 for (
const int cell : cells)
4674 else if (line.compare(0, 6,
"*ELSET") == 0)
4680 const std::string
elset_key =
"*ELSET, ELSET=";
4681 const std::size_t idx = line.find(
elset_key);
4682 if (idx != std::string::npos)
4684 const std::string
comma =
",";
4701 std::vector<int> elements;
4702 const std::size_t
generate_idx = line.find(
"GENERATE");
4707 std::istringstream
iss(line);
4721 "While reading an ABAQUS file, the reader "
4722 "expected a comma but found a <") +
4723 comma +
"> in the line <" + line +
">."));
4728 "While reading an ABAQUS file, the reader encountered "
4729 "a GENERATE statement in which the upper bound <") +
4731 "> for the element numbers is not larger or equal "
4732 "than the lower bound <" +
4736 if (
iss.rdbuf()->in_avail() != 0)
4741 "While reading an ABAQUS file, the reader "
4742 "expected a comma but found a <") +
4743 comma +
"> in the line <" + line +
">."));
4746 elements.push_back(i);
4759 std::istringstream
iss(line);
4769 "While reading an ABAQUS file, the reader "
4770 "expected a comma but found a <") +
4771 comma +
"> in the line <" + line +
">."));
4773 elements.push_back(
elid);
4782 else if (line.compare(0, 5,
"*NSET") == 0)
4791 else if (line.compare(0, 14,
"*SOLID SECTION") == 0)
4826 template <
int dim,
int spacedim>
4828 Abaqus_to_UCD<dim, spacedim>::get_global_node_numbers(
4924 template <
int dim,
int spacedim>
4926 Abaqus_to_UCD<dim, spacedim>::write_out_avs_ucd(std::ostream &output)
const
4939 output <<
"# Abaqus to UCD mesh conversion" << std::endl;
4940 output <<
"# Mesh type: AVS UCD" << std::endl;
4969 output << node_list.size() <<
"\t" << (cell_list.size() + face_list.size())
4970 <<
"\t0\t0\t0" << std::endl;
4973 output.precision(8);
4977 for (
const auto &
node : node_list)
4980 output <<
node[0] <<
"\t";
4983 output.setf(std::ios::scientific, std::ios::floatfield);
4984 for (
unsigned int jj = 1;
jj < spacedim + 1; ++
jj)
4990 output << 0.0 <<
"\t";
4993 output << 0.0 <<
"\t";
4995 output << std::endl;
4996 output.unsetf(std::ios::floatfield);
5000 for (
unsigned int ii = 0;
ii < cell_list.size(); ++
ii)
5002 output <<
ii + 1 <<
"\t" << cell_list[
ii][0] <<
"\t"
5003 << (dim == 2 ?
"quad" :
"hex") <<
"\t";
5006 output << cell_list[
ii][
jj] <<
"\t";
5008 output << std::endl;
5012 for (
unsigned int ii = 0;
ii < face_list.size(); ++
ii)
5014 output <<
ii + 1 <<
"\t" << face_list[
ii][0] <<
"\t"
5015 << (dim == 2 ?
"line" :
"quad") <<
"\t";
5018 output << face_list[
ii][
jj] <<
"\t";
5020 output << std::endl;
5027#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
constexpr bool running_in_debug_mode()
#define DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_FALLTHROUGH
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
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)
std::vector< index_type > data
constexpr ReferenceCell Triangle
constexpr ReferenceCell Hexahedron
constexpr ReferenceCell Pyramid
constexpr ReferenceCell Wedge
constexpr ReferenceCell Vertex
constexpr ReferenceCell Invalid
constexpr ReferenceCell Quadrilateral
constexpr ReferenceCell Tetrahedron
constexpr 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
constexpr types::geometric_orientation default_geometric_orientation
::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