From a1f36b14d3ca96ce6be930f0fa20fec183d25dd6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 9 Mar 2020 14:05:49 +0100 Subject: [PATCH] simplifying still trying to figure out how to best use HDF5 for reference stiffness --- src/IO.f90 | 21 +-------------------- src/grid/spectral_utilities.f90 | 3 ++- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index a57ce9b45..c3bfb9742 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -7,7 +7,6 @@ !-------------------------------------------------------------------------------------------------- module IO use prec - use DAMASK_interface implicit none private @@ -25,7 +24,7 @@ module IO public :: & IO_init, & IO_read_ASCII, & - IO_open_jobFile_binary, & + IO_open_binary, & IO_isBlank, & IO_getTag, & IO_stringPos, & @@ -116,24 +115,6 @@ function IO_read_ASCII(fileName) result(fileContent) end function IO_read_ASCII -!-------------------------------------------------------------------------------------------------- -!> @brief opens an existing file for reading or a new file for writing. Name is the job name -!> @details replaces an existing file when writing -!-------------------------------------------------------------------------------------------------- -integer function IO_open_jobFile_binary(extension,mode) - - character(len=*), intent(in) :: extension - character, intent(in), optional :: mode - - if (present(mode)) then - IO_open_jobFile_binary = IO_open_binary(trim(getSolverJobName())//'.'//trim(extension),mode) - else - IO_open_jobFile_binary = IO_open_binary(trim(getSolverJobName())//'.'//trim(extension)) - endif - -end function IO_open_jobFile_binary - - !-------------------------------------------------------------------------------------------------- !> @brief opens an existing file for reading or a new file for writing. !> @details replaces an existing file when writing diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 87e906727..45b3bbe7a 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -9,6 +9,7 @@ module spectral_utilities use PETScSys use prec + use DAMASK_interface use math use rotations use IO @@ -1101,7 +1102,7 @@ subroutine utilities_saveReferenceStiffness if (worldrank == 0) then write(6,'(a)') ' writing reference stiffness data required for restart to file'; flush(6) - fileUnit = IO_open_jobFile_binary('C_ref','w') + fileUnit = IO_open_binary(trim(getSolverJobName())//'.C_ref','w') write(fileUnit) C_ref close(fileUnit) endif