[cig-commits] r5655 - in long/3D/Gale/trunk/src/StGermain: .
Discretisation/Swarm/tests/SingleAttractor
walter at geodynamics.org
walter at geodynamics.org
Fri Jan 5 11:35:04 PST 2007
Author: walter
Date: 2007-01-05 11:35:03 -0800 (Fri, 05 Jan 2007)
New Revision: 5655
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/tests/SingleAttractor/SingleAttractor.c
Log:
r3226 at earth (orig r3917): LukeHodkinson | 2007-01-01 17:05:02 -0800
Removing references to BlockGeometry.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3916
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3917
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/tests/SingleAttractor/SingleAttractor.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/tests/SingleAttractor/SingleAttractor.c 2007-01-05 19:35:00 UTC (rev 5654)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Swarm/tests/SingleAttractor/SingleAttractor.c 2007-01-05 19:35:03 UTC (rev 5655)
@@ -30,18 +30,20 @@
Index dim_I;
Swarm* swarm = (Swarm*) LiveComponentRegister_Get( context->CF->LCRegister, "swarm" );
Coord attractorPoint;
- BlockGeometry* blockGeometry;
+ Mesh* mesh;
Stream* stream = Journal_Register( Info_Type, "particleUpdate" );
unsigned int movementSpeedDivisor = 0;
int movementSign = 1;
unsigned int explosionPeriod = 20;
+ double minCrd[3], maxCrd[3];
Stream_SetPrintingRank( stream, Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "procToWatch", 0 ) );
movementSpeedDivisor = Dictionary_GetDouble_WithDefault( context->dictionary, "movementSpeedDivisor", 10 );
- blockGeometry = (BlockGeometry*) LiveComponentRegister_Get( context->CF->LCRegister, "geometry" );
+ mesh = (Mesh*)LiveComponentRegister_Get( context->CF->LCRegister, "mesh-linear" );
+ Mesh_GetGlobalCoordRange( mesh, minCrd, maxCrd );
for ( dim_I=0; dim_I < 3; dim_I++ ) {
- attractorPoint[dim_I] = ( blockGeometry->max[dim_I] - blockGeometry->min[dim_I] ) / 3;
+ attractorPoint[dim_I] = (maxCrd[dim_I] - minCrd[dim_I]) / 3;
}
Journal_Printf( stream, "Calculated attractor point is at (%f,%f,%f):\n", attractorPoint[0], attractorPoint[1], attractorPoint[2] );
More information about the cig-commits
mailing list