From 3fcc00910cba5b4f3bac0fbdcd4aed387bf190a5 Mon Sep 17 00:00:00 2001 From: Christoph Kords Date: Thu, 8 Aug 2013 12:53:03 +0000 Subject: [PATCH] fixed bug that occured under marc (and abaqus?) with openmp: "lastLovl" (for marc) and "lastStep" (for abaqus) have to be global module variables in FEsolving.f90 instead of local variables in the respective DAMASK_* files; otherwise they are initialized with zero each time hypela2/umat is called. --- code/DAMASK_abaqus_std.f | 5 +++-- code/DAMASK_marc.f90 | 5 +++-- code/FEsolving.f90 | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/DAMASK_abaqus_std.f b/code/DAMASK_abaqus_std.f index 2ffe10bf9..63b94971b 100644 --- a/code/DAMASK_abaqus_std.f +++ b/code/DAMASK_abaqus_std.f @@ -134,7 +134,8 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& outdatedByNewInc, & outdatedFFN1, & terminallyIll, & - symmetricSolver + symmetricSolver, & + lastStep use math, only: & invnrmMandel use debug, only: & @@ -216,7 +217,7 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& real(pReal) :: temperature ! temp by Abaqus is intent(in) real(pReal), dimension(6) :: stress_h real(pReal), dimension(6,6) :: ddsdde_h - integer(pInt) :: computationMode, i, cp_en, lastStep + integer(pInt) :: computationMode, i, cp_en logical :: cutBack temperature = temp ! temp is intent(in) diff --git a/code/DAMASK_marc.f90 b/code/DAMASK_marc.f90 index e94d5e5c7..103ea2eb2 100644 --- a/code/DAMASK_marc.f90 +++ b/code/DAMASK_marc.f90 @@ -185,7 +185,8 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, & outdatedByNewInc, & outdatedFFN1, & terminallyIll, & - symmetricSolver + symmetricSolver, & + lastLovl use math, only: & math_transpose33,& invnrmMandel @@ -273,7 +274,7 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, & logical :: cutBack real(pReal), dimension(6) :: stress real(pReal), dimension(6,6) :: ddsdde - integer(pInt) :: computationMode, i, cp_en, node, CPnodeID, lastLovl + integer(pInt) :: computationMode, i, cp_en, node, CPnodeID !$ integer(pInt) :: defaultNumThreadsInt !< default value set by Marc if (iand(debug_level(debug_MARC),debug_LEVELBASIC) /= 0_pInt) then diff --git a/code/FEsolving.f90 b/code/FEsolving.f90 index 4e6d5bc11..87ae31df9 100644 --- a/code/FEsolving.f90 +++ b/code/FEsolving.f90 @@ -34,7 +34,9 @@ module FEsolving integer(pInt), public :: & !< needs description cycleCounter = 0_pInt, & !< needs description theInc = -1_pInt, & !< needs description - restartInc = 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