[cig-commits] commit: Change uint to unsigned int

Mercurial hg at geodynamics.org
Sat Oct 22 19:14:33 PDT 2011


changeset:   894:16f01f546c94
user:        Walter Landry <wlandry at caltech.edu>
date:        Sat Oct 22 19:12:10 2011 -0700
files:       Rheology/src/Director.cxx Rheology/src/MohrCoulomb.cxx Rheology/src/Orthotropic.cxx Rheology/src/OrthotropicAligned.cxx Rheology/src/VonMises.cxx Utils/src/BaseRecoveryFeVar.cxx Utils/src/RadiogenicHeatingTerm.cxx Utils/src/StressBC.cxx Utils/src/TracerOutput.cxx Utils/src/XDMFGenerator.cxx Utils/src/types.h plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.cxx plugins/Output/VTKOutput/VTKOutput.cxx
description:
Change uint to unsigned int


diff -r 6729dd99ad97 -r 16f01f546c94 Rheology/src/Director.cxx
--- a/Rheology/src/Director.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Rheology/src/Director.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -355,7 +355,7 @@ void _Director_Initialise( void* directo
 			"randomInitialDirections");
 
 			/* Loop over materials and get material properties from dictionary */
-			for (uint material_I = 0 ; material_I < materialsCount ; material_I++ ) {
+			for (unsigned int material_I = 0 ; material_I < materialsCount ; material_I++ ) {
 				material = Materials_Register_GetByIndex( 
 						self->materialPointsSwarm->materials_Register, 
 						material_I );
@@ -385,7 +385,7 @@ void _Director_Initialise( void* directo
 			
 			/* If material is random, set the local srand, 
 			locate all random particles, and set their director */
-			for (uint material_I = 0; material_I < materialsCount; material_I++) {
+			for (unsigned int material_I = 0; material_I < materialsCount; material_I++) {
 				if (randomInitialDirections[material_I] == True) {
 					Particle_Index	gParticle_I;
 					unsigned	approxGlobalParticleCount = particleLocalCount * self->materialPointsSwarm->nProc;
@@ -428,7 +428,7 @@ void _Director_Initialise( void* directo
 		    /* For each non-random particle, set the initial direction */
 			for ( lParticle_I = 0 ; lParticle_I < particleLocalCount ; lParticle_I++ ) {
 				/* Initialise the norm of each director */
-				uint material_I = MaterialPointsSwarm_GetMaterialIndexAt(
+				unsigned int material_I = MaterialPointsSwarm_GetMaterialIndexAt(
 						self->materialPointsSwarm, 
 						lParticle_I );
 				if (randomInitialDirections[material_I] == False) {
diff -r 6729dd99ad97 -r 16f01f546c94 Rheology/src/MohrCoulomb.cxx
--- a/Rheology/src/MohrCoulomb.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Rheology/src/MohrCoulomb.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -397,7 +397,7 @@ void _MohrCoulomb_StoreCurrentParameters
 	/* Subtract the trace (which should be zero anyway).  We can
 		use TensorMapST3D even for 2D, because it is the same for
 		the xx and yy components */
-	for(uint i=0;i<dim;++i)
+	for(unsigned int i=0;i<dim;++i)
 		self->currentStrainRate[TensorMapST3D[i][i]]-=trace/dim;
 
 	ConstitutiveMatrix_CalculateStress( constitutiveMatrix, self->currentStrainRate, self->currentStress );
diff -r 6729dd99ad97 -r 16f01f546c94 Rheology/src/Orthotropic.cxx
--- a/Rheology/src/Orthotropic.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Rheology/src/Orthotropic.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -186,8 +186,8 @@ void _Orthotropic_ModifyConstitutiveMatr
 	n1 = self->n[0];
 	n2 = self->n[1];
 
-	for(uint i=0;i<dim*(dim+1)/2;i++){
-	      for(uint j=0;j<dim*(dim+1)/2;j++){
+	for(unsigned int i=0;i<dim*(dim+1)/2;i++){
+	      for(unsigned int j=0;j<dim*(dim+1)/2;j++){
 		    C[i][j] = 0.0;
 	      }
 	}
diff -r 6729dd99ad97 -r 16f01f546c94 Rheology/src/OrthotropicAligned.cxx
--- a/Rheology/src/OrthotropicAligned.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Rheology/src/OrthotropicAligned.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -153,8 +153,8 @@ void _OrthotropicAligned_ModifyConstitut
         /*	if(!flag){ // if not visited modify matrix else no need to update */
         /* Snark dies if I only allow this to be called once.. */
 	/* ahh need to allow it to be called once for every particle */
-	   for(uint i=0;i<dim*(dim+1)/2;i++){
-	      for(uint j=0;j<dim*(dim+1)/2;j++){
+	   for(unsigned int i=0;i<dim*(dim+1)/2;i++){
+	      for(unsigned int j=0;j<dim*(dim+1)/2;j++){
 		 D[i][j] = 0.0;
 	      }
 	   }
diff -r 6729dd99ad97 -r 16f01f546c94 Rheology/src/VonMises.cxx
--- a/Rheology/src/VonMises.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Rheology/src/VonMises.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -251,7 +251,7 @@ double _VonMises_GetYieldIndicator(
         SymmetricTensor_GetTrace(strainRate, constitutiveMatrix->dim,
                                  &strainRateTrace);
 
-        for(uint i=0;i<constitutiveMatrix->dim;++i)
+        for(unsigned int i=0;i<constitutiveMatrix->dim;++i)
           {
             strainRate[TensorMapST3D[i][i]]-=
               strainRateTrace/constitutiveMatrix->dim;
diff -r 6729dd99ad97 -r 16f01f546c94 Utils/src/BaseRecoveryFeVar.cxx
--- a/Utils/src/BaseRecoveryFeVar.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Utils/src/BaseRecoveryFeVar.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -141,8 +141,8 @@ void _BaseRecoveryFeVar_Build( void* _se
 void _BaseRecoveryFeVar_Build( void* _self, void* data ) {
   BaseRecoveryFeVar* self = (BaseRecoveryFeVar*) _self;
 	Sync*	               sync;
-	uint                  componentsCount = 0;
-	uint                  variable_I;
+	unsigned int                  componentsCount = 0;
+	unsigned int                  variable_I;
 	int                  *nodeDomainCountPtr = NULL;
 	char                 **variableName, *tmpName;
 	Variable*            dataVariable;
@@ -411,10 +411,10 @@ void BaseUtils_PopulateBoundaryNodesInfo
 	Node_Index              tmpNodeID, tmpNode_I;
 	Element_Index           nbrElementID;
         int                     *els;
-	uint                    nNodes;
+	unsigned int                    nNodes;
 	LmStruct                list;
 	Sync*                   sync;
-	uint                    nLocalNodes;
+	unsigned int                    nLocalNodes;
 	int                     nVerts;
         const int               *verts;
 	IArray*			            inc[2];
@@ -460,7 +460,7 @@ void BaseUtils_PopulateBoundaryNodesInfo
 	 */
 	inc[0] = IArray_New();
 	inc[1] = IArray_New();
-	for( uint dNodes_I = 0 ; dNodes_I < FeMesh_GetNodeDomainSize( mesh ) ; dNodes_I++ ) {
+	for( unsigned int dNodes_I = 0 ; dNodes_I < FeMesh_GetNodeDomainSize( mesh ) ; dNodes_I++ ) {
 		if( !bninfo[dNodes_I].onMeshBoundary ) 
 			continue;
 
diff -r 6729dd99ad97 -r 16f01f546c94 Utils/src/RadiogenicHeatingTerm.cxx
--- a/Utils/src/RadiogenicHeatingTerm.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Utils/src/RadiogenicHeatingTerm.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -177,7 +177,7 @@ void _RadiogenicHeatingTerm_AssembleElem
 	Particle_InCellIndex                 cellParticleCount;
 	Element_NodeIndex                    elementNodeCount;
 	Dimension_Index                      dim                = forceVector->dim;
-	Swarm*                               swarm              = self->integrationSwarm;
+	IntegrationPointsSwarm*              swarm              = (IntegrationPointsSwarm*)self->integrationSwarm;
 	FeMesh*       		             mesh               = forceVector->feVariable->feMesh;
 	Node_ElementLocalIndex               eNode_I;
 	Cell_Index                           cell_I;
@@ -201,8 +201,15 @@ void _RadiogenicHeatingTerm_AssembleElem
 	for( cParticle_I = 0 ; cParticle_I < cellParticleCount ; cParticle_I++ ) {
 		particle = (IntegrationPoint*) Swarm_ParticleInCellAt( swarm, cell_I, cParticle_I );
 
+                /* Handle case where we are using gauss swarms with
+                   NearestNeighborMapper instead of a material
+                   swarm */
+                IntegrationPointsSwarm* NNswarm(swarm);
+                IntegrationPoint* NNparticle(particle);
+                NearestNeighbor_Replace(&NNswarm,&NNparticle,lElement_I,dim);
+                  
 		/* Get parameters */
-		material = IntegrationPointsSwarm_GetMaterialOn( (IntegrationPointsSwarm*)swarm, particle );
+		material = IntegrationPointsSwarm_GetMaterialOn(NNswarm,NNparticle);
 		materialExt = (RadiogenicHeatingTerm_MaterialExt*)ExtensionManager_Get( material->extensionMgr, material, self->materialExtHandle );
 		
 		/* Check if this material has heating term */
diff -r 6729dd99ad97 -r 16f01f546c94 Utils/src/StressBC.cxx
--- a/Utils/src/StressBC.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Utils/src/StressBC.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -205,7 +205,7 @@ void _StressBC_AssignFromXML( void* forc
 }
 
 namespace {
-  const uint normal_direction=3;
+  const unsigned int normal_direction=3;
 
   /* Gets the actual values used by the StressBC (e.g. a float or a function). */
   void get_values(Stg_ComponentFactory* cf, void *stressBC,
@@ -339,7 +339,7 @@ void _StressBC_AssembleElement( void* fo
     return;
 
   /* Set up directions particular to each wall */
-  uint local_norm, face;
+  unsigned int local_norm, face;
   switch(self->_wall)
     {
       case Wall_Right:
@@ -379,7 +379,7 @@ void _StressBC_AssembleElement( void* fo
   const double xi[]={-sqrt(3/5.0),0,sqrt(3/5.0)};
   const double weights[]={5/9.0, 8/9.0, 5/9.0};
 
-  for(uint d=0;d<dim;++d)
+  for(unsigned int d=0;d<dim;++d)
     {
       for(int i=0;i<3;++i)
         {
diff -r 6729dd99ad97 -r 16f01f546c94 Utils/src/TracerOutput.cxx
--- a/Utils/src/TracerOutput.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Utils/src/TracerOutput.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -192,7 +192,7 @@ void _TracerOutput_Build( void* swarmOut
 
   if(self->pressureField)
     Stg_Component_Build( self->pressureField, data, False );
-  for(uint i=0;i<self->num_fields;++i)
+  for(unsigned int i=0;i<self->num_fields;++i)
     Stg_Component_Build( self->fields[i], data, False );
 
   _SwarmOutput_Build( self, data );
@@ -202,7 +202,7 @@ void _TracerOutput_Initialise( void* swa
 
   if(self->pressureField)
     Stg_Component_Initialise( self->pressureField, data, False );
-  for(uint i=0;i<self->num_fields;++i)
+  for(unsigned int i=0;i<self->num_fields;++i)
     Stg_Component_Initialise( self->fields[i], data, False );
 	
   _SwarmOutput_Initialise( self, data );
@@ -217,7 +217,7 @@ void _TracerOutput_Destroy( void* swarmO
 
   if(self->pressureField)
     Stg_Component_Destroy( self->pressureField, data, False );
-  for(uint i=0;i<self->num_fields;++i)
+  for(unsigned int i=0;i<self->num_fields;++i)
     Stg_Component_Destroy( self->fields[i], data, False );
 	
   _SwarmOutput_Destroy( self, data );
@@ -232,7 +232,7 @@ void _TracerOutput_PrintHeader( void* sw
   _SwarmOutput_PrintHeader( self, stream, lParticle_I, context );
 	
   SwarmOutput_PrintString( self, stream, "Pressure" );
-  for(uint i=0;i<self->num_fields;++i)
+  for(unsigned int i=0;i<self->num_fields;++i)
     {
       sprintf(name,"Field%d",i);
       SwarmOutput_PrintString( self, stream, name );
@@ -268,7 +268,7 @@ void _TracerOutput_PrintData( void* swar
       }
       SwarmOutput_PrintValue( self, stream, pressure );
     }
-  for(uint i=0;i<self->num_fields;++i)
+  for(unsigned int i=0;i<self->num_fields;++i)
     {
       FieldVariable_InterpolateValueAt(self->fields[i],coord,&field);
       SwarmOutput_PrintValue( self, stream, field );
diff -r 6729dd99ad97 -r 16f01f546c94 Utils/src/XDMFGenerator.cxx
--- a/Utils/src/XDMFGenerator.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/Utils/src/XDMFGenerator.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -503,16 +503,16 @@ namespace {
     int totalVerts        = Mesh_GetGlobalSize( feMesh, (MeshTopology_Dim)0 );
     int elementGlobalSize = FeMesh_GetElementGlobalSize(feMesh);
 
-    uint maxNodes;
+    unsigned int maxNodes;
     /* get connectivity array size */
     if (feMesh->nElTypes == 1)
       maxNodes = FeMesh_GetElementNodeSize( feMesh, 0);
     else {
       /* determine the maximum number of nodes each element has */
       maxNodes = 0;
-      for (uint gElement_I = 0; gElement_I < FeMesh_GetElementGlobalSize(feMesh);
+      for (unsigned int gElement_I = 0; gElement_I < FeMesh_GetElementGlobalSize(feMesh);
            gElement_I++ ) {
-        uint numNodes;
+        unsigned int numNodes;
         numNodes = FeMesh_GetElementNodeSize( feMesh, gElement_I);
         if( maxNodes < numNodes ) maxNodes = numNodes;
       }
@@ -522,7 +522,7 @@ namespace {
       {
         /* First separate each node of each element into its own
            variable C0-C8 or C0-C26 */
-        for(uint i=0;i<maxNodes;++i)
+        for(unsigned int i=0;i<maxNodes;++i)
           {
             Journal_Printf(stream,"    <DataItem ItemType=\"HyperSlab\" Dimensions=\"%u 1\" Name=\"C%u\">\n",
                            elementGlobalSize, i);
@@ -640,8 +640,8 @@ namespace {
     /** determine whether feVariable data is cell centered (like
         Pressure with P0 elements), or on the nodes (like
         Velocity) **/
-    uint totalVerts(Mesh_GetGlobalSize(feMesh,(MeshTopology_Dim)0));
-    uint elementGlobalSize(FeMesh_GetElementGlobalSize(feMesh));
+    unsigned int totalVerts(Mesh_GetGlobalSize(feMesh,(MeshTopology_Dim)0));
+    unsigned int elementGlobalSize(FeMesh_GetElementGlobalSize(feMesh));
     if(meshSize == elementGlobalSize){
       centering="Cell";
     } else if(meshSize == totalVerts) {
@@ -652,7 +652,7 @@ namespace {
     }
 
     /** how many degrees of freedom does the fevariable have? **/
-    uint dofAtEachNodeCount = feVar->fieldComponentCount;
+    unsigned int dofAtEachNodeCount = feVar->fieldComponentCount;
     if (dofAtEachNodeCount == 1) {
       Journal_Printf( stream, "    <Attribute Type=\"Scalar\" Center=\"%s\" Name=\"%s\">\n", centering.c_str(),  feVar->name);
       Journal_Printf( stream, "       <DataItem ItemType=\"HyperSlab\" Dimensions=\"%u 1\" >\n", meshSize );
@@ -686,7 +686,7 @@ namespace {
       Journal_Printf( stream, "         </Attribute>\n\n" );
     } else {
       /** where there are more than 3 components, we write each one out as a scalar **/
-      for(uint dofCountIndex = 0 ; dofCountIndex < dofAtEachNodeCount ; ++dofCountIndex){
+      for(unsigned int dofCountIndex = 0 ; dofCountIndex < dofAtEachNodeCount ; ++dofCountIndex){
         Journal_Printf( stream, "         <Attribute Type=\"Scalar\" Center=\"%s\" Name=\"%s-Component-%u\">\n", centering.c_str(),  feVar->name, dofCountIndex);
         Journal_Printf( stream, "            <DataItem ItemType=\"HyperSlab\" Dimensions=\"%u 1\" >\n", meshSize );
         Journal_Printf( stream, "               <DataItem Dimensions=\"3 2\" Format=\"XML\"> 0 %u 1 1 %u 1 </DataItem>\n", (offset+dofCountIndex), meshSize );
diff -r 6729dd99ad97 -r 16f01f546c94 Utils/src/types.h
--- a/Utils/src/types.h	Tue Oct 18 20:12:18 2011 -0700
+++ b/Utils/src/types.h	Sat Oct 22 19:12:10 2011 -0700
@@ -71,7 +71,7 @@ typedef struct
   StressBC_Types type;
   double DoubleValue;
   Index CFIndex;
-  uint direction;
+  unsigned int direction;
   HydrostaticTerm *hydrostaticTerm;
 } StressBC_Entry;
 
diff -r 6729dd99ad97 -r 16f01f546c94 plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.cxx
--- a/plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/plugins/MeshAdvectionCorrection/MeshAdvectionCorrection.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -124,7 +124,7 @@ void MeshAdvectionCorrection_EulerDeform
 	FeMesh*      mesh = artDField->feMesh;
 	Dof_Index    dof  = artDField->fieldComponentCount;
 	double       artV[3], artD[3];
-	uint numLocalNodes = FeMesh_GetNodeLocalSize( mesh );
+	unsigned int numLocalNodes = FeMesh_GetNodeLocalSize( mesh );
 	Dof_Index    dof_I, lNode_I;
 
 		/* INITIAL CONDITION: artV = 0 */
diff -r 6729dd99ad97 -r 16f01f546c94 plugins/Output/VTKOutput/VTKOutput.cxx
--- a/plugins/Output/VTKOutput/VTKOutput.cxx	Tue Oct 18 20:12:18 2011 -0700
+++ b/plugins/Output/VTKOutput/VTKOutput.cxx	Sat Oct 22 19:12:10 2011 -0700
@@ -441,7 +441,7 @@ void VTKOutput_particles(Swarm* swarm,
           fprintf(fp,"      </CellData>\n");
           fprintf(fp,"      <Cells>\n");
           fprintf(fp,"        <DataArray type=\"Int32\" Name=\"connectivity\" format=\"ascii\">\n");
-          for(uint i=0;i<(num_particles-1)/stepping+1;++i)
+          for(unsigned int i=0;i<(num_particles-1)/stepping+1;++i)
             fprintf(fp,"%d ",i);
           fprintf(fp,"\n        </DataArray>\n");
           fprintf(fp,"        <DataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\">\n");
@@ -472,7 +472,7 @@ void VTKOutput_particles(Swarm* swarm,
 /* Print out the coordinates of the mesh. */
 
 void VTKOutput_print_coords(FILE *fp, FeMesh *feMesh, Grid *grid, int nDims,
-                            uint lower[3], uint upper[3]) {
+                            unsigned int lower[3], uint upper[3]) {
   IJK ijk;
 
   fprintf(fp,"      <Points>\n");
@@ -503,7 +503,7 @@ void VTKOutput_fields(void *context, int
   Index var_I;
   int header_printed=0;
   int nDims, i;
-  uint lower[3], upper[3];
+  unsigned int lower[3], upper[3];
 
   HydrostaticTerm *hydrostaticTerm;
   char* field_filename;
@@ -743,7 +743,7 @@ void VTKOutput_fields(void *context, int
                       double p;
                       /* First add the trace of the stress */
 
-                      for(uint stress_I = 0;
+                      for(unsigned int stress_I = 0;
                           stress_I<self->fieldVariable_Register->objects->count;
                           stress_I++ ) {
                         FieldVariable* stressVar;



More information about the CIG-COMMITS mailing list