[cig-commits] commit: Fix compiler warnings

Mercurial hg at geodynamics.org
Sun Sep 18 12:47:34 PDT 2011


changeset:   425:45ad3f51169e
user:        Walter Landry <wlandry at caltech.edu>
date:        Sun Sep 18 12:45:49 2011 -0700
files:       MaterialPoints/src/GaussCoincidentMapper.cxx MaterialPoints/src/IntegrationPointMapper.cxx MaterialPoints/src/MappedParticleLayout.cxx MaterialPoints/src/ParticleFeVariable.cxx Utils/src/PCDVC.cxx Utils/tests/PCDVCSuite.cxx
description:
Fix compiler warnings


diff -r 26dd025f99b5 -r 45ad3f51169e MaterialPoints/src/GaussCoincidentMapper.cxx
--- a/MaterialPoints/src/GaussCoincidentMapper.cxx	Wed Sep 14 14:42:29 2011 -0700
+++ b/MaterialPoints/src/GaussCoincidentMapper.cxx	Sun Sep 18 12:45:49 2011 -0700
@@ -164,10 +164,10 @@ void _GaussCoincidentMapper_Map( void* m
 	IntegrationPointsSwarm*	integrationSwarm = self->integrationSwarm;
 	MaterialPointsSwarm*    materialSwarm = self->materialSwarm;
 	IntegrationPoint*			integrationPoint;
-	MaterialPoint*				materialPoint;
 	MaterialPointRef*			ref;
 	Particle_Index				particle_lI;
 #if 0
+	MaterialPoint*				materialPoint;
 	FeMesh*						mesh = materialSwarm->mesh;
 	Cell_Index					cell_dI;
 #endif
@@ -210,9 +210,10 @@ void _GaussCoincidentMapper_Map( void* m
 	/* Map each point */
 	for ( particle_lI = 0; particle_lI < integrationSwarm->particleLocalCount; particle_lI++ ) {
 		integrationPoint = (IntegrationPoint*)Swarm_ParticleAt( integrationSwarm, particle_lI );
+
+#if 0
 		materialPoint = (MaterialPoint*)Swarm_ParticleAt( materialSwarm, particle_lI );
 
-#if 0
 		cell_dI = integrationPoint->owningCell;
 
 		Journal_DPrintfL( debugStream, 3, "Referring to local material point %u, from material swarm cell %u:\n", particle_lI, cell_dI );
diff -r 26dd025f99b5 -r 45ad3f51169e MaterialPoints/src/IntegrationPointMapper.cxx
--- a/MaterialPoints/src/IntegrationPointMapper.cxx	Wed Sep 14 14:42:29 2011 -0700
+++ b/MaterialPoints/src/IntegrationPointMapper.cxx	Sun Sep 18 12:45:49 2011 -0700
@@ -67,7 +67,7 @@ IntegrationPointMapper* _IntegrationPoin
 	self->_getMaterialPointsSwarms = _getMaterialPointsSwarms;
 	self->_getMaterialIndexOn = _getMaterialIndexOn;
 	self->_getExtensionOn = _getExtensionOn;
-    self->_getDoubleFromExtension        = _getDoubleFromExtension;
+        self->_getDoubleFromExtension        = _getDoubleFromExtension;
 	self->_getDoubleFromMaterial         = _getDoubleFromMaterial;
 
 	return self;
@@ -123,24 +123,15 @@ void _IntegrationPointMapper_AssignFromX
 }
 
 void _IntegrationPointMapper_Build( void* mapper, void* data ) {
-	IntegrationPointMapper*	self;
-
-	self = (IntegrationPointMapper*)mapper;
 }
 
 void _IntegrationPointMapper_Initialise( void* mapper, void* data ) {
-	IntegrationPointMapper*	self;
-
-	self = (IntegrationPointMapper*)mapper;
 }
 
 void _IntegrationPointMapper_Execute( void* mapper, void* data ) {
 }
 
 void _IntegrationPointMapper_Destroy( void* mapper, void* data ) {
-	IntegrationPointMapper* self;
-	
-	self = (IntegrationPointMapper*)mapper;
 }
 
 void IntegrationPointMapper_Map( void* mapper ) {
diff -r 26dd025f99b5 -r 45ad3f51169e MaterialPoints/src/MappedParticleLayout.cxx
--- a/MaterialPoints/src/MappedParticleLayout.cxx	Wed Sep 14 14:42:29 2011 -0700
+++ b/MaterialPoints/src/MappedParticleLayout.cxx	Sun Sep 18 12:45:49 2011 -0700
@@ -75,9 +75,6 @@ MappedParticleLayout* _MappedParticleLay
 
 
 void _MappedParticleLayout_Init( void* particleLayout ) {
-	MappedParticleLayout* self;
-
-	self = (MappedParticleLayout*)particleLayout;
 }
 
 void _MappedParticleLayout_Delete( void* particleLayout ) {
diff -r 26dd025f99b5 -r 45ad3f51169e MaterialPoints/src/ParticleFeVariable.cxx
--- a/MaterialPoints/src/ParticleFeVariable.cxx	Wed Sep 14 14:42:29 2011 -0700
+++ b/MaterialPoints/src/ParticleFeVariable.cxx	Sun Sep 18 12:45:49 2011 -0700
@@ -140,13 +140,11 @@ void _ParticleFeVariable_AssignFromXML( 
 void _ParticleFeVariable_AssignFromXML( void* materialFeVariable, Stg_ComponentFactory* cf, void* data ){
 	ParticleFeVariable*		self = (ParticleFeVariable*) materialFeVariable;
 	IntegrationPointsSwarm*	swarm;
-	FiniteElementContext*	context;
 	FeMesh*						mesh;
 
 	_FieldVariable_AssignFromXML( self, cf, data );
 
 	swarm = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Swarm", IntegrationPointsSwarm, True, data  );
-	context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", FiniteElementContext, False, data  );
 	mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Mesh", FeMesh, True, data );
 
 	_FeVariable_Init( (FeVariable* )self, mesh, NULL, NULL, NULL, NULL, NULL, NULL, False, False );
diff -r 26dd025f99b5 -r 45ad3f51169e Utils/src/PCDVC.cxx
--- a/Utils/src/PCDVC.cxx	Wed Sep 14 14:42:29 2011 -0700
+++ b/Utils/src/PCDVC.cxx	Sun Sep 18 12:45:49 2011 -0700
@@ -550,7 +550,7 @@ void splitIntParticleByIndexWithinCell( 
     Particle_Index    matNewParticle_IndexOnCPU;
     IntegrationPoint* intNewParticle;
     MaterialPoint*    matNewParticle;
-    Particle_Index    intNewParticle_IndexWithinCell;/* the number of the particle within the cell */
+    // Particle_Index    intNewParticle_IndexWithinCell;/* the number of the particle within the cell */
     //Particle_Index    matNewParticle_IndexWithinCell;
     IntegrationPoint* intParticleToSplit;
     MaterialPoint*    matParticleToSplit;
@@ -597,7 +597,7 @@ void splitIntParticleByIndexWithinCell( 
     /* Copy new global position to coord on new mat particle */
     memcpy( matNewParticle->coord, newCoord, sizeof(Coord) );
 	      
-    intNewParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( intSwarm, lCell_I, intNewParticle_IndexOnCPU);
+    // intNewParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( intSwarm, lCell_I, intNewParticle_IndexOnCPU);
     /*
       printf("\e[1;33m");
       printf("Creating int particle number %d from cell %d local within cell particle num = %d\n\n", intNewParticle_IndexOnCPU ,lCell_I, intNewParticle_IndexWithinCell);
@@ -614,7 +614,7 @@ void splitIntParticleByIndexOnCPU( Integ
     Particle_Index    matNewParticle_IndexOnCPU;
     IntegrationPoint* intNewParticle;
     MaterialPoint*    matNewParticle;
-    Particle_Index    intNewParticle_IndexWithinCell;/* the number of the particle within the cell */
+    // Particle_Index    intNewParticle_IndexWithinCell;/* the number of the particle within the cell */
     //Particle_Index    matNewParticle_IndexWithinCell;
     IntegrationPoint* intParticleToSplit;
     MaterialPoint*    matParticleToSplit;
@@ -672,7 +672,7 @@ void splitIntParticleByIndexOnCPU( Integ
     /* Copy new global position to coord on new mat particle */
     memcpy( matNewParticle->coord, newCoord, sizeof(Coord) );
 	      
-    intNewParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( intSwarm, lCell_I, intNewParticle_IndexOnCPU);
+    // intNewParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( intSwarm, lCell_I, intNewParticle_IndexOnCPU);
     /*
       printf("\e[1;33m");
       printf("Creating int particle number %d from cell %d local within cell particle num = %d\n\n", intNewParticle_IndexOnCPU ,lCell_I, intNewParticle_IndexWithinCell);
diff -r 26dd025f99b5 -r 45ad3f51169e Utils/tests/PCDVCSuite.cxx
--- a/Utils/tests/PCDVCSuite.cxx	Wed Sep 14 14:42:29 2011 -0700
+++ b/Utils/tests/PCDVCSuite.cxx	Sun Sep 18 12:45:49 2011 -0700
@@ -134,8 +134,8 @@ void testElementIntegral_CircleInterface
 	Index						loop_I;
 	Index						count            = Dictionary_GetUnsignedInt_WithDefault( context->dictionary, "SampleSize", 5000 );
 	void*						data=NULL;
-		      IntegrationPoint* intParticle;
-		      MaterialPoint*  materialPoint;
+		      // IntegrationPoint* intParticle;
+		      // MaterialPoint*  materialPoint;
 	/* Create FeVariable */
 	feVariable = FeVariable_New_Full(
 		"feVariable",
@@ -167,18 +167,18 @@ void testElementIntegral_CircleInterface
 		/* The following function should not be called here as it is already called ultimately via the above function */
 		/* calling this function again causes a first iteration in Lloyd's algorithm for the Voronoi cells which we don't want here */
 		//WeightsCalculator_CalculateCell( weights, integrationSwarm, lElement_I );
-		if(loop_I%10 == 0){
-		      Index i;
+		// if(loop_I%10 == 0){
+		//       Index i;
 
-		      for(i=0;i<integrationSwarm->cellParticleCountTbl[0];i++){
-			    intParticle  =  (IntegrationPoint*)Swarm_ParticleInCellAt( integrationSwarm, 0, i );
-			    materialPoint = (MaterialPoint*)Swarm_ParticleInCellAt( materialSwarm, 0, i );
-			    //printf("In %s M(%10.7lf %10.7lf) I(%10.7lf %10.7lf) W(%.4lf) particle layout type %s: point %d in cell %d\n",__func__,materialPoint->coord[0], materialPoint->coord[1],
-			//	   intParticle->xi[0], intParticle->xi[1], intParticle->weight, materialSwarm->particleLayout->type, i, 0);
+		//       for(i=0;i<integrationSwarm->cellParticleCountTbl[0];i++){
+		// 	    intParticle  =  (IntegrationPoint*)Swarm_ParticleInCellAt( integrationSwarm, 0, i );
+		// 	    materialPoint = (MaterialPoint*)Swarm_ParticleInCellAt( materialSwarm, 0, i );
+		// 	    //printf("In %s M(%10.7lf %10.7lf) I(%10.7lf %10.7lf) W(%.4lf) particle layout type %s: point %d in cell %d\n",__func__,materialPoint->coord[0], materialPoint->coord[1],
+		// 	//	   intParticle->xi[0], intParticle->xi[1], intParticle->weight, materialSwarm->particleLayout->type, i, 0);
 		
-			    //printf("%lf %lf\n",intParticle->xi[0],intParticle->xi[1]);
-		      }
-                }
+		// 	    //printf("%lf %lf\n",intParticle->xi[0],intParticle->xi[1]);
+		//       }
+                // }
 
 		/* Evaluate Integral */
 		integral = FeVariable_IntegrateElement( feVariable, integrationSwarm, lElement_I );



More information about the CIG-COMMITS mailing list