Copy input files to output folder #19

Merged
JorgeGonz merged 1 commit from feature/copyInputFiles into development 2021-04-21 16:03:28 +02:00
2 changed files with 19 additions and 7 deletions

View file

@ -417,6 +417,11 @@ MODULE moduleMesh
END INTERFACE END INTERFACE
!Logical to indicate if an specific mesh for MC Collisions is used
LOGICAL:: doubleMesh
!Complete path for the two meshes
CHARACTER(:), ALLOCATABLE:: pathMeshColl, pathMeshParticle
CONTAINS CONTAINS
!Constructs the global K matrix !Constructs the global K matrix
SUBROUTINE constructGlobalK(self) SUBROUTINE constructGlobalK(self)

View file

@ -11,6 +11,7 @@ MODULE moduleInput
USE moduleBoundary USE moduleBoundary
USE moduleInject USE moduleInject
USE moduleOutput USE moduleOutput
USE moduleMesh
IMPLICIT NONE IMPLICIT NONE
CHARACTER(:), ALLOCATABLE, INTENT(in):: inputFile CHARACTER(:), ALLOCATABLE, INTENT(in):: inputFile
@ -71,6 +72,14 @@ MODULE moduleInput
!If everything is correct, creates the output folder !If everything is correct, creates the output folder
CALL EXECUTE_COMMAND_LINE('mkdir ' // path // folder ) CALL EXECUTE_COMMAND_LINE('mkdir ' // path // folder )
!Copies input file to output folder
CALL EXECUTE_COMMAND_LINE('cp ' // inputFile // ' ' // path // folder)
!Copies particle mesh
CALL EXECUTE_COMMAND_LINE('cp ' // pathMeshParticle // ' ' // path // folder)
IF (doubleMesh) THEN
CALL EXECUTE_COMMAND_LINE('cp ' // pathMeshColl // ' ' // path // folder)
END IF
END SUBROUTINE readConfig END SUBROUTINE readConfig
@ -780,9 +789,7 @@ MODULE moduleInput
TYPE(json_file), INTENT(inout):: config TYPE(json_file), INTENT(inout):: config
LOGICAL:: found LOGICAL:: found
LOGICAL:: doubleMesh
CHARACTER(:), ALLOCATABLE:: meshFormat, meshFile CHARACTER(:), ALLOCATABLE:: meshFormat, meshFile
CHARACTER(:), ALLOCATABLE:: fullPath
REAL(8):: volume REAL(8):: volume
!Firstly, indicates if a specific mesh for MC collisions is being use !Firstly, indicates if a specific mesh for MC collisions is being use
@ -810,14 +817,14 @@ MODULE moduleInput
!Reads the mesh file !Reads the mesh file
CALL config%get('geometry.meshFile', meshFile, found) CALL config%get('geometry.meshFile', meshFile, found)
fullpath = path // meshFile pathMeshParticle = path // meshFile
CALL mesh%readMesh(fullPath) CALL mesh%readMesh(pathMeshParticle)
DEALLOCATE(fullPath, meshFile) DEALLOCATE(meshFile)
IF (doubleMesh) THEN IF (doubleMesh) THEN
!Reads the mesh file for collisions !Reads the mesh file for collisions
CALL config%get('interactions.meshCollisions', meshFile, found) CALL config%get('interactions.meshCollisions', meshFile, found)
fullpath = path // meshFile pathMeshColl = path // meshFile
CALL meshColl%readMesh(fullPath) CALL meshColl%readMesh(pathMeshColl)
END IF END IF