From 044b816005c3a8fd1b5cb293f09c2981c0f59b0e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 16 Mar 2020 09:42:58 +0100 Subject: [PATCH] better to read w/o cycle --- src/constitutive_plastic_nonlocal.f90 | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/constitutive_plastic_nonlocal.f90 b/src/constitutive_plastic_nonlocal.f90 index 4991b8833..14ddf290d 100644 --- a/src/constitutive_plastic_nonlocal.f90 +++ b/src/constitutive_plastic_nonlocal.f90 @@ -1710,10 +1710,7 @@ module subroutine plastic_nonlocal_updateCompatibility(orientation,i,e) !* FREE SURFACE !* Set surface transmissivity to the value specified in the material.config forall(s1 = 1:ns) my_compatibility(:,s1,s1,n) = sqrt(prm%surfaceTransmissivity) - cycle neighbors - endif - - if (neighbor_phase /= ph) then + elseif (neighbor_phase /= ph) then !* PHASE BOUNDARY !* If we encounter a different nonlocal phase at the neighbor, !* we consider this to be a real "physical" phase boundary, so completely incompatible. @@ -1721,18 +1718,12 @@ module subroutine plastic_nonlocal_updateCompatibility(orientation,i,e) !* we do not consider this to be a phase boundary, so completely compatible. if (.not. phase_localPlasticity(neighbor_phase) .and. .not. phase_localPlasticity(ph)) & forall(s1 = 1:ns) my_compatibility(:,s1,s1,n) = 0.0_pReal - cycle neighbors - endif - - if (prm%grainboundaryTransmissivity >= 0.0_pReal) then + elseif (prm%grainboundaryTransmissivity >= 0.0_pReal) then !* GRAIN BOUNDARY ! !* fixed transmissivity for adjacent ips with different texture (only if explicitly given in material.config) - if (material_texture(1,i,e) /= material_texture(1,neighbor_i,neighbor_e)) then - if (.not. phase_localPlasticity(neighbor_phase)) then - forall(s1 = 1:ns) my_compatibility(:,s1,s1,n) = sqrt(prm%grainboundaryTransmissivity) - endif - cycle neighbors - endif + if (material_texture(1,i,e) /= material_texture(1,neighbor_i,neighbor_e) .and. & + (.not. phase_localPlasticity(neighbor_phase))) & + forall(s1 = 1:ns) my_compatibility(:,s1,s1,n) = sqrt(prm%grainboundaryTransmissivity) else !* GRAIN BOUNDARY ? !* Compatibility defined by relative orientation of slip systems: @@ -1768,8 +1759,10 @@ module subroutine plastic_nonlocal_updateCompatibility(orientation,i,e) my_compatibility(:,:,s1,n)) my_compatibilitySum = my_compatibilitySum + nThresholdValues * thresholdValue enddo + where(belowThreshold) my_compatibility(1,:,s1,n) = 0.0_pReal where(belowThreshold) my_compatibility(2,:,s1,n) = 0.0_pReal + enddo mySlipSystems endif