moved some variables from FEsolving to more appropriate CPFEM module

This commit is contained in:
Martin Diehl 2016-01-17 13:29:42 +00:00
parent ff840ae8ad
commit 3d2187cc07
6 changed files with 54 additions and 74 deletions

View File

@ -14,18 +14,31 @@ module CPFEM
private private
#if defined(Marc4DAMASK) || defined(Abaqus) #if defined(Marc4DAMASK) || defined(Abaqus)
real(pReal), parameter, private :: & real(pReal), parameter, private :: &
CPFEM_odd_stress = 1e15_pReal, & !< return value for stress in case of ping pong dummy cycle CPFEM_odd_stress = 1e15_pReal, & !< return value for stress in case of ping pong dummy cycle
CPFEM_odd_jacobian = 1e50_pReal !< return value for jacobian in case of ping pong dummy cycle CPFEM_odd_jacobian = 1e50_pReal !< return value for jacobian in case of ping pong dummy cycle
real(pReal), dimension (:,:,:), allocatable, private :: & real(pReal), dimension (:,:,:), allocatable, private :: &
CPFEM_cs !< Cauchy stress CPFEM_cs !< Cauchy stress
real(pReal), dimension (:,:,:,:), allocatable, private :: & real(pReal), dimension (:,:,:,:), allocatable, private :: &
CPFEM_dcsdE !< Cauchy stress tangent CPFEM_dcsdE !< Cauchy stress tangent
real(pReal), dimension (:,:,:,:), allocatable, private :: & real(pReal), dimension (:,:,:,:), allocatable, private :: &
CPFEM_dcsdE_knownGood !< known good tangent CPFEM_dcsdE_knownGood !< known good tangent
#endif #endif
integer(pInt), public :: &
cycleCounter = 0_pInt, & !< needs description
theInc = -1_pInt, & !< needs description
lastLovl = 0_pInt, & !< lovl in previous call to marc hypela2
lastStep = 0_pInt !< kstep in previous call to abaqus umat
real(pReal), public :: &
theTime = 0.0_pReal, & !< needs description
theDelta = 0.0_pReal
logical, public :: &
outdatedFFN1 = .false., & !< needs description
lastIncConverged = .false., & !< needs description
outdatedByNewInc = .false. !< needs description
logical, public, protected :: & logical, public, protected :: &
CPFEM_init_done = .false., & !< remember whether init has been done already CPFEM_init_done = .false., & !< remember whether init has been done already
CPFEM_calc_done = .false. !< remember whether first ip has already calced the results CPFEM_calc_done = .false. !< remember whether first ip has already calced the results
integer(pInt), parameter, public :: & integer(pInt), parameter, public :: &
CPFEM_COLLECT = 2_pInt**0_pInt, & CPFEM_COLLECT = 2_pInt**0_pInt, &
@ -288,12 +301,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
debug_e, & debug_e, &
debug_i debug_i
use FEsolving, only: & use FEsolving, only: &
outdatedFFN1, &
terminallyIll, & terminallyIll, &
cycleCounter, &
theInc, &
theTime, &
theDelta, &
FEsolving_execElem, & FEsolving_execElem, &
FEsolving_execIP, & FEsolving_execIP, &
restartWrite restartWrite

View File

