[cig-commits] r4903 - in long/3D/Gale/trunk/src/StgFEM: . SLE/ProvidedSystems/StokesFlow/src

walter at geodynamics.org walter at geodynamics.org
Wed Oct 11 13:50:28 PDT 2006


Author: walter
Date: 2006-10-11 13:50:27 -0700 (Wed, 11 Oct 2006)
New Revision: 4903

Modified:
   long/3D/Gale/trunk/src/StgFEM/
   long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c
Log:
 r789 at earth:  boo | 2006-10-11 13:49:37 -0700
  r763 at earth (orig r642):  LukeHodkinson | 2006-09-24 23:34:05 -0700
  The Stokes SLE code for updating the time step
  dt value was not performing an MPI reduce over
  all processors, meaning the dt value would could
  potentially be different on each processor.
  While this wouldn't affect simulations
  without mesh deformation, it was causing GALE
  to do some weird things.
  
 



Property changes on: long/3D/Gale/trunk/src/StgFEM
___________________________________________________________________
Name: svk:merge
   - 38867592-cf10-0410-9e16-a142ea72ac34:/cig:788
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:641
   + 38867592-cf10-0410-9e16-a142ea72ac34:/cig:789
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:642

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c	2006-10-11 20:50:25 UTC (rev 4902)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c	2006-10-11 20:50:27 UTC (rev 4903)
@@ -55,6 +55,8 @@
 	double                  minSeparation = 0;
 	double                  minSeparationEachDim[3] = { 0, 0, 0 };
 	FeVariable*             velFeVar      = NULL;
+	double			localDt;
+	double			globalDt;
 	
 	velFeVar = self->uSolnVec->feVariable;
 	velMax = FieldVariable_GetMaxGlobalFieldMagnitude( velFeVar );
@@ -64,6 +66,8 @@
 
 	FeVariable_GetMinimumSeparation( velFeVar, &minSeparation, minSeparationEachDim );
 
-	return 0.5 * minSeparation / velMax;
+	localDt = 0.5 * minSeparation / velMax;
+	MPI_Allreduce( &localDt, &globalDt, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD );
+
+	return globalDt;
 }
-



More information about the cig-commits mailing list