]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix dimension selection in COMSOL mphtxt reader. 14374/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 24 Oct 2022 15:33:17 +0000 (09:33 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 24 Oct 2022 15:33:17 +0000 (09:33 -0600)
source/grid/grid_in.cc

index 9dc0519b2358192ad3b18c4593200a169e20abe2..abe39ce8d4c18c0322dfbf521dac6889206514ca 100644 (file)
@@ -1681,7 +1681,7 @@ GridIn<dim, spacedim>::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<dim, spacedim>::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<dim, spacedim>::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<dim, spacedim>::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<dim, spacedim>::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<dim, spacedim>::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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.