restart does not overwrite existing results
This commit is contained in:
commit
0f2447d413
|
@ -26,7 +26,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -xf95-cpp-input")
|
|||
# preprocessor
|
||||
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC -fPIE")
|
||||
# position independent conde
|
||||
# position independent code
|
||||
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-132")
|
||||
# restrict line length to the standard 132 characters (lattice.f90 require more characters)
|
||||
|
|
|
@ -83,10 +83,10 @@ subroutine CPFEM_initAll(el,ip)
|
|||
call math_init
|
||||
call rotations_init
|
||||
call HDF5_utilities_init
|
||||
call results_init
|
||||
call results_init(.false.)
|
||||
call discretization_marc_init(ip, el)
|
||||
call lattice_init
|
||||
call material_init
|
||||
call material_init(.false.)
|
||||
call constitutive_init
|
||||
call crystallite_init
|
||||
call homogenization_init
|
||||
|
|
|
@ -52,13 +52,13 @@ subroutine CPFEM_initAll
|
|||
call rotations_init
|
||||
call lattice_init
|
||||
call HDF5_utilities_init
|
||||
call results_init
|
||||
call results_init(restart=interface_restartInc>0)
|
||||
#if defined(Mesh)
|
||||
call discretization_mesh_init
|
||||
call discretization_mesh_init(restart=interface_restartInc>0)
|
||||
#elif defined(Grid)
|
||||
call discretization_grid_init
|
||||
call discretization_grid_init(restart=interface_restartInc>0)
|
||||
#endif
|
||||
call material_init
|
||||
call material_init(restart=interface_restartInc>0)
|
||||
call constitutive_init
|
||||
call crystallite_init
|
||||
call homogenization_init
|
||||
|
|
|
@ -42,7 +42,9 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief reads the geometry file to obtain information on discretization
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine discretization_grid_init
|
||||
subroutine discretization_grid_init(restart)
|
||||
|
||||
logical, intent(in) :: restart
|
||||
|
||||
include 'fftw3-mpi.f03'
|
||||
real(pReal), dimension(3) :: &
|
||||
|
@ -100,13 +102,14 @@ subroutine discretization_grid_init
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! store geometry information for post processing
|
||||
call results_openJobFile
|
||||
call results_closeGroup(results_addGroup('geometry'))
|
||||
call results_addAttribute('grid', grid, 'geometry')
|
||||
call results_addAttribute('size', geomSize,'geometry')
|
||||
call results_addAttribute('origin',origin, 'geometry')
|
||||
call results_closeJobFile
|
||||
|
||||
if(.not. restart) then
|
||||
call results_openJobFile
|
||||
call results_closeGroup(results_addGroup('geometry'))
|
||||
call results_addAttribute('grid', grid, 'geometry')
|
||||
call results_addAttribute('size', geomSize,'geometry')
|
||||
call results_addAttribute('origin',origin, 'geometry')
|
||||
call results_closeJobFile
|
||||
endif
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! geometry information required by the nonlocal CP model
|
||||
call geometry_plastic_nonlocal_setIPvolume(reshape([(product(mySize/real(myGrid,pReal)),j=1,product(myGrid))], &
|
||||
|
|
|
@ -207,7 +207,9 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief parses material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine material_init
|
||||
subroutine material_init(restart)
|
||||
|
||||
logical, intent(in) :: restart
|
||||
|
||||
integer :: i,e,m,c,h, myDebug, myPhase, myHomog, myMicro
|
||||
integer, dimension(:), allocatable :: &
|
||||
|
@ -339,11 +341,12 @@ subroutine material_init
|
|||
call config_deallocate('material.config/microstructure')
|
||||
call config_deallocate('material.config/texture')
|
||||
|
||||
call results_openJobFile
|
||||
call results_mapping_constituent(material_phaseAt,material_phaseMemberAt,config_name_phase)
|
||||
call results_mapping_materialpoint(material_homogenizationAt,material_homogenizationMemberAt,config_name_homogenization)
|
||||
call results_closeJobFile
|
||||
|
||||
if (.not. restart) then
|
||||
call results_openJobFile
|
||||
call results_mapping_constituent(material_phaseAt,material_phaseMemberAt,config_name_phase)
|
||||
call results_mapping_materialpoint(material_homogenizationAt,material_homogenizationMemberAt,config_name_homogenization)
|
||||
call results_closeJobFile
|
||||
endif
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
! BEGIN DEPRECATED
|
||||
|
|
|
@ -63,7 +63,9 @@ contains
|
|||
!> @brief initializes the mesh by calling all necessary private routines the mesh module
|
||||
!! Order and routines strongly depend on type of solver
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine discretization_mesh_init
|
||||
subroutine discretization_mesh_init(restart)
|
||||
|
||||
integer, intent(in) :: restart
|
||||
|
||||
integer, dimension(1), parameter:: FE_geomtype = [1] !< geometry type of particular element type
|
||||
integer, dimension(1) :: FE_Nips !< number of IPs in a specific type of element
|
||||
|
|
|
@ -59,7 +59,9 @@ module results
|
|||
results_mapping_materialpoint
|
||||
contains
|
||||
|
||||
subroutine results_init
|
||||
subroutine results_init(restart)
|
||||
|
||||
logical, intent(in) :: restart
|
||||
|
||||
character(len=pStringLen) :: commandLine
|
||||
|
||||
|
@ -68,15 +70,17 @@ subroutine results_init
|
|||
write(6,'(/,a)') ' Diehl et al., Integrating Materials and Manufacturing Innovation 6(1):83–91, 2017'
|
||||
write(6,'(a)') ' https://doi.org/10.1007/s40192-017-0084-5'
|
||||
|
||||
resultsFile = HDF5_openFile(trim(getSolverJobName())//'.hdf5','w',.true.)
|
||||
call results_addAttribute('DADF5_version_major',0)
|
||||
call results_addAttribute('DADF5_version_minor',6)
|
||||
call results_addAttribute('DAMASK_version',DAMASKVERSION)
|
||||
call get_command(commandLine)
|
||||
call results_addAttribute('call',trim(commandLine))
|
||||
call results_closeGroup(results_addGroup('mapping'))
|
||||
call results_closeGroup(results_addGroup('mapping/cellResults'))
|
||||
call results_closeJobFile
|
||||
if(.not. restart) then
|
||||
resultsFile = HDF5_openFile(trim(getSolverJobName())//'.hdf5','w',.true.)
|
||||
call results_addAttribute('DADF5_version_major',0)
|
||||
call results_addAttribute('DADF5_version_minor',6)
|
||||
call results_addAttribute('DAMASK_version',DAMASKVERSION)
|
||||
call get_command(commandLine)
|
||||
call results_addAttribute('call',trim(commandLine))
|
||||
call results_closeGroup(results_addGroup('mapping'))
|
||||
call results_closeGroup(results_addGroup('mapping/cellResults'))
|
||||
call results_closeJobFile
|
||||
endif
|
||||
|
||||
end subroutine results_init
|
||||
|
||||
|
|
Loading…
Reference in New Issue