added consistency check in material.f90: Microstructure index in geometry must not exceed number of sections in material.config
better error messages in case of recursive file input in IO.f90. also supports absolute path now
This commit is contained in:
parent
715e7fd918
commit
e62c5fdc05
|
@ -160,10 +160,14 @@ recursive function IO_read(fileUnit,reset) result(line)
|
|||
|
||||
inquire(UNIT=unitOn(stack),NAME=path) ! path of current file
|
||||
stack = stack+1_pInt
|
||||
pathOn(stack) = path(1:scan(path,SEP,.true.))//input ! glue include to current file's dir
|
||||
if(scan(input,SEP) == 1) then ! absolut path given (UNIX only)
|
||||
pathOn(stack) = input
|
||||
else
|
||||
pathOn(stack) = path(1:scan(path,SEP,.true.))//input ! glue include to current file's dir
|
||||
endif
|
||||
|
||||
open(newunit=unitOn(stack),iostat=myStat,file=pathOn(stack)) ! open included file
|
||||
if (myStat /= 0_pInt) call IO_error(100_pInt,ext_msg=path)
|
||||
if (myStat /= 0_pInt) call IO_error(100_pInt,ext_msg=pathOn(stack))
|
||||
|
||||
line = IO_read(fileUnit)
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ subroutine material_init
|
|||
|
||||
write(6,'(/,a)') ' <<<+- material init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a16,a)') ' Current time : ',IO_timeStamp()
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
|
||||
if (.not. IO_open_jobFile_stat(FILEUNIT,material_localFileExt)) & ! no local material configuration present...
|
||||
|
@ -393,6 +393,9 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
|
|||
allocate(microstructure_active(Nsections), source=.false.)
|
||||
allocate(microstructure_elemhomo(Nsections), source=.false.)
|
||||
|
||||
if(any(mesh_element(4,1:mesh_NcpElems) > Nsections)) &
|
||||
call IO_error(155_pInt,ext_msg='Microstructure in geometry > Sections in material.config')
|
||||
|
||||
forall (e = 1_pInt:mesh_NcpElems) microstructure_active(mesh_element(4,e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements
|
||||
|
||||
microstructure_Nconstituents = IO_countTagInPart(fileUnit,myPart,'(constituent)',Nsections)
|
||||
|
|
|
@ -141,7 +141,7 @@ subroutine numerics_init
|
|||
|
||||
write(6,'(/,a)') ' <<<+- numerics init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a16,a)') ' Current time : ',IO_timeStamp()
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
|
||||
!$ call GET_ENVIRONMENT_VARIABLE(NAME='DAMASK_NUM_THREADS',VALUE=DAMASK_NumThreadsString,STATUS=gotDAMASK_NUM_THREADS) ! get environment variable DAMASK_NUM_THREADS...
|
||||
|
|
Loading…
Reference in New Issue