From 51552b027d5e5785aa2fa82cea03e4f200652110 Mon Sep 17 00:00:00 2001 From: Christoph Kords Date: Tue, 23 Apr 2013 14:42:22 +0000 Subject: [PATCH] fixed bug: initialize computation mode to zero, used to be unset for lovl=4 and not(timinc < theDelta .and. theInc == inc), which unpredictably caused trouble with marc --- code/DAMASK_marc.f90 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/DAMASK_marc.f90 b/code/DAMASK_marc.f90 index 61e3ea10d..92f7494a7 100644 --- a/code/DAMASK_marc.f90 +++ b/code/DAMASK_marc.f90 @@ -278,7 +278,6 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, & integer(pInt) :: computationMode, i, cp_en, node, CPnodeID !$ integer(pInt) :: defaultNumThreadsInt !< default value set by Marc - !$ defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc if (iand(debug_level(debug_MARC),debug_LEVELBASIC) /= 0_pInt) then write(6,'(a,/,i8,i8,i2)') ' MSC.MARC information on shape of element(2), IP:', m, nn write(6,'(a,2(1i))'), ' Jacobian: ', ngens,ngens @@ -293,10 +292,14 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, & write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') ' Deformation gradient at t=n+1:', & math_transpose33(ffn1) endif + + !$ defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc + if (.not. CPFEM_init_done) call CPFEM_initAll(t(1),m(1),nn) !$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS + computationMode = 0_pInt ! save initialization value, since does not result in any calculation if (lovl == 4 ) then if(timinc < theDelta .and. theInc == inc ) computationMode = CPFEM_RESTOREJACOBIAN ! first after cutback else ! stress requested (lovl == 6)