-----------------------------------------------------------------------------
| 184 | } |
| 185 | //----------------------------------------------------------------------------- |
| 186 | mesh::Mesh<double> |
| 187 | XDMFFile::read_mesh(const fem::CoordinateElement<double>& element, |
| 188 | mesh::GhostMode mode, const std::string& name, |
| 189 | const std::string& xpath, |
| 190 | std::optional<std::int32_t> max_facet_to_cell_links) const |
| 191 | { |
| 192 | // Read mesh data |
| 193 | auto [cells, cshape] = XDMFFile::read_topology_data(name, xpath); |
| 194 | auto [x, xshape] = XDMFFile::read_geometry_data(name, xpath); |
| 195 | |
| 196 | // Create mesh |
| 197 | const std::vector<double>& _x = std::get<std::vector<double>>(x); |
| 198 | mesh::Mesh<double> mesh = mesh::create_mesh( |
| 199 | _comm.comm(), cells, element, _x, xshape, mode, max_facet_to_cell_links); |
| 200 | mesh.name = name; |
| 201 | return mesh; |
| 202 | } |
| 203 | //----------------------------------------------------------------------------- |
| 204 | std::pair<std::vector<std::int64_t>, std::array<std::size_t, 2>> |
| 205 | XDMFFile::read_topology_data(const std::string& name, |