need to write out initial results for new CPFEM2

This commit is contained in:
Martin Diehl 2016-01-20 16:19:05 +00:00
parent 143266dbd4
commit eda03ed3e0
2 changed files with 22 additions and 32 deletions

View File

@ -421,11 +421,8 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
#if defined(Marc4DAMASK) || defined(Abaqus)
!*** backup jacobian
if (iand(mode, CPFEM_BACKUPJACOBIAN) /= 0_pInt) &
CPFEM_dcsde_knownGood = CPFEM_dcsde
!*** restore jacobian
if (iand(mode, CPFEM_RESTOREJACOBIAN) /= 0_pInt) &
CPFEM_dcsde = CPFEM_dcsde_knownGood
#endif
@ -553,8 +550,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
if (rnd < 0.5_pReal) rnd = rnd - 1.0_pReal
CPFEM_cs(1:6,ip,elCP) = rnd * CPFEM_odd_stress
CPFEM_dcsde(1:6,1:6,ip,elCP) = CPFEM_odd_jacobian * math_identity2nd(6)
#endif
#if defined(Marc4DAMASK) || defined(Abaqus)
temperature(material_homog(ip,elCP))%p(thermalMapping(material_homog(ip,elCP))%p(ip,elCP)) = &
temperature_inp
#endif

View File

@ -6,16 +6,10 @@
!> @brief needs a good name and description
!--------------------------------------------------------------------------------------------------
module CPFEM2
use prec, only: &
pReal, &
pInt
implicit none
private
logical, public, protected :: &
CPFEM_init_done = .false. !< remember whether init has been done already
public :: &
CPFEM_general, &
CPFEM_initAll
@ -27,6 +21,8 @@ contains
!> @brief call (thread safe) all module initializations
!--------------------------------------------------------------------------------------------------
subroutine CPFEM_initAll(el,ip)
use prec, only: &
pInt
use prec, only: &
prec_init
use numerics, only: &
@ -48,7 +44,8 @@ subroutine CPFEM_initAll(el,ip)
use crystallite, only: &
crystallite_init
use homogenization, only: &
homogenization_init
homogenization_init, &
materialpoint_postResults
use IO, only: &
IO_init
use DAMASK_interface
@ -61,28 +58,23 @@ subroutine CPFEM_initAll(el,ip)
integer(pInt), intent(in) :: el, & !< FE el number
ip !< FE integration point number
!$OMP CRITICAL (init)
if (.not. CPFEM_init_done) then
call DAMASK_interface_init ! Spectral and FEM interface to commandline
call prec_init
call IO_init
call DAMASK_interface_init ! Spectral and FEM interface to commandline
call prec_init
call IO_init
#ifdef FEM
call FEZoo_init
call FEZoo_init
#endif
call numerics_init
call debug_init
call math_init
call FE_init
call mesh_init(ip, el) ! pass on coordinates to alter calcMode of first ip
call lattice_init
call material_init
call constitutive_init
call crystallite_init
call homogenization_init
call CPFEM_init
CPFEM_init_done = .true.
endif
!$OMP END CRITICAL (init)
call numerics_init
call debug_init
call math_init
call FE_init
call mesh_init(ip, el) ! pass on coordinates to alter calcMode of first ip
call lattice_init
call material_init
call constitutive_init
call crystallite_init
call homogenization_init
call materialpoint_postResults
end subroutine CPFEM_initAll
@ -209,6 +201,9 @@ end subroutine CPFEM_init
!> @brief perform initialization at first call, update variables and call the actual material model
!--------------------------------------------------------------------------------------------------
subroutine CPFEM_general(age, dt)
use prec, only: &
pReal, &
pInt
use numerics, only: &
worldrank
use debug, only: &