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

@ -23,6 +23,19 @@ module CPFEM
real(pReal), dimension (:,:,:,:), allocatable, private :: &
CPFEM_dcsdE_knownGood !< known good tangent
#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 :: &
CPFEM_init_done = .false., & !< remember whether init has been done already
CPFEM_calc_done = .false. !< remember whether first ip has already calced the results
@ -288,12 +301,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, dt, elFE, ip)
debug_e, &
debug_i
use FEsolving, only: &
outdatedFFN1, &
terminallyIll, &
cycleCounter, &
theInc, &
theTime, &
theDelta, &
FEsolving_execElem, &
FEsolving_execIP, &
restartWrite

View File

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

View File

@ -87,17 +87,7 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
!$ DAMASK_NumThreadsInt, &
usePingPong
use FEsolving, only: &
cycleCounter, &
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
symmetricSolver, &
lastStep
symmetricSolver
use math, only: &
invnrmMandel
use debug, only: &
@ -118,7 +108,17 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
CPFEM_AGERESULTS, &
CPFEM_COLLECT, &
CPFEM_RESTOREJACOBIAN, &
CPFEM_BACKUPJACOBIAN
CPFEM_BACKUPJACOBIAN, &
cycleCounter, &
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
lastStep
use homogenization, only: &
materialpoint_sizeResults, &
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, &
usePingPong
use FEsolving, only: &
cycleCounter, &
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
symmetricSolver, &
lastLovl
symmetricSolver
use math, only: &
math_transpose33,&
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_COLLECT, &
CPFEM_RESTOREJACOBIAN, &
CPFEM_BACKUPJACOBIAN
CPFEM_BACKUPJACOBIAN, &
cycleCounter, &
theInc, &
calcMode, &
theTime, &
theDelta, &
lastIncConverged, &
outdatedByNewInc, &
outdatedFFN1, &
terminallyIll, &
lastLovl
implicit none
!$ include "omp_lib.h" ! the openMP function library

View File

@ -13,25 +13,14 @@ module FEsolving
implicit none
private
integer(pInt), public :: & !< needs description
cycleCounter = 0_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
integer(pInt), public :: &
restartInc = 1_pInt !< needs description
logical, public :: &
outdatedFFN1 = .false., & !< needs description
symmetricSolver = .false., & !< use a symmetric solver (FEM)
symmetricSolver = .false., & !< use a symmetric FEM solver
restartWrite = .false., & !< write current state to enable restart
restartRead = .false., & !< restart information to continue calculation from saved state
terminallyIll = .false., & !< at least one material point is terminally ill
lastIncConverged = .false., & !< needs description
outdatedByNewInc = .false. !< needs description
terminallyIll = .false. !< at least one material point is terminally ill
integer(pInt), dimension(:,:), allocatable, public :: &
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_Ngrains,&
homogenization_typeInstance
use FEsolving, only: &
theInc,&
cycleCounter
implicit none
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), 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
homID = homogenization_typeInstance(mesh_element(3,el))