Merge branch 'deallocate-numerics' into 'development'

Deallocate numerics

See merge request damask/DAMASK!737
This commit is contained in:
Martin Diehl 2023-02-27 11:34:03 +00:00
commit 11b83a5ec9
5 changed files with 24 additions and 6 deletions

View File

@ -81,7 +81,9 @@ subroutine materialpoint_initAll()
call phase_init()
call homogenization_init()
call materialpoint_init()
call config_deallocate()
call config_material_deallocate()
call config_numerics_deallocate()
end subroutine materialpoint_initAll

View File

@ -18,7 +18,8 @@ module config
public :: &
config_init, &
config_deallocate
config_material_deallocate,&
config_numerics_deallocate
contains
@ -95,12 +96,24 @@ end subroutine parse_numerics
!--------------------------------------------------------------------------------------------------
!> @brief Deallocate config_material.
!ToDo: deallocation of numerics (optional)
!--------------------------------------------------------------------------------------------------
subroutine config_deallocate
subroutine config_material_deallocate()
print'(/,1x,a)', 'deallocating material configuration'; flush(IO_STDOUT)
deallocate(config_material)
end subroutine config_deallocate
end subroutine config_material_deallocate
!--------------------------------------------------------------------------------------------------
!> @brief Deallocate config_numerics if present.
!--------------------------------------------------------------------------------------------------
subroutine config_numerics_deallocate()
if (.not. associated(config_numerics, emptyDict)) then
print'(/,1x,a)', 'deallocating numerics configuration'; flush(IO_STDOUT)
deallocate(config_numerics)
end if
end subroutine config_numerics_deallocate
end module config

View File

@ -314,6 +314,7 @@ program DAMASK_grid
!--------------------------------------------------------------------------------------------------
! doing initialization depending on active solvers
call spectral_Utilities_init()
do field = 2, nActiveFields
select case (ID(field))
@ -327,6 +328,7 @@ program DAMASK_grid
end do
call mechanical_init()
call config_numerics_deallocate()
!--------------------------------------------------------------------------------------------------
! write header of output file

View File

@ -72,7 +72,7 @@ subroutine materialpoint_initAll()
call phase_init()
call homogenization_init()
call materialpoint_init()
call config_deallocate()
call config_material_deallocate()
end subroutine materialpoint_initAll

View File

@ -231,6 +231,7 @@ program DAMASK_mesh
! doing initialization depending on active solvers
call FEM_Utilities_init()
call FEM_mechanical_init(loadCases(1)%fieldBC(1))
call config_numerics_deallocate()
if (worldrank == 0) then
open(newunit=statUnit,file=trim(getSolverJobName())//'.sta',form='FORMATTED',status='REPLACE')