[cig-commits] commit: Fix compiler warnings.
Mercurial
hg at geodynamics.org
Sun Oct 16 05:18:45 PDT 2011
changeset: 626:78edc3a2ea06
user: Walter Landry <wlandry at caltech.edu>
date: Sun Oct 16 05:14:03 2011 -0700
files: Geometry/src/Delaunay.cxx Geometry/src/ParallelDelaunay.cxx Geometry/src/TensorMath.cxx Mesh/src/Grid.cxx Mesh/src/MeshGenerator.cxx Mesh/src/MeshVariable.cxx Mesh/src/Mesh_CentroidType.cxx Mesh/src/linearSpaceAdaptor.cxx Swarm/src/FileParticleLayout.cxx Swarm/src/LineParticleLayout.cxx Swarm/src/ParticleMovementHandler.cxx Swarm/src/TriGaussParticleLayout.cxx Swarm/tests/GaussLayoutSingleCellSuite.cxx Swarm/tests/ManualParticleLayoutSuite.cxx Swarm/tests/ParticleCoordsSuite.cxx Swarm/tests/SpaceFillerParticleLayoutSuite.cxx Swarm/tests/SwarmDumpAndLoadSuite.cxx Utils/src/DofLayout.cxx Utils/src/DofLayout.h Utils/src/OperatorFieldVariable.cxx Utils/src/RegularMeshUtils.cxx Utils/src/TimeIntegrand.cxx Utils/src/TimeIntegrator.cxx Utils/tests/CornerVCSuite.cxx Utils/tests/DofLayoutSuite.cxx
description:
Fix compiler warnings.
diff -r 2995217ae203 -r 78edc3a2ea06 Geometry/src/Delaunay.cxx
--- a/Geometry/src/Delaunay.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Geometry/src/Delaunay.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -597,7 +597,6 @@ void Delaunay_BuildTriangleIndices( Dela
int i = 0, triCount;
QuadEdgeRef e = 0, eStart = 0, eOnext = 0, eLnext = 0;
QuadEdge *edges = NULL;
- Site *sites = NULL;
int maxEdges = 0;
unsigned int **triIndices = NULL;
int **edgeToTriangle = NULL;
@@ -641,7 +640,6 @@ void Delaunay_BuildTriangleIndices( Dela
triIndices = delaunay->triangleIndices;
edges = (QuadEdge*)delaunay->qp->chunks[0].memory;
- sites = delaunay->sites;
maxEdges = delaunay->qp->numElements;
for (i = 0; i < maxEdges; i++) {
@@ -746,13 +744,11 @@ void Delaunay_BuildVoronoiVertices( Dela
QuadEdgeRef e = 0, eStart = 0, eOnext = 0, eLnext = 0;
VoronoiVertex *new_voronoi_site = NULL;
QuadEdge *edges = NULL;
- Site *sites = NULL;
int maxEdges = 0;
assert( delaunay );
edges = (QuadEdge*)delaunay->qp->chunks[0].memory;
- sites = delaunay->sites;
maxEdges = delaunay->qp->numElements;
for (i = 0; i < maxEdges; i++) {
@@ -810,7 +806,6 @@ void Delaunay_FindNeighbours( Delaunay *
Site *src, *dst;
VoronoiVertex *vsrc, *vdst;
float dist = 0.0f, diffx = 0.0f, diffy = 0.0f, voronoiAreaResult = 0.0;
- Site *sites = NULL;
QuadEdge *edges = NULL;
unsigned int *numNeighbours;
int *hull;
@@ -821,7 +816,6 @@ void Delaunay_FindNeighbours( Delaunay *
assert( delaunay );
attr = delaunay->attributes;
- sites = delaunay->sites;
edges = (QuadEdge*)delaunay->qp->chunks[0].memory;
maxEdges = delaunay->qp->numElements;
numSites = delaunay->numSites;
diff -r 2995217ae203 -r 78edc3a2ea06 Geometry/src/ParallelDelaunay.cxx
--- a/Geometry/src/ParallelDelaunay.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Geometry/src/ParallelDelaunay.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -517,12 +517,10 @@ void ParallelDelaunay_RetriangulateAfter
Site *result = NULL;
ParallelDelaunay *self = pd;
int i = 0;
- int numProcs;
int numSites;
int count;
int offset;
- numProcs = self->numProcs;
numSites = self->numSites;
offset = 0;
for( i=0; i<self->rank; i++ ){
@@ -577,9 +575,7 @@ void ParallelDelaunay_BuildTriangleIndic
int i = 0, triCount;
QuadEdgeRef e = 0, eStart = 0, eOnext = 0, eLnext = 0;
QuadEdge *edges = NULL;
- Site *sites = NULL;
int maxEdges = 0;
- int rank = 0;
int pass = 0;
unsigned int **triIndices = NULL;
Delaunay *delaunay = NULL;
@@ -599,8 +595,6 @@ void ParallelDelaunay_BuildTriangleIndic
triIndices = delaunay->triangleIndices;
edges = (QuadEdge*)delaunay->qp->chunks[0].memory;
- sites = delaunay->sites;
- rank = pd->rank;
maxEdges = delaunay->qp->numElements;
for (i = 0; i < maxEdges; i++) {
diff -r 2995217ae203 -r 78edc3a2ea06 Geometry/src/TensorMath.cxx
--- a/Geometry/src/TensorMath.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Geometry/src/TensorMath.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -725,11 +725,11 @@ void SymmetricTensor_CalcAllEigenvectors
/** Calculates an eigenvector for a given 3D SymmetricTensor */
Bool SymmetricTensor_CalcEigenvector3D( SymmetricTensor tensor, Eigenvector* eigenvector ) {
- double A, B, C, d, e, f;
+ double
+ A, B, d, e, f;
A = tensor[ST3D_00] - eigenvector->eigenvalue;
B = tensor[ST3D_11] - eigenvector->eigenvalue;
- C = tensor[ST3D_22] - eigenvector->eigenvalue;
d = tensor[ST3D_01];
e = tensor[ST3D_02];
f = tensor[ST3D_12];
diff -r 2995217ae203 -r 78edc3a2ea06 Mesh/src/Grid.cxx
--- a/Mesh/src/Grid.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Mesh/src/Grid.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -103,10 +103,6 @@ void _Grid_Delete( void* grid ) {
void _Grid_Print( void* grid, Stream* stream ) {
Grid* self = (Grid*)grid;
-
- /* Set the Journal for printing informations */
- Stream* gridStream;
- gridStream = Journal_Register( InfoStream_Type, (Name)"GridStream" );
/* Print parent */
Journal_Printf( stream, "Grid (ptr): (%p)\n", self );
diff -r 2995217ae203 -r 78edc3a2ea06 Mesh/src/MeshGenerator.cxx
--- a/Mesh/src/MeshGenerator.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Mesh/src/MeshGenerator.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -92,10 +92,6 @@ void _MeshGenerator_Print( void* meshGen
void _MeshGenerator_Print( void* meshGenerator, Stream* stream ) {
MeshGenerator* self = (MeshGenerator*)meshGenerator;
- /* Set the Journal for printing informations */
- Stream* meshGeneratorStream;
- meshGeneratorStream = Journal_Register( InfoStream_Type, (Name)"MeshGeneratorStream" );
-
/* Print parent */
Journal_Printf( stream, "MeshGenerator (ptr): (%p)\n", self );
_Stg_Component_Print( self, stream );
diff -r 2995217ae203 -r 78edc3a2ea06 Mesh/src/MeshVariable.cxx
--- a/Mesh/src/MeshVariable.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Mesh/src/MeshVariable.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -114,10 +114,6 @@ void _MeshVariable_Print( void* meshVari
void _MeshVariable_Print( void* meshVariable, Stream* stream ) {
MeshVariable* self = (MeshVariable*)meshVariable;
- /* Set the Journal for printing informations */
- Stream* meshVariableStream;
- meshVariableStream = Journal_Register( InfoStream_Type, (Name)"MeshVariableStream" );
-
/* Print parent */
Journal_Printf( stream, "MeshVariable (ptr): (%p)\n", self );
_Variable_Print( self, stream );
diff -r 2995217ae203 -r 78edc3a2ea06 Mesh/src/Mesh_CentroidType.cxx
--- a/Mesh/src/Mesh_CentroidType.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Mesh/src/Mesh_CentroidType.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -108,9 +108,6 @@ void _Mesh_CentroidType_Delete( void* ce
void _Mesh_CentroidType_Print( void* centroidType, Stream* stream ) {
Mesh_CentroidType* self = (Mesh_CentroidType*)centroidType;
- Stream* centroidTypeStream;
-
- centroidTypeStream = Journal_Register( InfoStream_Type, (Name)"Mesh_CentroidTypeStream" );
/* Print parent */
Journal_Printf( stream, "Mesh_CentroidType (ptr): (%p)\n", self );
diff -r 2995217ae203 -r 78edc3a2ea06 Mesh/src/linearSpaceAdaptor.cxx
--- a/Mesh/src/linearSpaceAdaptor.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Mesh/src/linearSpaceAdaptor.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -125,10 +125,6 @@ void _LinearSpaceAdaptor_Print( void* ad
void _LinearSpaceAdaptor_Print( void* adaptor, Stream* stream ) {
LinearSpaceAdaptor* self = (LinearSpaceAdaptor*)adaptor;
- /* Set the Journal for printing informations */
- Stream* adaptorStream;
- adaptorStream = Journal_Register( InfoStream_Type, (Name)"LinearSpaceAdaptorStream" );
-
/* Print parent */
Journal_Printf( stream, "LinearSpaceAdaptor (ptr): (%p)\n", self );
_MeshAdaptor_Print( self, stream );
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/src/FileParticleLayout.cxx
--- a/Swarm/src/FileParticleLayout.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/src/FileParticleLayout.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -221,7 +221,6 @@ void _FileParticleLayout_SetInitialCount
hid_t group_id, attrib_id;
Index ii;
int nParticles;
- herr_t status;
#else
MPI_File mpiFile;
int openResult;
@@ -269,7 +268,7 @@ void _FileParticleLayout_SetInitialCount
self->type,
self->name,
filenameTemp );
- status = H5Aread(attrib_id, H5T_NATIVE_INT, &nParticles);
+ H5Aread(attrib_id, H5T_NATIVE_INT, &nParticles);
H5Aclose(attrib_id);
H5Gclose(group_id);
@@ -343,7 +342,6 @@ void _FileParticleLayout_InitialiseParti
Index ii, jj, kk;
hid_t group_id, attrib_id;
int nParticles;
- herr_t status;
/* Allocate space to store arrays of dataspaces */
assert( swarm->swarmVariable_Register );
@@ -383,7 +381,7 @@ void _FileParticleLayout_InitialiseParti
group_id = H5Gopen2(file[ii-1], "/", H5P_DEFAULT);
attrib_id = H5Aopen(group_id, "Swarm Particle Count", H5P_DEFAULT);
#endif
- status = H5Aread(attrib_id, H5T_NATIVE_INT, &nParticles);
+ H5Aread(attrib_id, H5T_NATIVE_INT, &nParticles);
H5Aclose(attrib_id);
H5Gclose(group_id);
@@ -478,8 +476,6 @@ void _FileParticleLayout_InitialiseParti
{
FileParticleLayout* self = (FileParticleLayout*)particleLayout;
Swarm* swarm = (Swarm*)_swarm;
- int result;
- SizeT particleSize;
#ifdef READ_HDF5
SwarmVariable* swarmVar;
@@ -487,8 +483,6 @@ void _FileParticleLayout_InitialiseParti
Index ii;
hid_t memSpace;
- result = 0;
- particleSize = 0;
/* find out which file particle is contained within */
for( ii = 1 ; ii <= self->checkpointfiles ; ii++ ){
if( newParticle_I < self->lastParticleIndex[ii-1]) break;
@@ -550,8 +544,8 @@ void _FileParticleLayout_InitialiseParti
}
#else
- particleSize = swarm->particleExtensionMgr->finalSize;
- result = fread( particle, particleSize, 1, self->file );
+ SizeT particleSize = swarm->particleExtensionMgr->finalSize;
+ int result = fread( particle, particleSize, 1, self->file );
Journal_Firewall(
result == 1,
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/src/LineParticleLayout.cxx
--- a/Swarm/src/LineParticleLayout.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/src/LineParticleLayout.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -189,7 +189,6 @@ void* _LineParticleLayout_Copy( const vo
void _LineParticleLayout_AssignFromXML( void* particleLayout, Stg_ComponentFactory *cf, void* data ){
LineParticleLayout* self = (LineParticleLayout*) particleLayout;
- Particle_Index totalInitialParticles;
Dimension_Index dim;
Coord* vertexList;
Index vertexCount;
@@ -229,8 +228,6 @@ void _LineParticleLayout_AssignFromXML(
Journal_PrintfL( stream, 2, "(%0.3g, %0.3g, %0.3g)\n", coord[ I_AXIS ], coord[ J_AXIS ], coord[ K_AXIS ] );
}
Stream_UnIndent( stream );
-
- totalInitialParticles = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"totalInitialParticles", 2 );
_LineParticleLayout_Init( self, dim, vertexCount, vertexList );
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/src/ParticleMovementHandler.cxx
--- a/Swarm/src/ParticleMovementHandler.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/src/ParticleMovementHandler.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -753,7 +753,6 @@ void ParticleMovementHandler_FillRemaini
Index currLeavingParticleArrayEntry = 0;
Index highestLeavingParticleArrayEntry;
Index leavingParticlesUnfilledCount = 0;
- Particle_Index highestLeavingParticleIndex;
Particle_Index candidateParticleToMove;
Bool finishedFlag = False;
Bool mergedArrayCreated = False;
@@ -814,7 +813,6 @@ void ParticleMovementHandler_FillRemaini
*/
candidateParticleToMove = self->swarm->particleLocalCount-1;
- highestLeavingParticleIndex = leavingParticlesArray[highestLeavingParticleArrayEntry];
Journal_DPrintfL( self->debug, 3, "Searching for highest particle that hasn't also moved:\n" );
Stream_Indent( self->debug );
@@ -836,7 +834,6 @@ void ParticleMovementHandler_FillRemaini
candidateParticleToMove );
highestLeavingParticleArrayEntry--;
- highestLeavingParticleIndex = leavingParticlesArray[highestLeavingParticleArrayEntry];
leavingParticlesUnfilledCount--;
self->swarm->particleLocalCount--;
candidateParticleToMove--;
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/src/TriGaussParticleLayout.cxx
--- a/Swarm/src/TriGaussParticleLayout.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/src/TriGaussParticleLayout.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -209,7 +209,6 @@ void _TriGaussParticleLayout_InitialiseP
int dim;
static double weight[20];
static double xi[20][3];
- static int beenHere = 0;
int d;
dim = self->dim;
@@ -261,8 +260,6 @@ void _TriGaussParticleLayout_InitialiseP
}
integrationPoint->weight = weight[cParticle_I];
-
- beenHere = 1;
}
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/tests/GaussLayoutSingleCellSuite.cxx
--- a/Swarm/tests/GaussLayoutSingleCellSuite.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/tests/GaussLayoutSingleCellSuite.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -66,9 +66,6 @@ void GaussLayoutSingleCellSuite_Teardown
void GaussLayoutSingleCellSuite_Test1ParticlePerDim_3D( GaussLayoutSingleCellSuiteData* data ) {
unsigned nDims;
- unsigned gaussParticles[3];
- double minCrds[3];
- double maxCrds[3];
ExtensionManager_Register* extensionMgr_Register;
GaussParticleLayout* gaussParticleLayout;
SingleCellLayout* singleCellLayout;
@@ -87,9 +84,6 @@ void GaussLayoutSingleCellSuite_Test1Par
Stream_RedirectFile( stream, "1ParticlePerDim_3D.dat" );
nDims = 3;
- gaussParticles[0] = 2; gaussParticles[1] = 1; gaussParticles[2] = 3;
- minCrds[0] = 0.0; minCrds[1] = 0.0; minCrds[2] = 0.0;
- maxCrds[0] = 300.0; maxCrds[1] = 12.0; maxCrds[2] = 300.0;
extensionMgr_Register = ExtensionManager_Register_New();
@@ -130,9 +124,6 @@ void GaussLayoutSingleCellSuite_Test1Par
void GaussLayoutSingleCellSuite_Test2ParticlesPerDim_3D( GaussLayoutSingleCellSuiteData* data ) {
unsigned nDims;
- unsigned gaussParticles[3];
- double minCrds[3];
- double maxCrds[3];
ExtensionManager_Register* extensionMgr_Register;
GaussParticleLayout* gaussParticleLayout;
SingleCellLayout* singleCellLayout;
@@ -151,10 +142,6 @@ void GaussLayoutSingleCellSuite_Test2Par
Stream_RedirectFile( stream, "2ParticlesPerDim_3D.dat" );
nDims = 3;
- gaussParticles[0] = 2; gaussParticles[1] = 1; gaussParticles[2] = 3;
- minCrds[0] = 0.0; minCrds[1] = 0.0; minCrds[2] = 0.0;
- maxCrds[0] = 300.0; maxCrds[1] = 12.0; maxCrds[2] = 300.0;
-
extensionMgr_Register = ExtensionManager_Register_New();
/* Configure the element-cell-layout */
@@ -194,9 +181,6 @@ void GaussLayoutSingleCellSuite_Test2Par
void GaussLayoutSingleCellSuite_Test3ParticlesPerDim_3D( GaussLayoutSingleCellSuiteData* data ) {
unsigned nDims;
- unsigned gaussParticles[3];
- double minCrds[3];
- double maxCrds[3];
ExtensionManager_Register* extensionMgr_Register;
GaussParticleLayout* gaussParticleLayout;
SingleCellLayout* singleCellLayout;
@@ -215,10 +199,6 @@ void GaussLayoutSingleCellSuite_Test3Par
Stream_RedirectFile( stream, "3ParticlesPerDim_3D.dat" );
nDims = 3;
- gaussParticles[0] = 2; gaussParticles[1] = 1; gaussParticles[2] = 3;
- minCrds[0] = 0.0; minCrds[1] = 0.0; minCrds[2] = 0.0;
- maxCrds[0] = 300.0; maxCrds[1] = 12.0; maxCrds[2] = 300.0;
-
extensionMgr_Register = ExtensionManager_Register_New();
/* Configure the element-cell-layout */
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/tests/ManualParticleLayoutSuite.cxx
--- a/Swarm/tests/ManualParticleLayoutSuite.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/tests/ManualParticleLayoutSuite.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -100,7 +100,6 @@ void ManualParticleLayoutSuite_TestManua
Dictionary* dictionary;
Dictionary_Entry_Value* particlePositionsList;
Dictionary_Entry_Value* particlePositionEntry;
- Dimension_Index dim;
ManualParticleLayout* particleLayout;
int procToWatch = data->nProcs > 1 ? 1 : 0;
Stream* stream;
@@ -151,7 +150,7 @@ void ManualParticleLayoutSuite_TestManua
particleLayout = ManualParticleLayout_New( "manualParticleLayout", NULL, GlobalCoordSystem, False,
0, 0.0, dictionary );
- swarm = Swarm_New( "manualParticleSwarm", NULL, elementCellLayout, particleLayout, dim, sizeof(Particle),
+ swarm = Swarm_New( "manualParticleSwarm", NULL, elementCellLayout, particleLayout, nDims, sizeof(Particle),
extensionMgr_Register, NULL, data->comm, NULL );
/* Build the swarm */
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/tests/ParticleCoordsSuite.cxx
--- a/Swarm/tests/ParticleCoordsSuite.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/tests/ParticleCoordsSuite.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -69,7 +69,6 @@ void ParticleCoordsSuite_TestLineParticl
Variable_Register* variable_Register;
Swarm* swarm;
Stream* stream;
- Dictionary* dictionary;
DomainContext* context;
int procToWatch = data->nProcs > 1 ? 1 : 0;
char input_file[PCU_PATH_MAX];
@@ -87,7 +86,6 @@ void ParticleCoordsSuite_TestLineParticl
cf = stgMainInitFromXML( input_file, data->comm, NULL );
stgMainBuildAndInitialise( cf );
context = (DomainContext*)LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
- dictionary = context->dictionary;
swarm = (Swarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
pcu_check_true( swarm );
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/tests/SpaceFillerParticleLayoutSuite.cxx
--- a/Swarm/tests/SpaceFillerParticleLayoutSuite.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/tests/SpaceFillerParticleLayoutSuite.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -94,7 +94,6 @@ void SpaceFillerParticleLayoutSuite_Test
ExtensionManager_Register* extensionMgr_Register;
SpaceFillerParticleLayout* particleLayout;
ElementCellLayout* elementCellLayout;
- Dimension_Index dim;
Mesh* mesh;
Swarm* swarm;
Stream* stream;
@@ -118,7 +117,7 @@ void SpaceFillerParticleLayoutSuite_Test
elementCellLayout = ElementCellLayout_New( "spaceFillerParticlElementCellLayout", NULL, mesh );
particleLayout = SpaceFillerParticleLayout_New( "spaceFillerParticleLayout", NULL, GlobalCoordSystem, False, SpaceFillerParticleLayout_Invalid, 20, nDims );
- swarm = Swarm_New( "testSpaceFIllerParticle", NULL, elementCellLayout, particleLayout, dim, sizeof(Particle),
+ swarm = Swarm_New( "testSpaceFIllerParticle", NULL, elementCellLayout, particleLayout, nDims, sizeof(Particle),
extensionMgr_Register, NULL, data->comm, NULL );
Stg_Component_Build( swarm, 0, False );
diff -r 2995217ae203 -r 78edc3a2ea06 Swarm/tests/SwarmDumpAndLoadSuite.cxx
--- a/Swarm/tests/SwarmDumpAndLoadSuite.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Swarm/tests/SwarmDumpAndLoadSuite.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -76,9 +76,7 @@ void SwarmDumpAndLoadSuite_TestSwarmDump
Swarm* swarmList[1];
SwarmDump* swarmDumper = NULL;
DomainContext* context;
- Dictionary* dictionary;
Stg_ComponentFactory* cf;
- Stream* stream;
FileParticleLayout* fileParticleLayout = NULL;
char input_file[PCU_PATH_MAX];
char output_file[PCU_PATH_MAX];
@@ -93,7 +91,7 @@ void SwarmDumpAndLoadSuite_TestSwarmDump
SwarmVariable* posVariable;
SwarmVariable* posVariableNew;
Variable_Register* varReg = Variable_Register_New();
- stream = Journal_Register( Info_Type, (Name)"SwarmDumpStream" );
+ Journal_Register( Info_Type, (Name)"SwarmDumpStream" );
Journal_Enable_TypedStream( DebugStream_Type, False );
Stream_EnableBranch( Swarm_Debug, False );
@@ -106,8 +104,6 @@ void SwarmDumpAndLoadSuite_TestSwarmDump
cf = stgMainInitFromXML( input_file, data->comm, NULL );
context = (DomainContext*) LiveComponentRegister_Get( cf->LCRegister, (Name)"context" );
- dictionary = context->dictionary;
-
swarm = (Swarm* ) LiveComponentRegister_Get( context->CF->LCRegister, (Name)"swarm" );
/* create a swarmVariable, as this will be required for the HDF5 checkpointing (else it doesn't know about the required variable to save) */
posVariable = Swarm_NewVectorVariable(swarm, "Position", GetOffsetOfMember( integrationPoint, xi ),Variable_DataType_Double, swarm->dim, "PositionX", "PositionY", "PositionZ" );
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/src/DofLayout.cxx
--- a/Utils/src/DofLayout.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/src/DofLayout.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -565,7 +565,9 @@ void DofLayout_AddAllFromVariableArray(
}
-void DofLayout_SaveAllVariablesToFiles( void* dofLayout, char* prefixString, unsigned rank ) {
+void DofLayout_SaveAllVariablesToFiles( void* dofLayout,
+ const char* prefixString,
+ unsigned rank ) {
DofLayout* self = (DofLayout*) dofLayout;
Index ownedVar_I, var_I;
Variable* variable = NULL;
@@ -597,7 +599,7 @@ void DofLayout_SaveAllVariablesToFiles(
}
-void DofLayout_LoadAllVariablesFromFiles( void* dofLayout, char* prefixString, unsigned rank ) {
+void DofLayout_LoadAllVariablesFromFiles( void* dofLayout, const char* prefixString, unsigned rank ) {
DofLayout* self = (DofLayout*) dofLayout;
Index ownedVar_I, var_I;
Variable* variable = NULL;
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/src/DofLayout.h
--- a/Utils/src/DofLayout.h Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/src/DofLayout.h Sun Oct 16 05:14:03 2011 -0700
@@ -203,10 +203,10 @@
void DofLayout_AddAllFromVariableArray( void* dofLayout, Variable_Index variableCount, Variable** variableArray ) ;
/** Saves all variables used by this dofLayout to files */
- void DofLayout_SaveAllVariablesToFiles( void* dofLayout, char* prefixString, unsigned rank );
+ void DofLayout_SaveAllVariablesToFiles( void* dofLayout, const char* prefixString, unsigned rank );
/** Saves all variables used by this dofLayout to files */
- void DofLayout_LoadAllVariablesFromFiles( void* dofLayout, char* prefixString, unsigned rank );
+ void DofLayout_LoadAllVariablesFromFiles( void* dofLayout, const char* prefixString, unsigned rank );
#endif /* __StgDomain_Utils_DofLayout_h__ */
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/src/OperatorFieldVariable.cxx
--- a/Utils/src/OperatorFieldVariable.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/src/OperatorFieldVariable.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -291,10 +291,9 @@ InterpolationResult OperatorFieldVariabl
double fieldValue0[ MAX_FIELD_COMPONENTS ];
double fieldValue1[ MAX_FIELD_COMPONENTS ];
InterpolationResult result0;
- InterpolationResult result1;
result0 = field0->_interpolateValueAt( field0, coord, fieldValue0 );
- result1 = field1->_interpolateValueAt( field1, coord, fieldValue1 );
+ field1->_interpolateValueAt( field1, coord, fieldValue1 );
Operator_CarryOutBinaryOperation( self->_operator, fieldValue0, fieldValue1, value );
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/src/RegularMeshUtils.cxx
--- a/Utils/src/RegularMeshUtils.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/src/RegularMeshUtils.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -581,7 +581,6 @@ IndexSet* RegularMeshUtils_CreateGlobalT
IndexSet* RegularMeshUtils_CreateGlobalBottomLeftBackSet( void* _mesh ) {
Mesh* mesh = (Mesh*)_mesh;
- Grid* grid;
unsigned nNodes;
IndexSet* set;
int nDims;
@@ -590,9 +589,6 @@ IndexSet* RegularMeshUtils_CreateGlobalB
assert( mesh );
assert( Mesh_GetDimSize( mesh ) >= 2 );
-
- grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
- ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
@@ -1049,13 +1045,11 @@ IndexSet* RegularMeshUtils_CreateGlobalB
unsigned nNodes;
IndexSet* set;
IJK ijk;
- int nDims;
unsigned n_i;
assert( mesh );
assert( Mesh_GetDimSize( mesh ) >= 2 );
- nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
@@ -1074,7 +1068,6 @@ IndexSet* RegularMeshUtils_CreateGlobalB
IndexSet* set;
IJK ijk;
Grid* grid;
- int nDims;
unsigned n_i;
assert( mesh );
@@ -1083,7 +1076,6 @@ IndexSet* RegularMeshUtils_CreateGlobalB
grid = *(Grid**)ExtensionManager_Get( mesh->info, mesh,
ExtensionManager_GetHandle( mesh->info, (Name)"vertexGrid" ) );
- nDims = Mesh_GetDimSize( mesh );
nNodes = Mesh_GetDomainSize( mesh, MT_VERTEX );
set = IndexSet_New( nNodes );
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/src/TimeIntegrand.cxx
--- a/Utils/src/TimeIntegrand.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/src/TimeIntegrand.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -466,7 +466,6 @@ void _TimeIntegrand_RewindToStartAndAppl
Variable* variable = self->variable;
Index component_I;
Index componentCount = *variable->dataTypeCounts;
- Bool successFlag = False;
/* First, go back to initial positions, so we can re-calculate the time derivative there */
for ( component_I = 0 ; component_I < componentCount ; component_I++ ) {
@@ -477,7 +476,7 @@ void _TimeIntegrand_RewindToStartAndAppl
/* Now recalculate time deriv at start positions, then do a full dt first order update from
* there */
TimeIntegrator_SetTime( self->timeIntegrator, startTime );
- successFlag = TimeIntegrand_CalculateTimeDeriv( self, array_I, timeDeriv );
+ TimeIntegrand_CalculateTimeDeriv( self, array_I, timeDeriv );
for ( component_I = 0 ; component_I < componentCount ; component_I++ )
arrayDataPtr[ component_I ] = startData[ component_I ] + dt * timeDeriv[ component_I ];
TimeIntegrand_Intermediate( self, array_I );
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/src/TimeIntegrator.cxx
--- a/Utils/src/TimeIntegrator.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/src/TimeIntegrator.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -648,7 +648,7 @@ Variable* Variable_NewFromOld( Variable*
self = Variable_New(
name,
- self->context,
+ oldVariable->context,
1,
dataOffsets,
oldVariable->dataTypes,
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/tests/CornerVCSuite.cxx
--- a/Utils/tests/CornerVCSuite.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/tests/CornerVCSuite.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -101,15 +101,15 @@ void CornerVCSuite_TestCornerVC( CornerV
double minCrds[3] = {0.0, 0.0, 0.0};
double maxCrds[3] = {1.0, 1.0, 1.0};
double* array[7];
- char* vcKey[] = { "CornerVC_BottomLeftFront", "CornerVC_BottomRightFront",
- "CornerVC_TopLeftFront", "CornerVC_TopRightFront",
- "CornerVC_BottomLeftBack", "CornerVC_BottomRightBack",
- "CornerVC_TopLeftBack", "CornerVC_TopRightBack" };
- char* vcKeyName[] = { "CornerVC_BottomLeftFrontName", "CornerVC_BottomRightFrontName",
- "CornerVC_TopLeftFrontName", "CornerVC_TopRightFrontName",
- "CornerVC_BottomLeftBackName", "CornerVC_BottomRightBackName",
- "CornerVC_TopLeftBackName", "CornerVC_TopRightBackName" };
- char* varName[] = {"x", "y", "z", "vx", "vy", "vz", "temp"};
+ const char* vcKey[] = { "CornerVC_BottomLeftFront", "CornerVC_BottomRightFront",
+ "CornerVC_TopLeftFront", "CornerVC_TopRightFront",
+ "CornerVC_BottomLeftBack", "CornerVC_BottomRightBack",
+ "CornerVC_TopLeftBack", "CornerVC_TopRightBack" };
+ const char*vcKeyName[] = { "CornerVC_BottomLeftFrontName", "CornerVC_BottomRightFrontName",
+ "CornerVC_TopLeftFrontName", "CornerVC_TopRightFrontName",
+ "CornerVC_BottomLeftBackName", "CornerVC_BottomRightBackName",
+ "CornerVC_TopLeftBackName", "CornerVC_TopRightBackName" };
+ const char* varName[] = {"x", "y", "z", "vx", "vy", "vz", "temp"};
char input_file[PCU_PATH_MAX];
char expected_file[PCU_PATH_MAX];
Mesh* mesh;
diff -r 2995217ae203 -r 78edc3a2ea06 Utils/tests/DofLayoutSuite.cxx
--- a/Utils/tests/DofLayoutSuite.cxx Tue Oct 04 01:58:30 2011 -0700
+++ b/Utils/tests/DofLayoutSuite.cxx Sun Oct 16 05:14:03 2011 -0700
@@ -72,11 +72,11 @@ void DofLayoutSuite_TestBasic( DofLayout
DofLayout* destDof;
Variable_Register* variableRegister;
Variable* var[6];
- char* varName[] = {"x", "y", "z", "vx", "vy", "vz"};
+ const char* varName[] = {"x", "y", "z", "vx", "vy", "vz"};
Index ii, dof_I, var_I;
Index arraySize = 27;
double* varArrays[6];
- int counts[27];
+ uint counts[27];
Stream_RedirectFile( stream, "testBasic.dat" );
@@ -238,7 +238,7 @@ void DofLayoutSuite_TestRemap( DofLayout
double* dummyPtr = &dummyVar;
Variable_Register* variableRegister;
Variable* var[6];
- char* varName[] = {"x", "y", "z", "vx", "vy", "vz"};
+ const char* varName[] = {"x", "y", "z", "vx", "vy", "vz"};
Index i, j;
Index arraySize = 1;
IndexMap* map;
@@ -307,7 +307,7 @@ void DofLayoutSuite_TestSaveAndLoad( Dof
DofLayout* dof;
Variable_Register* variableRegister;
Variable* var[6];
- char* varName[] = {"x", "y", "z", "vx", "vy", "vz"};
+ const char* varName[] = {"x", "y", "z", "vx", "vy", "vz"};
Index ii, var_I;
Index arraySize = 27;
double* varArrays[6];
More information about the CIG-COMMITS
mailing list