From d27aac09708011ca723e78d96dd7de1ace899f26 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 21 Jan 2020 19:33:22 +0100 Subject: [PATCH] clearer structure --- src/mesh_FEM.f90 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mesh_FEM.f90 b/src/mesh_FEM.f90 index 014c2d84c..24fc1349f 100644 --- a/src/mesh_FEM.f90 +++ b/src/mesh_FEM.f90 @@ -113,9 +113,13 @@ subroutine mesh_init CHKERRQ(ierr) call DMGetLabelIdIS(globalMesh,'Face Sets',faceSetIS,ierr) CHKERRQ(ierr) - if (nFaceSets > 0) call ISGetIndicesF90(faceSetIS,pFaceSets,ierr) - mesh_boundaries(1:nFaceSets) = pFaceSets(1:nFaceSets) - if (nFaceSets > 0) call ISRestoreIndicesF90(faceSetIS,pFaceSets,ierr) + if (nFaceSets > 0) then + call ISGetIndicesF90(faceSetIS,pFaceSets,ierr) + CHKERRQ(ierr) + mesh_boundaries(1:nFaceSets) = pFaceSets + CHKERRQ(ierr) + call ISRestoreIndicesF90(faceSetIS,pFaceSets,ierr) + endif call MPI_Bcast(mesh_boundaries,mesh_Nboundaries,MPI_INTEGER,0,PETSC_COMM_WORLD,ierr) ! this read in function should ignore C and C++ style comments