Copy input files to output folder #19
2 changed files with 19 additions and 7 deletions
Copy input files to output folder
After reading the input, the code copies the JSON input file but the mesh(es) to the output directory.
commit
027b346a84
|
|
@ -417,6 +417,11 @@ MODULE moduleMesh
|
|||
|
||||
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
|
||||
!Constructs the global K matrix
|
||||
SUBROUTINE constructGlobalK(self)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ MODULE moduleInput
|
|||
USE moduleBoundary
|
||||
USE moduleInject
|
||||
USE moduleOutput
|
||||
USE moduleMesh
|
||||
IMPLICIT NONE
|
||||
|
||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: inputFile
|
||||
|
|
@ -71,6 +72,14 @@ MODULE moduleInput
|
|||
|
||||
!If everything is correct, creates the output 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
|
||||
|
||||
|
|
@ -780,9 +789,7 @@ MODULE moduleInput
|
|||
|
||||
TYPE(json_file), INTENT(inout):: config
|
||||
LOGICAL:: found
|
||||
LOGICAL:: doubleMesh
|
||||
CHARACTER(:), ALLOCATABLE:: meshFormat, meshFile
|
||||
CHARACTER(:), ALLOCATABLE:: fullPath
|
||||
REAL(8):: volume
|
||||
|
||||
!Firstly, indicates if a specific mesh for MC collisions is being use
|
||||
|
|
@ -810,14 +817,14 @@ MODULE moduleInput
|
|||
|
||||
!Reads the mesh file
|
||||
CALL config%get('geometry.meshFile', meshFile, found)
|
||||
fullpath = path // meshFile
|
||||
CALL mesh%readMesh(fullPath)
|
||||
DEALLOCATE(fullPath, meshFile)
|
||||
pathMeshParticle = path // meshFile
|
||||
CALL mesh%readMesh(pathMeshParticle)
|
||||
DEALLOCATE(meshFile)
|
||||
IF (doubleMesh) THEN
|
||||
!Reads the mesh file for collisions
|
||||
CALL config%get('interactions.meshCollisions', meshFile, found)
|
||||
fullpath = path // meshFile
|
||||
CALL meshColl%readMesh(fullPath)
|
||||
pathMeshColl = path // meshFile
|
||||
CALL meshColl%readMesh(pathMeshColl)
|
||||
|
||||
END IF
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue