From: Wolfgang Bangerth Date: Mon, 24 Oct 2022 15:33:17 +0000 (-0600) Subject: Fix dimension selection in COMSOL mphtxt reader. X-Git-Tag: v9.5.0-rc1~891^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=954566d808f3ba646521f4f110d8f3856d1d8e01;p=dealii.git Fix dimension selection in COMSOL mphtxt reader. --- diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index 9dc0519b23..abe39ce8d4 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -1681,7 +1681,7 @@ GridIn::read_comsol_mphtxt(std::istream &in) ; // do nothing else if (object_type == ReferenceCells::Line) { - if (spacedim == 1) + if (dim == 1) { cells.emplace_back(); cells.back().vertices = vertices_for_this_element; @@ -1696,7 +1696,7 @@ GridIn::read_comsol_mphtxt(std::istream &in) else if ((object_type == ReferenceCells::Triangle) || (object_type == ReferenceCells::Quadrilateral)) { - if (spacedim == 2) + if (dim == 2) { cells.emplace_back(); cells.back().vertices = vertices_for_this_element; @@ -1711,7 +1711,7 @@ GridIn::read_comsol_mphtxt(std::istream &in) else if ((object_type == ReferenceCells::Tetrahedron) || (object_type == ReferenceCells::Wedge)) { - if (spacedim == 3) + if (dim == 3) { cells.emplace_back(); cells.back().vertices = vertices_for_this_element; @@ -1748,7 +1748,7 @@ GridIn::read_comsol_mphtxt(std::istream &in) ; // do nothing else if (object_type == ReferenceCells::Line) { - if (spacedim == 1) + if (dim == 1) cells[cells.size() - n_elements + e].material_id = geometric_entity_index; else @@ -1760,7 +1760,7 @@ GridIn::read_comsol_mphtxt(std::istream &in) else if ((object_type == ReferenceCells::Triangle) || (object_type == ReferenceCells::Quadrilateral)) { - if (spacedim == 2) + if (dim == 2) cells[cells.size() - n_elements + e].material_id = geometric_entity_index; else @@ -1772,7 +1772,7 @@ GridIn::read_comsol_mphtxt(std::istream &in) else if ((object_type == ReferenceCells::Tetrahedron) || (object_type == ReferenceCells::Wedge)) { - if (spacedim == 3) + if (dim == 3) cells[cells.size() - n_elements + e].material_id = geometric_entity_index; else