From fd7b581bc27397ddd7d4a3e8f48c6e1e60178d8f Mon Sep 17 00:00:00 2001 From: Umberto Zerbinati Date: Thu, 12 Sep 2024 00:08:40 +0100 Subject: [PATCH] Fix for parallel --- Dockerfile | 2 +- ngsPETSc/utils/firedrake/hierarchies.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b0b470..3a17051 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #Setting up basic python and to be root -FROM python:3.10-slim-buster +FROM python:3.10-slim USER root #Setting up system variable ENV PETSC_DIR /root/petsc diff --git a/ngsPETSc/utils/firedrake/hierarchies.py b/ngsPETSc/utils/firedrake/hierarchies.py index 245954b..14f69c6 100644 --- a/ngsPETSc/utils/firedrake/hierarchies.py +++ b/ngsPETSc/utils/firedrake/hierarchies.py @@ -40,7 +40,8 @@ def uniformRefinementRoutine(ngmesh, cdm): rdm.removeLabel("pyop2_owned") rdm.removeLabel("pyop2_ghost") if ngmesh.dim > 2: - mapping = MeshMapping(rdm, geo=ngmesh.GetGeometry()) + sdm = rdm.getRedundant() + mapping = MeshMapping(sdm, geo=ngmesh.GetGeometry()) return (rdm, mapping.ngMesh) else: #Faster but only works for 2D meshes