diff --git a/mesh/submesh/psubmesh.cpp b/mesh/submesh/psubmesh.cpp index a7e5a772f0f..7c407bfc490 100644 --- a/mesh/submesh/psubmesh.cpp +++ b/mesh/submesh/psubmesh.cpp @@ -213,7 +213,7 @@ ParSubMesh::ParSubMesh(const ParMesh &parent, SubMesh::From from, { BuildFaceGroup(ngroups, rht, nstrias, rhq, nsquads); } - else if (Dim == 2) + else { group_stria.MakeI(ngroups); group_stria.MakeJ(); diff --git a/tests/unit/mesh/test_psubmesh.cpp b/tests/unit/mesh/test_psubmesh.cpp index c5057338a9a..647e03db6e8 100644 --- a/tests/unit/mesh/test_psubmesh.cpp +++ b/tests/unit/mesh/test_psubmesh.cpp @@ -122,8 +122,8 @@ void multidomain_test_2d(FECType fec_type) auto domain_submesh = ParSubMesh::CreateFromDomain(parent_mesh, domain1); - auto boundary_submesh = ParSubMesh::CreateFromDomain(parent_mesh, - boundary1); + auto boundary_submesh = ParSubMesh::CreateFromBoundary(parent_mesh, + boundary1); FiniteElementCollection *fec = create_fec(fec_type, p, parent_mesh.Dimension()); @@ -135,8 +135,8 @@ void multidomain_test_2d(FECType fec_type) ParGridFunction domain1_gf(&domain1_fes); ParGridFunction domain1_gf_ex(&domain1_fes); - FiniteElementCollection *surface_fec = create_fec(fec_type, p, - domain_submesh.Dimension()); + FiniteElementCollection *surface_fec + = create_fec(fec_type, p, boundary_submesh.Dimension()); ParFiniteElementSpace boundary1_fes(&boundary_submesh, surface_fec); ParGridFunction boundary1_gf(&boundary1_fes); ParGridFunction boundary1_gf_ex(&boundary1_fes);