@ -88,11 +88,6 @@ subroutine vumat(nBlock, nDir, nshr, nStateV, nFieldV, nProps, lAnneal, &
!$ use numerics, only: & !$ use numerics, only: &
!$ DAMASK_NumThreadsInt !$ DAMASK_NumThreadsInt
use FEsolving, only: & use FEsolving, only: &
cycleCounter, &
theTime, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
symmetricSolver symmetricSolver
use math, only: & use math, only: &
invnrmMandel invnrmMandel
@ -111,7 +106,12 @@ subroutine vumat(nBlock, nDir, nshr, nStateV, nFieldV, nProps, lAnneal, &
CPFEM_init_done, & CPFEM_init_done, &
CPFEM_initAll, & CPFEM_initAll, &
CPFEM_CALCRESULTS, & CPFEM_CALCRESULTS, &
CPFEM_AGERESULTS CPFEM_AGERESULTS, &
cycleCounter, &
theTime, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll
use homogenization, only: & use homogenization, only: &
materialpoint_sizeResults, & materialpoint_sizeResults, &
materialpoint_results materialpoint_results

View File

@ -87,17 +87,7 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
!$ DAMASK_NumThreadsInt, & !$ DAMASK_NumThreadsInt, &
usePingPong usePingPong
use FEsolving, only: & use FEsolving, only: &
cycleCounter, & symmetricSolver
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
symmetricSolver, &
lastStep
use math, only: & use math, only: &
invnrmMandel invnrmMandel
use debug, only: & use debug, only: &
@ -118,7 +108,17 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
CPFEM_AGERESULTS, & CPFEM_AGERESULTS, &
CPFEM_COLLECT, & CPFEM_COLLECT, &
CPFEM_RESTOREJACOBIAN, & CPFEM_RESTOREJACOBIAN, &
CPFEM_BACKUPJACOBIAN CPFEM_BACKUPJACOBIAN, &
cycleCounter, &
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
lastStep
use homogenization, only: & use homogenization, only: &
materialpoint_sizeResults, & materialpoint_sizeResults, &
materialpoint_results materialpoint_results

View File

@ -135,17 +135,7 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
numerics_unitlength, & numerics_unitlength, &
usePingPong usePingPong
use FEsolving, only: & use FEsolving, only: &
cycleCounter, & symmetricSolver
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
symmetricSolver, &
lastLovl
use math, only: & use math, only: &
math_transpose33,& math_transpose33,&
invnrmMandel invnrmMandel
@ -173,7 +163,17 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
CPFEM_AGERESULTS, & CPFEM_AGERESULTS, &
CPFEM_COLLECT, & CPFEM_COLLECT, &
CPFEM_RESTOREJACOBIAN, & CPFEM_RESTOREJACOBIAN, &
CPFEM_BACKUPJACOBIAN CPFEM_BACKUPJACOBIAN, &
cycleCounter, &
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
lastLovl
implicit none implicit none
!$ include "omp_lib.h" ! the openMP function library !$ include "omp_lib.h" ! the openMP function library

View File

@ -13,25 +13,14 @@ module FEsolving
implicit none implicit none
private private
integer(pInt), public :: & !< needs description integer(pInt), public :: &
cycleCounter = 0_pInt, & !< needs description restartInc = 1_pInt !< needs description
theInc = -1_pInt, & !< needs description
restartInc = 1_pInt, & !< needs description
lastLovl = 0_pInt, & !< lovl in previous call to marc hypela2
lastStep = 0_pInt !< kstep in previous call to abaqus umat
real(pReal), public :: &
theTime = 0.0_pReal, & !< needs description
theDelta = 0.0_pReal !< needs description
logical, public :: & logical, public :: &
outdatedFFN1 = .false., & !< needs description symmetricSolver = .false., & !< use a symmetric FEM solver
symmetricSolver = .false., & !< use a symmetric solver (FEM)
restartWrite = .false., & !< write current state to enable restart restartWrite = .false., & !< write current state to enable restart
restartRead = .false., & !< restart information to continue calculation from saved state restartRead = .false., & !< restart information to continue calculation from saved state
terminallyIll = .false., & !< at least one material point is terminally ill terminallyIll = .false. !< at least one material point is terminally ill
lastIncConverged = .false., & !< needs description
outdatedByNewInc = .false. !< needs description
integer(pInt), dimension(:,:), allocatable, public :: & integer(pInt), dimension(:,:), allocatable, public :: &
FEsolving_execIP !< for ping-pong scheme always range to max IP, otherwise one specific IP FEsolving_execIP !< for ping-pong scheme always range to max IP, otherwise one specific IP

View File

@ -336,9 +336,6 @@ subroutine homogenization_RGC_partitionDeformation(F,avgF,ip,el)
homogenization_maxNgrains, & homogenization_maxNgrains, &
homogenization_Ngrains,& homogenization_Ngrains,&
homogenization_typeInstance homogenization_typeInstance
use FEsolving, only: &
theInc,&
cycleCounter
implicit none implicit none
real(pReal), dimension (3,3,homogenization_maxNgrains), intent(out) :: F !< partioned F per grain real(pReal), dimension (3,3,homogenization_maxNgrains), intent(out) :: F !< partioned F per grain
@ -352,20 +349,6 @@ subroutine homogenization_RGC_partitionDeformation(F,avgF,ip,el)
integer(pInt) :: homID, iGrain,iFace,i,j integer(pInt) :: homID, iGrain,iFace,i,j
integer(pInt), parameter :: nFace = 6_pInt integer(pInt), parameter :: nFace = 6_pInt
!--------------------------------------------------------------------------------------------------
! debugging the overall deformation gradient
if (iand(debug_level(debug_homogenization),debug_levelExtensive) /= 0_pInt) then
!$OMP CRITICAL (write2out)
write(6,'(1x,a,i3,a,i3,a)')'========== Increment: ',theInc,' Cycle: ',cycleCounter,' =========='
write(6,'(1x,a32)')'Overall deformation gradient: '
do i = 1_pInt,3_pInt
write(6,'(1x,3(e15.8,1x))')(avgF(i,j), j = 1_pInt,3_pInt)
enddo
write(6,*)' '
flush(6)
!$OMP END CRITICAL (write2out)
endif
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! compute the deformation gradient of individual grains due to relaxations ! compute the deformation gradient of individual grains due to relaxations
homID = homogenization_typeInstance(mesh_element(3,el)) homID = homogenization_typeInstance(mesh_element(3,el))