[cig-commits] r4374 - in long/3D/Gale/trunk/src/Underworld: . Rheology/src

walter at geodynamics.org walter at geodynamics.org
Thu Aug 17 17:18:57 PDT 2006


Author: walter
Date: 2006-08-17 17:18:56 -0700 (Thu, 17 Aug 2006)
New Revision: 4374

Modified:
   long/3D/Gale/trunk/src/Underworld/
   long/3D/Gale/trunk/src/Underworld/Rheology/src/Director.c
Log:
 r503 at earth:  boo | 2006-08-17 17:15:32 -0700
  r477 at earth (orig r308):  VincentLemiale | 2006-08-15 18:51:05 -0700
  In the case where the initial direction is random, the memory was not allocated properly. 
  This commit should fix it. (+ the 'if' condition was done too many times)
  
  
 



Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
   - 9570c393-cf10-0410-b476-9a651db1e55a:/cig:502
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:307
   + 9570c393-cf10-0410-b476-9a651db1e55a:/cig:503
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:308

Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/Director.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/Director.c	2006-08-18 00:18:48 UTC (rev 4373)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/Director.c	2006-08-18 00:18:56 UTC (rev 4374)
@@ -254,13 +254,13 @@
 			for ( lParticle_I = 0 ; lParticle_I < particleLocalCount ; lParticle_I++ ) {
 				/* Initialise the norm of each director */
 				normal = Variable_GetPtrDouble( self->variable, lParticle_I );
-				if ( False == self->randomInitialDirection ) {
-					memcpy( normal, self->initialDirection, sizeof(XYZ) );
-				}
+
+				memcpy( normal, self->initialDirection, sizeof(XYZ) );
 			}	
 		}
 		else {
 			for ( lParticle_I = 0 ; lParticle_I < particleLocalCount ; lParticle_I++ ) {
+				normal = Variable_GetPtrDouble( self->variable, lParticle_I );
 				for ( dim_I = 0; dim_I < self->materialPointsSwarm->dim; dim_I++ ) {
 					normal[dim_I] = ( (float) rand() - RAND_MAX/2 ) / RAND_MAX;
 				}	
@@ -271,7 +271,6 @@
 		 * all the memory is initialised to zero when the particles are allocated */
 	}
 
-
 }
 
 Bool _Director_TimeDerivative( void* director, Index lParticle_I, double* timeDeriv ) {



More information about the cig-commits mailing list