2016-01-17 20:33:54 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @brief needs a good name and description
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2022-05-03 16:30:28 +05:30
|
|
|
module materialpoint
|
2021-07-08 17:57:04 +05:30
|
|
|
use parallelization
|
2022-04-23 18:11:10 +05:30
|
|
|
use signals
|
2022-04-24 08:13:44 +05:30
|
|
|
use CLI
|
2021-07-27 10:57:18 +05:30
|
|
|
use prec
|
|
|
|
use IO
|
2020-04-28 13:59:13 +05:30
|
|
|
use YAML_types
|
2020-05-22 00:11:40 +05:30
|
|
|
use YAML_parse
|
2021-07-08 17:57:04 +05:30
|
|
|
use HDF5
|
2019-06-06 17:29:16 +05:30
|
|
|
use HDF5_utilities
|
2021-07-08 17:57:04 +05:30
|
|
|
use results
|
2021-07-27 10:57:18 +05:30
|
|
|
use config
|
|
|
|
use math
|
|
|
|
use rotations
|
2022-01-31 19:35:15 +05:30
|
|
|
use polynomials
|
2021-07-27 10:57:18 +05:30
|
|
|
use lattice
|
|
|
|
use material
|
2021-01-27 01:22:48 +05:30
|
|
|
use phase
|
2021-07-27 10:57:18 +05:30
|
|
|
use homogenization
|
|
|
|
use discretization
|
2021-07-04 20:31:24 +05:30
|
|
|
#if defined(MESH)
|
2020-03-20 19:25:10 +05:30
|
|
|
use FEM_quadrature
|
2020-03-20 19:38:07 +05:30
|
|
|
use discretization_mesh
|
2021-07-04 20:31:24 +05:30
|
|
|
#elif defined(GRID)
|
2021-07-27 10:57:18 +05:30
|
|
|
use base64
|
2020-03-20 11:28:55 +05:30
|
|
|
use discretization_grid
|
2019-06-11 19:46:10 +05:30
|
|
|
#endif
|
2019-06-06 17:29:16 +05:30
|
|
|
|
2022-06-22 02:16:54 +05:30
|
|
|
implicit none(type,external)
|
2020-01-27 01:45:21 +05:30
|
|
|
public
|
2019-05-15 02:42:32 +05:30
|
|
|
|
2016-01-17 20:33:54 +05:30
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2021-07-27 10:57:18 +05:30
|
|
|
!> @brief Initialize all modules.
|
2016-01-17 20:33:54 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2022-04-24 21:05:59 +05:30
|
|
|
subroutine materialpoint_initAll
|
2016-01-17 20:33:54 +05:30
|
|
|
|
2020-09-13 13:49:38 +05:30
|
|
|
call parallelization_init
|
2022-04-23 18:22:10 +05:30
|
|
|
call CLI_init ! Spectral and FEM interface to commandline
|
2022-04-23 18:11:10 +05:30
|
|
|
call signals_init
|
2020-09-13 13:49:38 +05:30
|
|
|
call prec_init
|
2019-06-11 19:46:10 +05:30
|
|
|
call IO_init
|
2021-07-27 10:57:18 +05:30
|
|
|
#if defined(MESH)
|
2020-03-20 19:25:10 +05:30
|
|
|
call FEM_quadrature_init
|
2021-07-27 10:57:18 +05:30
|
|
|
#elif defined(GRID)
|
|
|
|
call base64_init
|
2016-01-17 20:33:54 +05:30
|
|
|
#endif
|
2020-09-29 23:37:33 +05:30
|
|
|
call YAML_types_init
|
|
|
|
call YAML_parse_init
|
2021-07-27 10:57:18 +05:30
|
|
|
call HDF5_utilities_init
|
2022-04-23 18:22:10 +05:30
|
|
|
call results_init(restart=CLI_restartInc>0)
|
2019-06-11 19:46:10 +05:30
|
|
|
call config_init
|
|
|
|
call math_init
|
2019-09-22 19:23:03 +05:30
|
|
|
call rotations_init
|
2022-01-31 19:35:15 +05:30
|
|
|
call polynomials_init
|
2019-06-11 19:46:10 +05:30
|
|
|
call lattice_init
|
2021-07-04 20:31:24 +05:30
|
|
|
#if defined(MESH)
|
2022-04-23 18:22:10 +05:30
|
|
|
call discretization_mesh_init(restart=CLI_restartInc>0)
|
2021-07-04 20:31:24 +05:30
|
|
|
#elif defined(GRID)
|
2022-04-23 18:22:10 +05:30
|
|
|
call discretization_grid_init(restart=CLI_restartInc>0)
|
2020-03-20 11:28:55 +05:30
|
|
|
#endif
|
2022-04-23 18:22:10 +05:30
|
|
|
call material_init(restart=CLI_restartInc>0)
|
2021-02-09 03:51:53 +05:30
|
|
|
call phase_init
|
2019-06-11 19:46:10 +05:30
|
|
|
call homogenization_init
|
2022-04-24 21:05:59 +05:30
|
|
|
call materialpoint_init
|
2020-08-15 19:32:10 +05:30
|
|
|
call config_deallocate
|
2016-01-17 20:33:54 +05:30
|
|
|
|
2022-04-24 21:05:59 +05:30
|
|
|
end subroutine materialpoint_initAll
|
2016-01-17 20:33:54 +05:30
|
|
|
|
2019-12-07 19:50:04 +05:30
|
|
|
|
2016-01-17 20:33:54 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-25 22:23:15 +05:30
|
|
|
!> @brief Read restart information if needed.
|
2016-01-17 20:33:54 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2022-04-24 21:05:59 +05:30
|
|
|
subroutine materialpoint_init
|
2019-06-11 19:46:10 +05:30
|
|
|
|
2020-12-30 02:01:22 +05:30
|
|
|
integer(HID_T) :: fileHandle
|
2020-12-30 04:44:48 +05:30
|
|
|
|
|
|
|
|
2022-04-24 21:05:59 +05:30
|
|
|
print'(/,1x,a)', '<<<+- materialpoint init -+>>>'; flush(IO_STDOUT)
|
2019-06-11 19:46:10 +05:30
|
|
|
|
2020-12-30 02:01:22 +05:30
|
|
|
|
2022-04-23 18:22:10 +05:30
|
|
|
if (CLI_restartInc > 0) then
|
2020-12-30 02:01:22 +05:30
|
|
|
print'(/,a,i0,a)', ' reading restart information of increment from file'; flush(IO_STDOUT)
|
2021-02-22 18:07:21 +05:30
|
|
|
|
|
|
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
2020-12-30 02:01:22 +05:30
|
|
|
|
2020-12-30 04:44:48 +05:30
|
|
|
call homogenization_restartRead(fileHandle)
|
2021-02-09 03:51:53 +05:30
|
|
|
call phase_restartRead(fileHandle)
|
2020-12-30 02:01:22 +05:30
|
|
|
|
|
|
|
call HDF5_closeFile(fileHandle)
|
|
|
|
endif
|
2020-02-25 22:23:15 +05:30
|
|
|
|
2022-04-24 21:05:59 +05:30
|
|
|
end subroutine materialpoint_init
|
2016-01-17 20:33:54 +05:30
|
|
|
|
2018-12-05 04:25:39 +05:30
|
|
|
|
2020-02-25 22:23:15 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @brief Write restart information.
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2022-04-24 21:05:59 +05:30
|
|
|
subroutine materialpoint_restartWrite
|
2020-12-30 04:44:48 +05:30
|
|
|
|
2020-12-30 02:01:22 +05:30
|
|
|
integer(HID_T) :: fileHandle
|
2020-12-30 04:44:48 +05:30
|
|
|
|
2020-12-30 02:01:22 +05:30
|
|
|
|
|
|
|
print*, ' writing field and constitutive data required for restart to file';flush(IO_STDOUT)
|
|
|
|
|
2021-02-22 18:07:21 +05:30
|
|
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','a')
|
2020-12-30 02:01:22 +05:30
|
|
|
|
2020-12-30 04:44:48 +05:30
|
|
|
call homogenization_restartWrite(fileHandle)
|
2021-02-09 03:51:53 +05:30
|
|
|
call phase_restartWrite(fileHandle)
|
2020-02-25 22:23:15 +05:30
|
|
|
|
2020-12-30 02:01:22 +05:30
|
|
|
call HDF5_closeFile(fileHandle)
|
2020-02-25 22:23:15 +05:30
|
|
|
|
2022-04-24 21:05:59 +05:30
|
|
|
end subroutine materialpoint_restartWrite
|
2020-02-25 22:23:15 +05:30
|
|
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @brief Forward data for new time increment.
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2022-04-24 21:05:59 +05:30
|
|
|
subroutine materialpoint_forward
|
2020-02-25 22:23:15 +05:30
|
|
|
|
2020-12-23 11:28:54 +05:30
|
|
|
call homogenization_forward
|
2021-02-09 03:51:53 +05:30
|
|
|
call phase_forward
|
2020-02-25 22:23:15 +05:30
|
|
|
|
2022-04-24 21:05:59 +05:30
|
|
|
end subroutine materialpoint_forward
|
2016-01-17 20:33:54 +05:30
|
|
|
|
2019-05-05 15:36:55 +05:30
|
|
|
|
2018-12-05 04:25:39 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-10-24 09:46:42 +05:30
|
|
|
!> @brief Trigger writing of results.
|
2018-12-05 04:25:39 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2022-04-24 21:05:59 +05:30
|
|
|
subroutine materialpoint_results(inc,time)
|
2020-02-25 14:10:38 +05:30
|
|
|
|
2019-06-15 19:18:47 +05:30
|
|
|
integer, intent(in) :: inc
|
|
|
|
real(pReal), intent(in) :: time
|
2020-02-25 14:10:38 +05:30
|
|
|
|
2019-06-11 19:46:10 +05:30
|
|
|
call results_openJobFile
|
|
|
|
call results_addIncrement(inc,time)
|
2021-02-09 03:51:53 +05:30
|
|
|
call phase_results
|
2019-06-11 19:46:10 +05:30
|
|
|
call homogenization_results
|
|
|
|
call discretization_results
|
2020-01-10 06:15:00 +05:30
|
|
|
call results_finalizeIncrement
|
2019-06-11 19:46:10 +05:30
|
|
|
call results_closeJobFile
|
2018-12-05 04:25:39 +05:30
|
|
|
|
2022-04-24 21:05:59 +05:30
|
|
|
end subroutine materialpoint_results
|
2018-12-05 04:25:39 +05:30
|
|
|
|
2022-05-03 16:30:28 +05:30
|
|
|
end module materialpoint
|