From 515e5c7744a3b6d2f73113085bf35109bc490451 Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Mon, 6 Feb 2023 19:54:54 +0100 Subject: [PATCH] Fix an issue and starting to read information from .vtu initial files For some reason the connectivity for collision meshes was not being properly assigned. Also, the first subroutine to read information from .vtu files as initial states has been added. It is currently giving wrong results. --- src/modules/init/moduleInput.f90 | 5 +++ .../mesh/inout/vtu/moduleMeshInputVTU.f90 | 38 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/src/modules/init/moduleInput.f90 b/src/modules/init/moduleInput.f90 index 33bd894..da43e98 100644 --- a/src/modules/init/moduleInput.f90 +++ b/src/modules/init/moduleInput.f90 @@ -991,6 +991,11 @@ MODULE moduleInput END SELECT + IF (doubleMesh) THEN + meshColl%connectMesh => mesh%connectMesh + + END IF + !Get the format of mesh CALL config%get(object // '.meshType', meshFormat, found) SELECT CASE(meshFormat) diff --git a/src/modules/mesh/inout/vtu/moduleMeshInputVTU.f90 b/src/modules/mesh/inout/vtu/moduleMeshInputVTU.f90 index 3001eac..c62dec1 100644 --- a/src/modules/mesh/inout/vtu/moduleMeshInputVTU.f90 +++ b/src/modules/mesh/inout/vtu/moduleMeshInputVTU.f90 @@ -508,6 +508,44 @@ MODULE moduleMeshInputVTU REAL(8), ALLOCATABLE, INTENT(out), DIMENSION(:):: density REAL(8), ALLOCATABLE, INTENT(out), DIMENSION(:,:):: velocity REAL(8), ALLOCATABLE, INTENT(out), DIMENSION(:):: temperature + INTEGER:: fileID + CHARACTER(:), ALLOCATABLE:: line + INTEGER:: numNodes + REAL(8), ALLOCATABLE:: velocityBlock(:) + INTEGER:: n + + fileID = 10 + + OPEN(fileID, file = TRIM(filename)) + + line = findLine(fileID, '