From 665dd3020da1a1d45a7631e25ed7433825d4966b Mon Sep 17 00:00:00 2001 From: Sharan Roongta Date: Fri, 4 Dec 2020 03:30:39 +0100 Subject: [PATCH] new gmsh version --- PRIVATE | 2 +- src/mesh/discretization_mesh.f90 | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/PRIVATE b/PRIVATE index 68cde5229..113f44413 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 68cde52291ebb683ca6f610879f2ae28372597a7 +Subproject commit 113f44413c88e9b577f3781012592ea9a4836458 diff --git a/src/mesh/discretization_mesh.f90 b/src/mesh/discretization_mesh.f90 index 7dbd05e46..d998c84db 100644 --- a/src/mesh/discretization_mesh.f90 +++ b/src/mesh/discretization_mesh.f90 @@ -69,7 +69,7 @@ subroutine discretization_mesh_init(restart) integer, allocatable, dimension(:) :: chunkPos integer :: dimPlex, & mesh_Nnodes, & !< total number of nodes in mesh - j, l, & + j, l, k, & debug_element, debug_ip PetscSF :: sf DM :: globalMesh @@ -96,7 +96,6 @@ subroutine discretization_mesh_init(restart) debug_element = config_debug%get_asInt('element',defaultVal=1) debug_ip = config_debug%get_asInt('integrationpoint',defaultVal=1) - call DMPlexCreateFromFile(PETSC_COMM_WORLD,interface_geomFile,PETSC_TRUE,globalMesh,ierr) CHKERRQ(ierr) call DMGetDimension(globalMesh,dimPlex,ierr) @@ -137,11 +136,14 @@ subroutine discretization_mesh_init(restart) l = l + 1 if (trim(fileContent(l)) == '$EndElements') exit chunkPos = IO_stringPos(fileContent(l)) - if (chunkPos(1) == 3+IO_intValue(fileContent(l),chunkPos,3)+dimPlex+1) then - call DMSetLabelValue(globalMesh,'material',j,IO_intValue(fileContent(l),chunkPos,4),ierr) - CHKERRQ(ierr) - j = j + 1 + if(IO_intValue(fileContent(l),chunkPos,1) == 3) then + do k = 1, IO_intValue(fileContent(l),chunkPos,4) + call DMSetLabelValue(globalMesh,'material',j,IO_intValue(fileContent(l),chunkPos,2),ierr) + CHKERRQ(ierr) + j = j + 1 + enddo endif + l = l + IO_intValue(fileContent(l),chunkPos,4) enddo exit endif