From 921967c2bae13d96dd88189d26831596aad4ab1d Mon Sep 17 00:00:00 2001 From: Christoph Kords Date: Wed, 9 Feb 2011 08:28:47 +0000 Subject: [PATCH] * found memory leak in nonlocal model! "constitutive_nonlocal_rhoDotFlux" has to have upper index bound of 10 for second dimension, not 8. * need to recalculate dislocation velocity in postResults, otherwise we take values of last perturbed state! So the following outputs were up to now showing the perturbed state: shearrate, dislocation velocity, all density rates! --- code/constitutive_nonlocal.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/constitutive_nonlocal.f90 b/code/constitutive_nonlocal.f90 index 5be294229..4578c1a3c 100644 --- a/code/constitutive_nonlocal.f90 +++ b/code/constitutive_nonlocal.f90 @@ -439,7 +439,7 @@ constitutive_nonlocal_interactionMatrixSlipSlip = 0.0_pReal allocate(constitutive_nonlocal_v(maxTotalNslip, 4, homogenization_maxNgrains, mesh_maxNips, mesh_NcpElems)) constitutive_nonlocal_v = 0.0_pReal -allocate(constitutive_nonlocal_rhoDotFlux(maxTotalNslip, 8, homogenization_maxNgrains, mesh_maxNips, mesh_NcpElems)) +allocate(constitutive_nonlocal_rhoDotFlux(maxTotalNslip, 10, homogenization_maxNgrains, mesh_maxNips, mesh_NcpElems)) constitutive_nonlocal_rhoDotFlux = 0.0_pReal allocate(constitutive_nonlocal_compatibility(2,maxTotalNslip, maxTotalNslip, FE_maxNipNeighbors, mesh_maxNips, mesh_NcpElems)) @@ -2082,6 +2082,8 @@ forall (c = 1:2) rhoDotDip(:,c) = dotState(g,ip,el)%p((7+c)*ns+1:(8+c)*ns) !* Calculate shear rate +call constitutive_nonlocal_kinetics(Tstar_v, Temperature, state(g,ip,el), g, ip, el) ! need to calculate dislocation velocity again, because it was overwritten during stiffness calculation + do t = 1,4 do s = 1,ns if (rhoSgl(s,t+4) * constitutive_nonlocal_v(s,t,g,ip,el) < 0.0_pReal) then