causes problem for MARC

to be removed later
This commit is contained in:
Sharan Roongta 2023-06-07 15:55:01 +02:00
parent a767008444
commit d00bf2d3d5
2 changed files with 35 additions and 2 deletions

View File

@ -33,6 +33,7 @@ module DAMASK_interface
public :: &
DAMASK_interface_init, &
! getMaterialFileName, &
getSolverJobName
contains
@ -93,6 +94,32 @@ function getSolverJobName()
end function getSolverJobName
!--------------------------------------------------------------------------------------------------
!> @brief material configuration file name
!--------------------------------------------------------------------------------------------------
!function getMaterialFileName()
! character(len=:), allocatable :: getMaterialFileName
! character(len=pSTRLEN) :: line
! integer :: myStat,fileUnit,s,e
! open(newunit=fileUnit, file=getSolverJobName()//INPUTFILEEXTENSION, &
! status='old', position='rewind', action='read',iostat=myStat)
! do
! read (fileUnit,'(A)',END=100) line
! if (index(trim(line),'materialConfig') == 1) then
! read (fileUnit,'(A)',END=100) line ! next line
! s = verify(line, ' ') ! start of first chunk
! s = s + verify(line(s+1:),' ') ! start of second chunk
! e = s + scan (line(s+1:),' ') ! end of second chunk
! getMaterialFileName = line(s:e)
! end if
! end do
!100 close(fileUnit)
!end function getMaterialFileName
!--------------------------------------------------------------------------------------------------
!> @brief determines whether a symmetric solver is used
!--------------------------------------------------------------------------------------------------

View File

@ -4,13 +4,14 @@
!--------------------------------------------------------------------------------------------------
module config
use IO
use CLI
use misc
use YAML_parse
use YAML_types
use result
use parallelization
#if defined(MESH) || defined(GRID)
use CLI
#endif
implicit none(type,external)
private
@ -102,8 +103,13 @@ subroutine parse_material()
if (worldrank == 0) then
print'(/,1x,a)', 'reading material.yaml'; flush(IO_STDOUT)
#if defined(MESH) || defined(GRID)
fileContent = IO_read(CLI_materialFile)
fname = CLI_materialFile
#else
fileContent = IO_read('material.yaml')
fname = 'material.yaml'
#endif
if (scan(fname,'/') /= 0) fname = fname(scan(fname,'/',.true.)+1:)
call result_openJobFile(parallel=.false.)
call result_writeDataset_str(fileContent,'setup',fname,'main configuration')