From b3627554579921a4ff11b5e8763f83ec8d0163bd Mon Sep 17 00:00:00 2001 From: Alankar Alankar Date: Thu, 3 Feb 2011 17:25:58 +0000 Subject: [PATCH] grain orientation shuffling was skipped for /elemhomo/. no clue why, now dropped... --- code/material.f90 | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/code/material.f90 b/code/material.f90 index d841001f0..a8f17b8d4 100644 --- a/code/material.f90 +++ b/code/material.f90 @@ -687,18 +687,16 @@ subroutine material_populateGrains() enddo ! constituent ! ---------------------------------------------------------------------------- - if (.not. microstructure_elemhomo(micro)) then ! unless element homogeneous, reshuffle grains - do i=1,myNgrains-1 ! walk thru grains - call random_number(rnd) - t = nint(rnd*(myNgrains-i)+i+0.5_pReal,pInt) ! select a grain in remaining list - m = phaseOfGrain(t) ! exchange current with random - phaseOfGrain(t) = phaseOfGrain(i) - phaseOfGrain(i) = m - orientation = orientationOfGrain(:,t) - orientationOfGrain(:,t) = orientationOfGrain(:,i) - orientationOfGrain(:,i) = orientation - enddo - endif + do i=1,myNgrains-1 ! walk thru grains + call random_number(rnd) + t = nint(rnd*(myNgrains-i)+i+0.5_pReal,pInt) ! select a grain in remaining list + m = phaseOfGrain(t) ! exchange current with random + phaseOfGrain(t) = phaseOfGrain(i) + phaseOfGrain(i) = m + orientation = orientationOfGrain(:,t) + orientationOfGrain(:,t) = orientationOfGrain(:,i) + orientationOfGrain(:,i) = orientation + enddo !calc fraction after weighing with volumePerGrain !exchange in MC steps to improve result...