parent
a767008444
commit
d00bf2d3d5
|
@ -33,6 +33,7 @@ module DAMASK_interface
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
DAMASK_interface_init, &
|
DAMASK_interface_init, &
|
||||||
|
! getMaterialFileName, &
|
||||||
getSolverJobName
|
getSolverJobName
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
@ -93,6 +94,32 @@ function getSolverJobName()
|
||||||
end 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
|
!> @brief determines whether a symmetric solver is used
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -4,13 +4,14 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module config
|
module config
|
||||||
use IO
|
use IO
|
||||||
use CLI
|
|
||||||
use misc
|
use misc
|
||||||
use YAML_parse
|
use YAML_parse
|
||||||
use YAML_types
|
use YAML_types
|
||||||
use result
|
use result
|
||||||
use parallelization
|
use parallelization
|
||||||
|
#if defined(MESH) || defined(GRID)
|
||||||
|
use CLI
|
||||||
|
#endif
|
||||||
implicit none(type,external)
|
implicit none(type,external)
|
||||||
private
|
private
|
||||||
|
|
||||||
|
@ -102,8 +103,13 @@ subroutine parse_material()
|
||||||
|
|
||||||
if (worldrank == 0) then
|
if (worldrank == 0) then
|
||||||
print'(/,1x,a)', 'reading material.yaml'; flush(IO_STDOUT)
|
print'(/,1x,a)', 'reading material.yaml'; flush(IO_STDOUT)
|
||||||
|
#if defined(MESH) || defined(GRID)
|
||||||
fileContent = IO_read(CLI_materialFile)
|
fileContent = IO_read(CLI_materialFile)
|
||||||
fname = 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:)
|
if (scan(fname,'/') /= 0) fname = fname(scan(fname,'/',.true.)+1:)
|
||||||
call result_openJobFile(parallel=.false.)
|
call result_openJobFile(parallel=.false.)
|
||||||
call result_writeDataset_str(fileContent,'setup',fname,'main configuration')
|
call result_writeDataset_str(fileContent,'setup',fname,'main configuration')
|
||||||
|
|
Loading…
Reference in New Issue