From 5f78f1753c7d0e7d138d895c704c3a32577c0df8 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 16 Jul 2021 18:03:38 +0200 Subject: [PATCH] split up thermal only for grid at the moment --- src/grid/spectral_utilities.f90 | 1 + src/homogenization.f90 | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index c143f480f..d164c33a2 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -816,6 +816,7 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,& homogenization_F = reshape(F,[3,3,product(grid(1:2))*grid3]) ! set materialpoint target F to estimated field call materialpoint_stressAndItsTangent(timeinc,[1,1],[1,product(grid(1:2))*grid3]) ! calculate P field + call materialpoint_stressAndItsTangent3(timeinc,[1,1],[1,product(grid(1:2))*grid3]) call materialpoint_stressAndItsTangent2(timeinc,[1,1],[1,product(grid(1:2))*grid3]) P = reshape(homogenization_P, [3,3,grid(1),grid(2),grid3]) diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 07218e50a..9e80c6dda 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -180,6 +180,7 @@ module homogenization homogenization_init, & materialpoint_stressAndItsTangent, & materialpoint_stressAndItsTangent2, & + materialpoint_stressAndItsTangent3, & homogenization_mu_T, & homogenization_K_T, & homogenization_f_T, & @@ -294,7 +295,7 @@ end subroutine materialpoint_stressAndItsTangent !-------------------------------------------------------------------------------------------------- !> @brief !-------------------------------------------------------------------------------------------------- -subroutine materialpoint_stressAndItsTangent2(dt,FEsolving_execIP,FEsolving_execElem) +subroutine materialpoint_stressAndItsTangent3(dt,FEsolving_execIP,FEsolving_execElem) real(pReal), intent(in) :: dt !< time increment integer, dimension(2), intent(in) :: FEsolving_execElem, FEsolving_execIP @@ -327,7 +328,30 @@ subroutine materialpoint_stressAndItsTangent2(dt,FEsolving_execIP,FEsolving_exec enddo enddo !$OMP END PARALLEL DO + else + print'(/,a,/)', ' << HOMOG >> Material Point terminally ill' + endif +end subroutine materialpoint_stressAndItsTangent3 +!-------------------------------------------------------------------------------------------------- +!> @brief +!-------------------------------------------------------------------------------------------------- +subroutine materialpoint_stressAndItsTangent2(dt,FEsolving_execIP,FEsolving_execElem) + + real(pReal), intent(in) :: dt !< time increment + integer, dimension(2), intent(in) :: FEsolving_execElem, FEsolving_execIP + integer :: & + NiterationMPstate, & + ip, & !< integration point number + el, & !< element number + co, ce, ho, en, ph + logical :: & + converged + logical, dimension(2) :: & + doneAndHappy + + + if (.not. terminallyIll) then !$OMP PARALLEL DO PRIVATE(ho,ce) elementLooping3: do el = FEsolving_execElem(1),FEsolving_execElem(2) IpLooping3: do ip = FEsolving_execIP(1),FEsolving_execIP(2)