2012-08-25 17:16:36 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
2019-06-15 19:18:47 +05:30
|
|
|
!> @brief holds some global variables and gets extra information for commercial FEM
|
2012-08-25 17:16:36 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2012-03-09 01:55:28 +05:30
|
|
|
module FEsolving
|
2019-06-11 19:46:10 +05:30
|
|
|
use prec
|
|
|
|
use debug
|
|
|
|
use IO
|
|
|
|
use DAMASK_interface
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
private
|
2019-06-15 19:18:47 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
logical, public :: &
|
2019-06-15 19:18:47 +05:30
|
|
|
#if defined(Marc4DAMASK) || defined(Abaqus)
|
2019-06-11 19:46:10 +05:30
|
|
|
restartRead = .false., & !< restart information to continue calculation from saved state
|
2019-06-15 19:18:47 +05:30
|
|
|
#endif
|
|
|
|
restartWrite = .false., & !< write current state to enable restart
|
2019-06-11 19:46:10 +05:30
|
|
|
terminallyIll = .false. !< at least one material point is terminally ill
|
2012-03-20 23:31:31 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
integer, dimension(:,:), allocatable, public :: &
|
|
|
|
FEsolving_execIP !< for ping-pong scheme always range to max IP, otherwise one specific IP
|
2019-06-15 19:18:47 +05:30
|
|
|
integer, dimension(2), public :: &
|
2019-06-11 19:46:10 +05:30
|
|
|
FEsolving_execElem !< for ping-pong scheme always whole range, otherwise one specific element
|
|
|
|
|
2019-06-15 19:18:47 +05:30
|
|
|
#if defined(Marc4DAMASK) || defined(Abaqus)
|
|
|
|
logical, public, protected :: &
|
2019-06-16 02:07:31 +05:30
|
|
|
symmetricSolver = .false. !< use a symmetric FEM solver (only Abaqus)
|
2019-06-11 19:46:10 +05:30
|
|
|
character(len=1024), public :: &
|
|
|
|
modelName !< needs description
|
|
|
|
logical, dimension(:,:), allocatable, public :: &
|
|
|
|
calcMode !< do calculation or simply collect when using ping pong scheme
|
2012-03-21 23:34:52 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
public :: FE_init
|
2019-06-15 19:18:47 +05:30
|
|
|
#endif
|
2008-03-15 03:02:57 +05:30
|
|
|
|
2012-03-09 01:55:28 +05:30
|
|
|
contains
|
2009-01-20 00:40:58 +05:30
|
|
|
|
2013-02-11 15:14:17 +05:30
|
|
|
|
2019-06-15 19:18:47 +05:30
|
|
|
#if defined(Marc4DAMASK) || defined(Abaqus)
|
2012-08-25 17:16:36 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @brief determine whether a symmetric solver is used and whether restart is requested
|
2013-02-27 00:31:31 +05:30
|
|
|
!> @details restart information is found in input file in case of FEM solvers, in case of spectal
|
|
|
|
!> solver the information is provided by the interface module
|
2012-08-25 17:16:36 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2012-03-09 01:55:28 +05:30
|
|
|
subroutine FE_init
|
2009-01-20 00:40:58 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
integer, parameter :: &
|
|
|
|
FILEUNIT = 222
|
|
|
|
integer :: j
|
|
|
|
character(len=65536) :: tag, line
|
|
|
|
integer, allocatable, dimension(:) :: chunkPos
|
2013-02-11 15:14:17 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
write(6,'(/,a)') ' <<<+- FEsolving init -+>>>'
|
2012-03-09 01:55:28 +05:30
|
|
|
|
2019-06-15 19:18:47 +05:30
|
|
|
modelName = getSolverJobName()
|
2019-06-11 19:46:10 +05:30
|
|
|
call IO_open_inputFile(FILEUNIT,modelName)
|
|
|
|
rewind(FILEUNIT)
|
|
|
|
do
|
|
|
|
read (FILEUNIT,'(a1024)',END=100) line
|
|
|
|
chunkPos = IO_stringPos(line)
|
|
|
|
tag = IO_lc(IO_stringValue(line,chunkPos,1)) ! extract key
|
|
|
|
select case(tag)
|
|
|
|
case ('solver')
|
|
|
|
read (FILEUNIT,'(a1024)',END=100) line ! next line
|
|
|
|
chunkPos = IO_stringPos(line)
|
|
|
|
symmetricSolver = (IO_intValue(line,chunkPos,2) /= 1)
|
|
|
|
case ('restart')
|
|
|
|
read (FILEUNIT,'(a1024)',END=100) line ! next line
|
|
|
|
chunkPos = IO_stringPos(line)
|
|
|
|
restartWrite = iand(IO_intValue(line,chunkPos,1),1) > 0
|
|
|
|
restartRead = iand(IO_intValue(line,chunkPos,1),2) > 0
|
|
|
|
case ('*restart')
|
|
|
|
do j=2,chunkPos(1)
|
|
|
|
restartWrite = (IO_lc(IO_StringValue(line,chunkPos,j)) == 'write') .or. restartWrite
|
|
|
|
restartRead = (IO_lc(IO_StringValue(line,chunkPos,j)) == 'read') .or. restartRead
|
|
|
|
enddo
|
|
|
|
if(restartWrite) then
|
|
|
|
do j=2,chunkPos(1)
|
|
|
|
restartWrite = (IO_lc(IO_StringValue(line,chunkPos,j)) /= 'frequency=0') .and. restartWrite
|
|
|
|
enddo
|
|
|
|
endif
|
|
|
|
end select
|
|
|
|
enddo
|
|
|
|
100 close(FILEUNIT)
|
2012-06-15 21:40:21 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
if (restartRead) then
|
2013-04-30 15:19:30 +05:30
|
|
|
#ifdef Marc4DAMASK
|
2019-06-11 19:46:10 +05:30
|
|
|
call IO_open_logFile(FILEUNIT)
|
|
|
|
rewind(FILEUNIT)
|
|
|
|
do
|
|
|
|
read (FILEUNIT,'(a1024)',END=200) line
|
|
|
|
chunkPos = IO_stringPos(line)
|
|
|
|
if ( IO_lc(IO_stringValue(line,chunkPos,1)) == 'restart' &
|
|
|
|
.and. IO_lc(IO_stringValue(line,chunkPos,2)) == 'file' &
|
|
|
|
.and. IO_lc(IO_stringValue(line,chunkPos,3)) == 'job' &
|
|
|
|
.and. IO_lc(IO_stringValue(line,chunkPos,4)) == 'id' ) &
|
|
|
|
modelName = IO_StringValue(line,chunkPos,6)
|
|
|
|
enddo
|
|
|
|
#else
|
|
|
|
call IO_open_inputFile(FILEUNIT,modelName)
|
|
|
|
rewind(FILEUNIT)
|
|
|
|
do
|
|
|
|
read (FILEUNIT,'(a1024)',END=200) line
|
|
|
|
chunkPos = IO_stringPos(line)
|
|
|
|
if (IO_lc(IO_stringValue(line,chunkPos,1))=='*heading') then
|
|
|
|
read (FILEUNIT,'(a1024)',END=200) line
|
|
|
|
chunkPos = IO_stringPos(line)
|
|
|
|
modelName = IO_StringValue(line,chunkPos,1)
|
|
|
|
endif
|
|
|
|
enddo
|
2012-06-15 21:40:21 +05:30
|
|
|
#endif
|
2019-06-11 19:46:10 +05:30
|
|
|
200 close(FILEUNIT)
|
|
|
|
endif
|
2013-02-11 15:14:17 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
if (iand(debug_level(debug_FEsolving),debug_levelBasic) /= 0) then
|
|
|
|
write(6,'(a21,l1)') ' restart writing: ', restartWrite
|
|
|
|
write(6,'(a21,l1)') ' restart reading: ', restartRead
|
|
|
|
if (restartRead) write(6,'(a,/)') ' restart Job: '//trim(modelName)
|
|
|
|
endif
|
2009-01-20 00:40:58 +05:30
|
|
|
|
2012-03-09 01:55:28 +05:30
|
|
|
end subroutine FE_init
|
2019-06-15 19:18:47 +05:30
|
|
|
#endif
|
2008-03-15 03:02:57 +05:30
|
|
|
|
2012-03-09 01:55:28 +05:30
|
|
|
end module FEsolving
|