[cig-commits] r7983 - in long/3D/Gale/trunk: .
src/Gale/plugins/SurfaceProcess src/PICellerator/Utils/src
src/PICellerator/Weights/src
src/StgFEM/plugins/StandardConditionFunctions
src/Underworld/Rheology/src
src/Underworld/plugins/ExtractPetscObjects
walter at geodynamics.org
walter at geodynamics.org
Tue Sep 18 14:14:50 PDT 2007
Author: walter
Date: 2007-09-18 14:14:49 -0700 (Tue, 18 Sep 2007)
New Revision: 7983
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.c
long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.h
long/3D/Gale/trunk/src/PICellerator/Weights/src/DVCWeights.c
long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
long/3D/Gale/trunk/src/Underworld/Rheology/src/ConstitutiveMatrixCartesian.c
long/3D/Gale/trunk/src/Underworld/plugins/ExtractPetscObjects/ExtractPetscObjects.c
Log:
r1921 at earth: boo | 2007-09-18 14:09:45 -0700
Get rid of // comments
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1919
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1921
Modified: long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c 2007-09-18 01:52:50 UTC (rev 7982)
+++ long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c 2007-09-18 21:14:49 UTC (rev 7983)
@@ -220,6 +220,8 @@
UIntMap* map;
unsigned d_i, v_i;
+ unsigned decomp_limits[]={1,1,1};
+
assert( codelet );
assert( galeCtx );
@@ -257,6 +259,7 @@
/* Create the surface mesh. */
gen = CartesianGenerator_New( "" );
CartesianGenerator_SetDimSize( gen, nSurfDims );
+/* CartesianGenerator_SetTopologyParams( gen, surfaceSize, 0, decomp_limits, decomp_limits ); */
CartesianGenerator_SetTopologyParams( gen, surfaceSize, 0, NULL, NULL );
CartesianGenerator_SetGeometryParams( gen, surfaceMin, surfaceMax );
CartesianGenerator_SetShadowDepth( gen, spCtx->mesh->topo->shadowDepth );
Modified: long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.c 2007-09-18 01:52:50 UTC (rev 7982)
+++ long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.c 2007-09-18 21:14:49 UTC (rev 7983)
@@ -75,7 +75,7 @@
#include <PICellerator/Weights/Weights.h>
#include <PICellerator/MaterialPoints/MaterialPoints.h>
-//#include <PICellerator/PICellerator.h>
+/*#include <PICellerator/PICellerator.h>*/
#include "types.h"
#include "PCDVC.h"
@@ -297,7 +297,7 @@
Particle_Index matParticleToRemove_IndexOnCPU;
IntegrationPoint* intParticleToRemove;
MaterialPoint* matParticleToRemove;
- //Particle_Index intParticleToRemove_IndexWithinCell;/* the number of the particle within the cell */
+ /*Particle_Index intParticleToRemove_IndexWithinCell;*//* the number of the particle within the cell */
Particle_Index matParticleToRemove_IndexWithinCell;
IntegrationPoint* intSwarmLastParticle; /* The last particle in the swarm on the local CPU */
MaterialPoint* matSwarmLastParticle;
@@ -333,7 +333,7 @@
if the intSwarmLastParticle material ref does NOT point to the matSwarmLastParticle
then we might be in trouble...so test for this here */
refTestLastParticle = OneToOneMapper_GetMaterialRef(intSwarm->mapper, intSwarmLastParticle); /* so we can get the material point */
- //refToLastMatParticleFlag = 0;
+ /*refToLastMatParticleFlag = 0;*/
if(refTestLastParticle->particle_I != matLastParticle_IndexOnCPU){
printf("\e[31mThe last int particle does NOT point to the last mat particle..we need to handle this\n\n");
printf("\e[0;32m");
@@ -348,7 +348,7 @@
*/
}
if ( intParticleToRemove_IndexOnCPU != intLastParticle_IndexOnCPU ) {
- //printf("Deleting int particle number %d from cell %d local cell particle num = %d\n\n", intParticleToRemove_IndexOnCPU ,lCell_I, intParticleToRemove_IndexWithinCell);
+ /*printf("Deleting int particle number %d from cell %d local cell particle num = %d\n\n", intParticleToRemove_IndexOnCPU ,lCell_I, intParticleToRemove_IndexWithinCell); */
intLastParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( intSwarm, intSwarmLastParticle->owningCell, intLastParticle_IndexOnCPU);
@@ -365,9 +365,9 @@
}
}
intSwarm->particleLocalCount--;
- //Swarm_Realloc( intSwarm ); /* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
+ /*Swarm_Realloc( intSwarm ); *//* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
if ( matParticleToRemove_IndexOnCPU != matLastParticle_IndexOnCPU ) {
- //printf("Deleting mat particle number %d from cell %d local cell particle num = %d\n\n", matParticleToRemove_IndexOnCPU, matParticleToRemove->owningCell, matParticleToRemove_IndexWithinCell);
+ /*printf("Deleting mat particle number %d from cell %d local cell particle num = %d\n\n", matParticleToRemove_IndexOnCPU, matParticleToRemove->owningCell, matParticleToRemove_IndexWithinCell); */
matLastParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( matSwarm, matSwarmLastParticle->owningCell, matLastParticle_IndexOnCPU);
@@ -381,7 +381,7 @@
}
matSwarm->particleLocalCount--;
- //Swarm_Realloc( intSwarm ); /* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
+ /*Swarm_Realloc( intSwarm ); *//* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
}
/****************************************************************************************************
@@ -396,7 +396,7 @@
MaterialPointRef* ref_moved_particle;
MaterialPointRef* refToLastMatParticle;
int refToLastMatParticleFlag = 0;
- //Particle_Index intParticleToRemove_IndexOnCPU;/* the particle number within the swarm on the local CPU */
+ /*Particle_Index intParticleToRemove_IndexOnCPU;*//* the particle number within the swarm on the local CPU */
Particle_Index matParticleToRemove_IndexOnCPU;
IntegrationPoint* intParticleToRemove;
MaterialPoint* matParticleToRemove;
@@ -414,7 +414,7 @@
SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;
SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;
- //intParticleToRemove_IndexOnCPU = intSwarm->cellParticleTbl[ lCell_I ][ intParticleToRemove_IndexWithinCell ];
+ /*intParticleToRemove_IndexOnCPU = intSwarm->cellParticleTbl[ lCell_I ][ intParticleToRemove_IndexWithinCell ];*/
intParticleToRemove = (IntegrationPoint*)Swarm_ParticleAt( intSwarm, intParticleToRemove_IndexOnCPU);
intParticleToRemove_IndexWithinCell = Swarm_GetParticleIndexWithinCell( intSwarm, intParticleToRemove->owningCell, intParticleToRemove_IndexOnCPU);
@@ -442,7 +442,7 @@
if the intSwarmLastParticle material ref does NOT point to the matSwarmLastParticle
then we might be in trouble...so test for this here */
refTestLastParticle = OneToOneMapper_GetMaterialRef(intSwarm->mapper, intSwarmLastParticle); /* so we can get the material point */
- //refToLastMatParticleFlag = 0;
+ /*refToLastMatParticleFlag = 0;*/
if(refTestLastParticle->particle_I != matLastParticle_IndexOnCPU){
printf("\e[31mThe last int particle does NOT point to the last mat particle..we need to handle this\n\n");
printf("\e[0;32m");
@@ -458,7 +458,7 @@
}
if ( intParticleToRemove_IndexOnCPU != intLastParticle_IndexOnCPU ) {
- //printf("Deleting int particle number %d from cell %d local cell particle num = %d\n\n", intParticleToRemove_IndexOnCPU ,lCell_I, intParticleToRemove_IndexWithinCell);
+ /*printf("Deleting int particle number %d from cell %d local cell particle num = %d\n\n", intParticleToRemove_IndexOnCPU ,lCell_I, intParticleToRemove_IndexWithinCell);*/
intLastParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( intSwarm, intSwarmLastParticle->owningCell, intLastParticle_IndexOnCPU);
@@ -476,9 +476,9 @@
}
intSwarm->particleLocalCount--;
- //Swarm_Realloc( intSwarm ); /* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
+ /*Swarm_Realloc( intSwarm ); *//* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
if ( matParticleToRemove_IndexOnCPU != matLastParticle_IndexOnCPU ) {
- //printf("Deleting mat particle number %d from cell %d local cell particle num = %d\n\n", matParticleToRemove_IndexOnCPU, matParticleToRemove->owningCell, matParticleToRemove_IndexWithinCell);
+ /*printf("Deleting mat particle number %d from cell %d local cell particle num = %d\n\n", matParticleToRemove_IndexOnCPU, matParticleToRemove->owningCell, matParticleToRemove_IndexWithinCell); */
matLastParticle_IndexWithinCell = Swarm_GetParticleIndexWithinCell( matSwarm, matSwarmLastParticle->owningCell, matLastParticle_IndexOnCPU);
@@ -492,7 +492,7 @@
}
matSwarm->particleLocalCount--;
- //Swarm_Realloc( intSwarm ); /* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
+ /*Swarm_Realloc( intSwarm ); *//* do I really want to do this EVERY time I delete a particle? No I don't hmmm*/
}
void splitIntParticleByIndexWithinCell( IntegrationPointsSwarm* intSwarm, MaterialPointsSwarm* matSwarm, Cell_LocalIndex lCell_I, Particle_Index intParticleToSplit_IndexWithinCell, Coord xi ) {
@@ -502,21 +502,21 @@
IntegrationPoint* intNewParticle;
MaterialPoint* matNewParticle;
Particle_Index intNewParticle_IndexWithinCell;/* the number of the particle within the cell */
- //Particle_Index matNewParticle_IndexWithinCell;
+ /*Particle_Index matNewParticle_IndexWithinCell;*/
IntegrationPoint* intParticleToSplit;
MaterialPoint* matParticleToSplit;
- //Particle_Index intParticleToSplit_IndexWithinCell;
- //Particle_Index matParticleToSplit_IndexWithinCell;
+ /*Particle_Index intParticleToSplit_IndexWithinCell;*/
+ /*Particle_Index matParticleToSplit_IndexWithinCell;*/
Particle_Index matParticleToSplit_IndexOnCPU;
-// SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;
-// SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;
+ /* SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;*/
+ /* SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;*/
Coord newCoord;
-// Coord xi;
+ /* Coord xi;*/
FeMesh* mesh = (FeMesh*)((ElementCellLayout*)matSwarm->cellLayout)->mesh;
- //intParticleToSplit_IndexWithinCell = maxI;
+ /*intParticleToSplit_IndexWithinCell = maxI;*/
/* Add a new particle to end the end of each swarm */
/* this calls Swarm_Realloc -- don't like reallocing every time we create a particle
@@ -566,23 +566,23 @@
IntegrationPoint* intNewParticle;
MaterialPoint* matNewParticle;
Particle_Index intNewParticle_IndexWithinCell;/* the number of the particle within the cell */
- //Particle_Index matNewParticle_IndexWithinCell;
+ /*Particle_Index matNewParticle_IndexWithinCell;*/
IntegrationPoint* intParticleToSplit;
MaterialPoint* matParticleToSplit;
Particle_Index intParticleToSplit_IndexWithinCell;
- //Particle_Index matParticleToSplit_IndexWithinCell;
+ /*Particle_Index matParticleToSplit_IndexWithinCell;*/
Particle_Index matParticleToSplit_IndexOnCPU;
-// SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;
-// SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;
+ /* SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;*/
+ /* SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;*/
Coord newCoord;
-// Coord xi;
+ /* Coord xi;*/
Cell_LocalIndex lCell_I;
FeMesh* mesh = (FeMesh*)((ElementCellLayout*)matSwarm->cellLayout)->mesh;
- //intParticleToSplit_IndexWithinCell = maxI;
+ /*intParticleToSplit_IndexWithinCell = maxI;*/
/* Add a new particle to end the end of each swarm */
/* this calls Swarm_Realloc -- don't like reallocing every time we create a particle
@@ -652,17 +652,17 @@
IntegrationPointsSwarm* intSwarm = (IntegrationPointsSwarm*) _swarm;
MaterialPointsSwarm* matSwarm = (MaterialPointsSwarm*) self->materialPointsSwarm;
/* CoincidentMapper is a special case of the one to one mapper */
- //CoincidentMapper* mapper = (CoincidentMapper*)(intSwarm->mapper); /* need the mapper after-all to update the material ref */
+ /*CoincidentMapper* mapper = (CoincidentMapper*)(intSwarm->mapper);*/ /* need the mapper after-all to update the material ref */
Particle_InCellIndex cParticleCount;
IntegrationPoint** particle;
static int visited = 0 ;
- //static int deleted = 0 ;
+ /*static int deleted = 0 ;*/
double dx,dy,dz,da;
- static struct cell *cells;// the connected grid
- struct particle *pList;// particle List
- struct chain *bchain;//boundary chain
+ static struct cell *cells;/* the connected grid */
+ struct particle *pList;/* particle List */
+ struct chain *bchain;/*boundary chain */
int nump_orig,nump,numx,numy,numz;
- double BBXMIN = -1.0; // the ranges of the local coordinates of a FEM cell.
+ double BBXMIN = -1.0; /* the ranges of the local coordinates of a FEM cell. */
double BBXMAX = 1.0;
double BBYMIN = -1.0;
double BBYMAX = 1.0;
@@ -679,8 +679,8 @@
double upT = self->upperT;
int delete_flag, split_flag;
Particle_Index *splitList;
-// int deleteListStackPtr = -1;/* use a number to tell me how many particles we are going to delete: saves doing it some other less efficient way */
-// int splitListStackPtr = -1;
+ /* int deleteListStackPtr = -1;*//* use a number to tell me how many particles we are going to delete: saves doing it some other less efficient way */
+ /* int splitListStackPtr = -1;*/
int maxDeletions = self->maxDeletions;/* hard setting this till I get stuff from xml file */
int maxSplits = self->maxSplits;
int splitCount;
@@ -690,12 +690,12 @@
int matType;
Bool splitInInterfaceCells = self->splitInInterfaceCells;
-// SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;
-// SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;
-// Coord newCoord;
+ /* SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;*/
+ /* SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;*/
+ /* Coord newCoord;*/
Coord xi;
-// FiniteElement_Mesh* mesh = (FiniteElement_Mesh*)((ElementCellLayout*)matSwarm->cellLayout)->mesh;
+ /* FiniteElement_Mesh* mesh = (FiniteElement_Mesh*)((ElementCellLayout*)matSwarm->cellLayout)->mesh;*/
/* end decs needed for particle control */
/*************************************/
@@ -721,11 +721,11 @@
dz = (BBZMAX - BBZMIN)/numz;
da = dx*dy*dz;
- // Construct the grid for the Voronoi cells only once.
- // If we wanted to call this function again during a job with a different resolution
- // then we should destroy the grid once we have looped through the whole mesh.
- // I am assuming we are not going to do that for now.
- // Easy to implement this anyway, if needed.
+ /* Construct the grid for the Voronoi cells only once.*/
+ /* If we wanted to call this function again during a job with a different resolution*/
+ /* then we should destroy the grid once we have looped through the whole mesh.*/
+ /* I am assuming we are not going to do that for now.*/
+ /* Easy to implement this anyway, if needed.*/
if(!visited){
/* The PCDVC class should really be a class the next level up here */
/* We should be able to swap out the WeightsCalculator_CalculateAll instead of just setting
@@ -734,15 +734,15 @@
_DVCWeights_ConstructGrid(&cells,numz,numy,numx,BBXMIN,BBYMIN,BBZMIN,BBXMAX,BBYMAX,BBZMAX);
}
- // init the data structures
+ /* init the data structures*/
_DVCWeights_InitialiseStructs( &bchain, &pList, nump);
_DVCWeights_ResetGrid(&cells,numz*numy*numx);
particle = (IntegrationPoint**)malloc( (nump)*sizeof(IntegrationPoint*));
- // initialize the particle positions to be the local coordinates of the material swarm particles
- // I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material
- // positions each time step.
+ /* initialize the particle positions to be the local coordinates of the material swarm particles*/
+ /* I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material*/
+ /* positions each time step.*/
for(i=0;i<nump;i++){
particle[i] = (IntegrationPoint*) Swarm_ParticleInCellAt( intSwarm, lCell_I, i );
@@ -762,8 +762,8 @@
/* todo: put print statements into Journal statements */
split_flag = 0;
delete_flag = 0;
-// maxW = 0.0;
-// minW = 8.0;
+ /* maxW = 0.0;*/
+ /* minW = 8.0;*/
splitCount = 0;
deleteCount = 0;
/* shouldn't need maxI and minI now */
@@ -794,7 +794,7 @@
}
/* sort the deleteList by indexOnCPU so we can delete the list in reverse order */
qsort(deleteList, (deleteCount), sizeof(struct deleteParticle),compare_indexOnCPU);
- //deleteCount--; /* is going to be one size too large after the loop */
+ /*deleteCount--; *//* is going to be one size too large after the loop */
/*
for(i=0;i<deleteCount;i++){
printf("deleteCount = %d\n",deleteCount);
@@ -805,7 +805,7 @@
/* we now have our lists of particles to delete and split */
-// if(pList[maxI].w > upT*8/100.0){
+ /* if(pList[maxI].w > upT*8/100.0){*/
Count = maxSplits > splitCount ? splitCount : maxSplits;
for(i=0;i<Count;i++){
maxI = splitList[i];
@@ -821,7 +821,7 @@
}
-// if( (pList[minI].w < lowT*8/100.0) ){
+ /* if( (pList[minI].w < lowT*8/100.0) ){*/
Count = maxDeletions > deleteCount ? deleteCount : maxDeletions;
for(i=0;i<Count;i++){
@@ -834,8 +834,8 @@
} /* if(pList[minI].w < lowT*8/100.0) */
- //printf("pList[maxI].w = %lf particle num = %d : %d\n", pList[maxI].w, pList[maxI].index,maxI);
- //printf("pList[minI].w = %lf particle num = %d : %d\n", pList[minI].w, pList[minI].index,minI);
+ /*printf("pList[maxI].w = %lf particle num = %d : %d\n", pList[maxI].w, pList[maxI].index,maxI);*/
+ /*printf("pList[minI].w = %lf particle num = %d : %d\n", pList[minI].w, pList[minI].index,minI);*/
if(delete_flag || split_flag ){/* then we need to redo the Voronoi diagram */
for(k=0;k<nump_orig;k++){
free(bchain[k].new_claimed_cells);
@@ -847,28 +847,28 @@
if(nump < 3){
Journal_Firewall( 0 , Journal_Register(Error_Type, "PCDVC"), "Something went horribly wrong in %s: Problem has an under resolved cell (Cell Id = %d), check or tune your population control parameters\n", __func__, lCell_I );
}
- // init the data structures
+ /* init the data structures*/
_DVCWeights_InitialiseStructs( &bchain, &pList, nump);
- //_DVCWeights_ResetGrid(&cells,numz*numy*numx);
+ /*_DVCWeights_ResetGrid(&cells,numz*numy*numx);*/
particle = (IntegrationPoint**)malloc( (nump)*sizeof(IntegrationPoint*));
- // re-initialize the particle positions to be the local coordinates of the material swarm particles
+ /* re-initialize the particle positions to be the local coordinates of the material swarm particles*/
for(i=0;i<nump;i++){
particle[i] = (IntegrationPoint*) Swarm_ParticleInCellAt( intSwarm, lCell_I, i );
pList[i].x = particle[i]->xi[0];
pList[i].y = particle[i]->xi[1];
pList[i].z = particle[i]->xi[2];
- //pList[i].index = i; // to track which particle numbers we have after sorting this list */
+ /*pList[i].index = i; *//* to track which particle numbers we have after sorting this list */
}
- //printf("Population of matSwarm is %d\n",matSwarm->particleLocalCount);
- //printf("Population of intSwarm is %d\n",intSwarm->particleLocalCount);
+ /*printf("Population of matSwarm is %d\n",matSwarm->particleLocalCount);*/
+ /*printf("Population of intSwarm is %d\n",intSwarm->particleLocalCount);*/
_DVCWeights_ResetGrid(&cells,numz*numy*numx);
- //reset_grid(&cells,numz*numy*numx);/* adding this line fixed memory leak probs */
- //create_voronoi( &bchain, &pList, &cells, dx, dy, dz, nump, numx, numy, numz, BBXMIN, BBXMAX, BBYMIN, BBYMAX, BBZMIN, BBZMAX);
- //get_centroids( cells, pList,numz,numy,numx,nump,da);
+ /*reset_grid(&cells,numz*numy*numx);*//* adding this line fixed memory leak probs */
+ /*create_voronoi( &bchain, &pList, &cells, dx, dy, dz, nump, numx, numy, numz, BBXMIN, BBXMAX, BBYMIN, BBYMAX, BBZMIN, BBZMAX);*/
+ /*get_centroids( cells, pList,numz,numy,numx,nump,da);*/
_DVCWeights_CreateVoronoi( &bchain, &pList, &cells, dx, dy, dz, nump, numx, numy, numz, BBXMIN, BBXMAX, BBYMIN, BBYMAX, BBZMIN, BBZMAX);
_DVCWeights_GetCentroids( cells, pList,numz,numy,numx,nump,da);
@@ -879,8 +879,8 @@
/****************************/
/****************************/
- // We are setting the integration points to be the centroids of the Voronoi regions here and
- // the weight is the volume of each Voronoi region.
+ /* We are setting the integration points to be the centroids of the Voronoi regions here and*/
+ /* the weight is the volume of each Voronoi region.*/
for(i=0;i<nump;i++){
particle[i]->xi[0] = pList[i].cx;
@@ -908,18 +908,18 @@
IntegrationPointsSwarm* intSwarm = (IntegrationPointsSwarm*) _swarm;
MaterialPointsSwarm* matSwarm = (MaterialPointsSwarm*) self->materialPointsSwarm;
/* CoincidentMapper is a special case of the one to one mapper */
- //CoincidentMapper* mapper = (CoincidentMapper*)(intSwarm->mapper); /* need the mapper after-all to update the material ref */
+ /*CoincidentMapper* mapper = (CoincidentMapper*)(intSwarm->mapper);*/ /* need the mapper after-all to update the material ref */
Particle_InCellIndex cParticleCount;
IntegrationPoint** particle;
static int visited = 0 ;
- //static int deleted = 0 ;
+ /*static int deleted = 0 ;*/
double dx,dy,da;
- static struct cell2d *cells;// the connected grid
- struct particle2d *pList;// particle List
- struct chain *bchain;//boundary chain
+ static struct cell2d *cells;/* the connected grid */
+ struct particle2d *pList;/* particle List */
+ struct chain *bchain;/*boundary chain*/
int nump_orig,nump,numx,numy;
- double BBXMIN = -1.0; // the ranges of the local coordinates of a FEM cell.
+ double BBXMIN = -1.0; /* the ranges of the local coordinates of a FEM cell. */
double BBXMAX = 1.0;
double BBYMIN = -1.0;
double BBYMAX = 1.0;
@@ -942,13 +942,13 @@
int matTypeFirst;
int matType;
Bool splitInInterfaceCells = self->splitInInterfaceCells;
-// SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;
-// SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;
+ /* SizeT intparticleSize = intSwarm->particleExtensionMgr->finalSize;*/
+ /* SizeT matparticleSize = matSwarm->particleExtensionMgr->finalSize;*/
-// Coord newCoord;
+ /* Coord newCoord;*/
Coord xi;
-// FiniteElement_Mesh* mesh = (FiniteElement_Mesh*)((ElementCellLayout*)matSwarm->cellLayout)->mesh;
+ /* FiniteElement_Mesh* mesh = (FiniteElement_Mesh*)((ElementCellLayout*)matSwarm->cellLayout)->mesh;*/
/* end decs needed for particle control */
/*************************************/
@@ -970,11 +970,11 @@
dy = (BBYMAX - BBYMIN)/numy;
da = dx*dy;
- // Construct the grid for the Voronoi cells only once.
- // If we wanted to call this function again during a job with a different resolution
- // then we should destroy the grid once we have looped through the whole mesh.
- // I am assuming we are not going to do that for now.
- // Easy to implement this anyway, if needed.
+ /* Construct the grid for the Voronoi cells only once.*/
+ /* If we wanted to call this function again during a job with a different resolution*/
+ /* then we should destroy the grid once we have looped through the whole mesh.*/
+ /* I am assuming we are not going to do that for now.*/
+ /* Easy to implement this anyway, if needed.*/
if(!visited){
/* The PCDVC class should really be a class the next level up here */
/* We should be able to swap out the WeightsCalculator_CalculateAll instead of just setting
@@ -984,15 +984,15 @@
}
- // init the data structures
+ /* init the data structures*/
_DVCWeights_InitialiseStructs2D( &bchain, &pList, nump);
_DVCWeights_ResetGrid2D(&cells,numy*numx);
particle = (IntegrationPoint**)malloc((nump)*sizeof(IntegrationPoint*));
- // initialize the particle positions to be the local coordinates of the material swarm particles
- // I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material
- // positions each time step.
+ /* initialize the particle positions to be the local coordinates of the material swarm particles*/
+ /* I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material*/
+ /* positions each time step.*/
for(i=0;i<nump;i++){
particle[i] = (IntegrationPoint*) Swarm_ParticleInCellAt( intSwarm, lCell_I, i );
@@ -1027,7 +1027,7 @@
if(!splitInInterfaceCells){
maxSplits = 0;
}
- //printf("------- FOUND an Interface Cell!! --------------\n");
+ /*printf("------- FOUND an Interface Cell!! --------------\n");*/
break;
}
}
@@ -1042,7 +1042,7 @@
}
/* sort the deleteList by indexOnCPU so we can delete the list in reverse order */
qsort(deleteList, (deleteCount), sizeof(struct deleteParticle),compare_indexOnCPU);
- //deleteCount--; /* is going to be one size too large after the loop */
+ /*deleteCount--; *//* is going to be one size too large after the loop */
/*
for(i=0;i<deleteCount;i++){
printf("deleteCount = %d\n",deleteCount);
@@ -1058,7 +1058,7 @@
/* now get local coords from centroid of the cell that particleToSplit lives in */
xi[0] = pList[maxI].cx;
xi[1] = pList[maxI].cy;
- //xi[2] = pList[maxI].cz;
+ /*xi[2] = pList[maxI].cz;*/
split_flag = 1;
nump++;
@@ -1080,8 +1080,8 @@
} /* if(pList[minI].w < lowT*8/100.0) */
- //printf("pList[maxI].w = %lf particle num = %d : %d\n", pList[maxI].w, pList[maxI].index,maxI);
- //printf("pList[minI].w = %lf particle num = %d : %d\n", pList[minI].w, pList[minI].index,minI);
+ /*printf("pList[maxI].w = %lf particle num = %d : %d\n", pList[maxI].w, pList[maxI].index,maxI);*/
+ /*printf("pList[minI].w = %lf particle num = %d : %d\n", pList[minI].w, pList[minI].index,minI);*/
if(delete_flag || split_flag ){/* then we need to redo the Voronoi diagram */
for(k=0;k<nump_orig;k++){
free(bchain[k].new_claimed_cells);
@@ -1094,25 +1094,25 @@
Journal_Firewall( 0 , Journal_Register(Error_Type, "PCDVC"), "Something went horribly wrong in %s: Problem has an under resolved cell (Cell Id = %d), check or tune your population control parameters\n", __func__, lCell_I );
}
particle = (IntegrationPoint**)malloc((nump)*sizeof(IntegrationPoint*));
- // init the data structures
+ /* init the data structures*/
_DVCWeights_InitialiseStructs2D( &bchain, &pList, nump);
- // re-initialize the particle positions to be the local coordinates of the material swarm particles
+ /* re-initialize the particle positions to be the local coordinates of the material swarm particles*/
for(i=0;i<nump;i++){
particle[i] = (IntegrationPoint*) Swarm_ParticleInCellAt( intSwarm, lCell_I, i );
pList[i].x = particle[i]->xi[0];
pList[i].y = particle[i]->xi[1];
- //pList[i].z = particle[i]->xi[2];
- //pList[i].index = i; // to track which particle numbers we have after sorting this list */
+ /*pList[i].z = particle[i]->xi[2];*/
+ /*pList[i].index = i; *//* to track which particle numbers we have after sorting this list */
}
- //printf("Population of matSwarm is %d\n",matSwarm->particleLocalCount);
- //printf("Population of intSwarm is %d\n",intSwarm->particleLocalCount);
+ /*printf("Population of matSwarm is %d\n",matSwarm->particleLocalCount);*/
+ /*printf("Population of intSwarm is %d\n",intSwarm->particleLocalCount);*/
_DVCWeights_ResetGrid2D(&cells,numy*numx);
- //reset_grid(&cells,numz*numy*numx);/* adding this line fixed memory leak probs */
- //create_voronoi( &bchain, &pList, &cells, dx, dy, dz, nump, numx, numy, numz, BBXMIN, BBXMAX, BBYMIN, BBYMAX, BBZMIN, BBZMAX);
- //get_centroids( cells, pList,numz,numy,numx,nump,da);
+ /*reset_grid(&cells,numz*numy*numx);*//* adding this line fixed memory leak probs */
+ /*create_voronoi( &bchain, &pList, &cells, dx, dy, dz, nump, numx, numy, numz, BBXMIN, BBXMAX, BBYMIN, BBYMAX, BBZMIN, BBZMAX); */
+ /*get_centroids( cells, pList,numz,numy,numx,nump,da);*/
_DVCWeights_CreateVoronoi2D( &bchain, &pList, &cells, dx, dy, nump, numx, numy, BBXMIN, BBXMAX, BBYMIN, BBYMAX);
_DVCWeights_GetCentroids2D( cells, pList,numy,numx,nump,da);
@@ -1124,8 +1124,8 @@
/****************************/
- // We are setting the integration points to be the centroids of the Voronoi regions here and
- // the weight is the volume of each Voronoi region.
+ /* We are setting the integration points to be the centroids of the Voronoi regions here and*/
+ /* the weight is the volume of each Voronoi region.*/
for(i=0;i<nump;i++){
particle[i]->xi[0] = pList[i].cx;
Modified: long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.h
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.h 2007-09-18 01:52:50 UTC (rev 7982)
+++ long/3D/Gale/trunk/src/PICellerator/Utils/src/PCDVC.h 2007-09-18 21:14:49 UTC (rev 7983)
@@ -72,13 +72,13 @@
extern const Type PCDVC_Type;
/* PCDVC information */
- // #define __PCDVC
+/* #define __PCDVC */
/* Who's my daddy */
- // __DVCWeights
+/* __DVCWeights */
/* My Data structures */
- // MaterialPointsSwarm* materialPointsSwarm;
- // int upT;
- // int lowT;
+/* MaterialPointsSwarm* materialPointsSwarm;
+ int upT;
+ int lowT; */
#define __PCDVC __DVCWeights MaterialPointsSwarm* materialPointsSwarm; double upperT; double lowerT; Bool splitInInterfaceCells; int maxDeletions; int maxSplits;
Modified: long/3D/Gale/trunk/src/PICellerator/Weights/src/DVCWeights.c
===================================================================
--- long/3D/Gale/trunk/src/PICellerator/Weights/src/DVCWeights.c 2007-09-18 01:52:50 UTC (rev 7982)
+++ long/3D/Gale/trunk/src/PICellerator/Weights/src/DVCWeights.c 2007-09-18 21:14:49 UTC (rev 7983)
@@ -244,7 +244,7 @@
pList[ cells[i].p ].cx += cells[i].x;
pList[ cells[i].p ].cy += cells[i].y;
pList[ cells[i].p ].cz += cells[i].z;
- count[ cells[i].p ]++;//for total volume of a cell
+ count[ cells[i].p ]++;/*for total volume of a cell */
}
for(i=0;i<nump;i++){
pList[ i ].w = count[i]*vol;
@@ -272,7 +272,7 @@
for(i=0;i<n*m;i++){
pList[ cells[i].p ].cx += cells[i].x;
pList[ cells[i].p ].cy += cells[i].y;
- count[ cells[i].p ]++;//for total volume of a cell
+ count[ cells[i].p ]++;/*for total volume of a cell */
}
for(i=0;i<nump;i++){
pList[ i ].w = count[i]*vol;
@@ -298,8 +298,8 @@
for(i=0;i<bchain->sizeofboundary;i++){
- cell_num0 = bchain->new_bound_cells[i];// cell number we are trying to claim
- if(cells[cell_num0].p == -1){//if cell unowned then claim cell
+ cell_num0 = bchain->new_bound_cells[i];/* cell number we are trying to claim */
+ if(cells[cell_num0].p == -1){/*if cell unowned then claim cell */
/* This is the bit needed for mallocing */
/* do a test here to see if we need to realloc bchain->new_claimed_cells and bchain->new_bound_cells */
if( count > bchain->new_claimed_cells_malloced - 1 ){
@@ -314,11 +314,11 @@
bchain->new_claimed_cells[count] = cell_num0;
bchain->numclaimed++;
count++;
- cells[cell_num0].p = p_i;// this cell is now owned by particle p_i
+ cells[cell_num0].p = p_i;/* this cell is now owned by particle p_i */
}
else{
if(cells[cell_num0].p != p_i){
- //we need a contest between particles for the cell.
+ /*we need a contest between particles for the cell. */
x2 = (*pList)[p_i].x;
y2 = (*pList)[p_i].y;
z2 = (*pList)[p_i].z;
@@ -335,12 +335,12 @@
bchain->new_claimed_cells[count] = cell_num0;
bchain->numclaimed++;
count++;
- cells[cell_num0].p = p_i;// this cell is now owned by particle p_i
+ cells[cell_num0].p = p_i;/* this cell is now owned by particle p_i */
}
- }//if
- }//else
+ }/*if */
+ }/*else */
}
- bchain->new_claimed_cells[count] = -1;// end of list
+ bchain->new_claimed_cells[count] = -1;/* end of list */
}
/** Claim a cell for a particle in the list in 2D*/
@@ -357,8 +357,8 @@
for(i=0;i<bchain->sizeofboundary;i++){
- cell_num0 = bchain->new_bound_cells[i];// cell number we are trying to claim
- if(cells[cell_num0].p == -1){//if cell unowned then claim cell
+ cell_num0 = bchain->new_bound_cells[i];/* cell number we are trying to claim */
+ if(cells[cell_num0].p == -1){/*if cell unowned then claim cell */
/* This is the bit needed for mallocing */
/* do a test here to see if we need to realloc bchain->new_claimed_cells and bchain->new_bound_cells */
if( count > bchain->new_claimed_cells_malloced - 1 ){
@@ -373,11 +373,11 @@
bchain->new_claimed_cells[count] = cell_num0;
bchain->numclaimed++;
count++;
- cells[cell_num0].p = p_i;// this cell is now owned by particle p_i
+ cells[cell_num0].p = p_i;/* this cell is now owned by particle p_i */
}
else{
if(cells[cell_num0].p != p_i){
- //we need a contest between particles for the cell.
+ /*we need a contest between particles for the cell. */
x2 = (*pList)[p_i].x;
y2 = (*pList)[p_i].y;
x1 = (*pList)[cells[cell_num0].p].x;
@@ -391,12 +391,12 @@
bchain->new_claimed_cells[count] = cell_num0;
bchain->numclaimed++;
count++;
- cells[cell_num0].p = p_i;// this cell is now owned by particle p_i
+ cells[cell_num0].p = p_i;/* this cell is now owned by particle p_i */
}
- }//if
- }//else
+ }/*if */
+ }/*else */
}
- bchain->new_claimed_cells[count] = -1;// end of list
+ bchain->new_claimed_cells[count] = -1;/* end of list */
}
@@ -441,9 +441,9 @@
for(k=0;k<6;k++){
cell_num1 = cell_num[k];
- // if cell does not already belong to the particle and hasn't been
- // marked as being done then add it to new boundary array and mark it
- // as done
+ /* if cell does not already belong to the particle and hasn't been */
+ /* marked as being done then add it to new boundary array and mark it */
+ /* as done */
if(cell_num1 != -2){
if(cells[cell_num1].p != p_i && cells[cell_num1].done != 1){
/* This is the bit needed for mallocing */
@@ -461,11 +461,11 @@
bchain->sizeofboundary++;
count++;
cells[cell_num1].done = 1;
- }//if
- }//if cell_num1
- }//for k
- }//for
- // reset the done flags back to zero for next time
+ }/*if */
+ }/*if cell_num1 */
+ }/*for k */
+ }/*for */
+ /* reset the done flags back to zero for next time */
for(i=0;i<count;i++){
cells[ bchain->new_bound_cells[i] ].done = 0;
}
@@ -492,9 +492,9 @@
for(k=0;k<4;k++){
cell_num1 = cell_num[k];
- // if cell does not already belong to the particle and hasn't been
- // marked as being done then add it to new boundary array and mark it
- // as done
+ /* if cell does not already belong to the particle and hasn't been */
+ /* marked as being done then add it to new boundary array and mark it */
+ /* as done */
if(cell_num1 != -2){
if(cells[cell_num1].p != p_i && cells[cell_num1].done != 1){
/* This is the bit needed for mallocing */
@@ -512,11 +512,11 @@
bchain->sizeofboundary++;
count++;
cells[cell_num1].done = 1;
- }//if
- }//if cell_num1
- }//for k
- }//for
- // reset the done flags back to zero for next time
+ }/*if */
+ }/*if cell_num1 */
+ }/*for k */
+ }/*for */
+ /* reset the done flags back to zero for next time */
for(i=0;i<count;i++){
cells[ bchain->new_bound_cells[i] ].done = 0;
}
@@ -573,9 +573,9 @@
cells[i+l*j+k*l*m].E = i+l*j+1+k*l*m;
cells[i+l*j+1+k*l*m].W = i+l*j+k*l*m;
}
- }//x
- }//y
- }//z
+ }/*x */
+ }/*y */
+ }/*z */
*cell_list = cells;
}
@@ -646,12 +646,12 @@
void _DVCWeights_InitialiseStructs( struct chain **bchain, struct particle **pList, int nump){
int i;
- // init the data structures
+ /* init the data structures */
if( (*bchain = (struct chain *)malloc( nump*sizeof(struct chain ) )) == 0){
printf("No memory for bchain\nCannot continue.\n");
exit(1);
}
- // note that doing bchain[i]->new... doesn't work
+ /* note that doing bchain[i]->new... doesn't work */
for(i=0;i<nump;i++){
(*bchain)[i].new_claimed_cells = (int *)malloc(INC*sizeof(int));
(*bchain)[i].new_claimed_cells_malloced = INC;
@@ -668,11 +668,11 @@
void _DVCWeights_InitialiseStructs2D( struct chain **bchain, struct particle2d **pList, int nump){
int i;
- // init the data structures
+ /* init the data structures */
if( (*bchain = (struct chain *)malloc( nump*sizeof(struct chain ) )) == 0){
Journal_Firewall( 0 , Journal_Register(Error_Type, "DVC_Weights"),"No memory for bchain in '%s'\nCannot continue.\n", __func__);
}
- //
+
for(i=0;i<nump;i++){
(*bchain)[i].new_claimed_cells = (int *)malloc(INC*sizeof(int));
(*bchain)[i].new_claimed_cells_malloced = INC;
@@ -707,19 +707,19 @@
if (k == numx){ k--; }
if (j == numy) { j--; }
if (l == numz) { l--; }
- (*cells)[k+j*numx+l*numx*numy].p = i; //particle number i
- (*bchain)[i].numclaimed = 1;// number of most recently claimed cells
+ (*cells)[k+j*numx+l*numx*numy].p = i; /*particle number i */
+ (*bchain)[i].numclaimed = 1;/* number of most recently claimed cells */
(*bchain)[i].sizeofboundary = 0;
- (*bchain)[i].totalclaimed = 1;// total of claimed cells so far.
+ (*bchain)[i].totalclaimed = 1;/* total of claimed cells so far. */
(*bchain)[i].done = 0;
- (*bchain)[i].index = k+j*numx+l*numx*numy;// ith particle is in cell # k+j*numx
+ (*bchain)[i].index = k+j*numx+l*numx*numy;/* ith particle is in cell # k+j*numx */
(*bchain)[i].new_claimed_cells[0] = k+j*numx+l*numx*numy;
- // ith particle has just claimed cell number k+j*numx+l*numx*numy
- (*bchain)[i].new_claimed_cells[1] = -1;// denotes end of claimed_cells list
- // when we have finished claiming cells we call this function.
+ /* ith particle has just claimed cell number k+j*numx+l*numx*numy */
+ (*bchain)[i].new_claimed_cells[1] = -1;/* denotes end of claimed_cells list */
+ /* when we have finished claiming cells we call this function. */
_DVCWeights_UpdateBchain(bchain,cells,i);
}
- count = i;// number of particles
+ count = i;/* number of particles */
claimed = 1;
while(claimed != 0){
@@ -729,7 +729,7 @@
claimed += (*bchain)[i].numclaimed;
_DVCWeights_UpdateBchain(bchain,cells,i);
}
- }//while
+ }/*while */
}
/** Create the Voronoi diagram by growing the voronoi cells from the particle locations.
@@ -756,18 +756,18 @@
j--;
}
- (*cells)[k+j*numx].p = i; //particle number i
+ (*cells)[k+j*numx].p = i; /*particle number i */
- (*bchain)[i].numclaimed = 1;// number of most recently claimed cells
+ (*bchain)[i].numclaimed = 1;/* number of most recently claimed cells */
(*bchain)[i].sizeofboundary = 0;
- (*bchain)[i].totalclaimed = 1;// total of claimed cells so far.
+ (*bchain)[i].totalclaimed = 1;/* total of claimed cells so far. */
(*bchain)[i].done = 0;
- (*bchain)[i].index = k+j*numx;// ith particle is in cell # k+j*numx
- (*bchain)[i].new_claimed_cells[0] = k+j*numx; // ith particle has just claimed cell number k+j*numx
- (*bchain)[i].new_claimed_cells[1] = -1;// denotes end of claimed_cells list
- // when we have finished claiming cells we call this function.
+ (*bchain)[i].index = k+j*numx;/* ith particle is in cell # k+j*numx */
+ (*bchain)[i].new_claimed_cells[0] = k+j*numx; /* ith particle has just claimed cell number k+j*numx */
+ (*bchain)[i].new_claimed_cells[1] = -1;/* denotes end of claimed_cells list */
+ /* when we have finished claiming cells we call this function. */
_DVCWeights_UpdateBchain2D( bchain, cells, i);
- }//nump
+ }/*nump */
claimed = 1;
@@ -778,7 +778,7 @@
claimed += (*bchain)[i].numclaimed;
_DVCWeights_UpdateBchain2D( bchain, cells, i);
}
- }//while
+ }/*while */
}
/* Calculate the integration weighting for each particle by contructing
a voronoi diagram in an element in 3D*/
@@ -789,11 +789,11 @@
IntegrationPoint** particle;
static int visited = 0 ;
double dx,dy,dz,da;
- static struct cell *cells;// the connected grid
- struct particle *pList;// particle List
- struct chain *bchain;//boundary chain
+ static struct cell *cells;/* the connected grid */
+ struct particle *pList;/* particle List */
+ struct chain *bchain;/*boundary chain */
int nump,numx,numy,numz;
- double BBXMIN = -1.0; // the ranges of the local coordinates of a FEM cell.
+ double BBXMIN = -1.0; /* the ranges of the local coordinates of a FEM cell. */
double BBXMAX = 1.0;
double BBYMIN = -1.0;
double BBYMAX = 1.0;
@@ -814,11 +814,11 @@
dz = (BBZMAX - BBZMIN)/numz;
da = dx*dy*dz;
- // Construct the grid for the Voronoi cells only once.
- // If we wanted to call this function again during a job with a different resolution
- // then we should destroy the grid once we have looped through the whole mesh.
- // I am assuming we are not going to do that for now.
- // Easy to implement this anyway, if needed.
+ /* Construct the grid for the Voronoi cells only once. */
+ /* If we wanted to call this function again during a job with a different resolution */
+ /* then we should destroy the grid once we have looped through the whole mesh. */
+ /* I am assuming we are not going to do that for now. */
+ /* Easy to implement this anyway, if needed. */
if(!visited){
/* The DVCWeights class should really be a class the next level up here */
/* We should be able to swap out the WeightsCalculator_CalculateAll instead of just setting
@@ -828,15 +828,15 @@
}
- // init the data structures
+ /* init the data structures */
_DVCWeights_InitialiseStructs( &bchain, &pList, nump);
_DVCWeights_ResetGrid(&cells,numz*numy*numx);
particle = (IntegrationPoint**)malloc(nump*sizeof(IntegrationPoint*));
- // initialize the particle positions to be the local coordinates of the material swarm particles
- // I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material
- // positions each time step.
+ /* initialize the particle positions to be the local coordinates of the material swarm particles */
+ /* I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material */
+ /* positions each time step. */
for(i=0;i<nump;i++){
particle[i] = (IntegrationPoint*) Swarm_ParticleInCellAt( swarm, lCell_I, i );
@@ -847,8 +847,8 @@
}
_DVCWeights_CreateVoronoi( &bchain, &pList, &cells, dx, dy, dz, nump, numx, numy, numz, BBXMIN, BBXMAX, BBYMIN, BBYMAX, BBZMIN, BBZMAX);
_DVCWeights_GetCentroids( cells, pList,numz,numy,numx,nump,da);
- // We are setting the integration points to be the centroids of the Voronoi regions here and
- // the weight is the volume of each Voronoi region.
+ /* We are setting the integration points to be the centroids of the Voronoi regions here and */
+ /* the weight is the volume of each Voronoi region. */
for(i=0;i<nump;i++){
particle[i]->xi[0] = pList[i].cx;
@@ -875,11 +875,11 @@
IntegrationPoint** particle;
static int visited = 0 ;
double dx,dy,da;
- static struct cell2d *cells;// the connected grid
- struct particle2d *pList;// particle List
- struct chain *bchain;//boundary chain
+ static struct cell2d *cells;/* the connected grid */
+ struct particle2d *pList;/* particle List */
+ struct chain *bchain;/*boundary chain */
int nump,numx,numy;
- double BBXMIN = -1.0; // the ranges of the local coordinates of a FEM cell.
+ double BBXMIN = -1.0; /* the ranges of the local coordinates of a FEM cell. */
double BBXMAX = 1.0;
double BBYMIN = -1.0;
double BBYMAX = 1.0;
@@ -896,11 +896,11 @@
dy = (BBYMAX - BBYMIN)/numy;
da = dx*dy;
- // Construct the grid for the Voronoi cells only once.
- // If we wanted to call this function again during a job with a different resolution
- // then we should destroy the grid once we have looped through the whole mesh.
- // I am assuming we are not going to do that for now.
- // Easy to implement this anyway, if needed.
+ /* Construct the grid for the Voronoi cells only once. */
+ /* If we wanted to call this function again during a job with a different resolution */
+ /* then we should destroy the grid once we have looped through the whole mesh. */
+ /* I am assuming we are not going to do that for now. */
+ /* Easy to implement this anyway, if needed. */
if(!visited){
/* The DVCWeights class should really be a class the next level up here */
/* We should be able to swap out the WeightsCalculator_CalculateAll instead of just setting
@@ -910,15 +910,15 @@
}
- // init the data structures
+ /* init the data structures */
_DVCWeights_InitialiseStructs2D( &bchain, &pList, nump);
_DVCWeights_ResetGrid2D(&cells,numy*numx);
particle = (IntegrationPoint**)malloc(nump*sizeof(IntegrationPoint*));
- // initialize the particle positions to be the local coordinates of the material swarm particles
- // I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material
- // positions each time step.
+ /* initialize the particle positions to be the local coordinates of the material swarm particles */
+ /* I am assuming the xi's (local coords) are precalculated somewhere and get reset based on material */
+ /* positions each time step. */
for(i=0;i<nump;i++){
particle[i] = (IntegrationPoint*) Swarm_ParticleInCellAt( swarm, lCell_I, i );
@@ -928,8 +928,8 @@
}
_DVCWeights_CreateVoronoi2D( &bchain, &pList, &cells, dx, dy, nump, numx, numy, BBXMIN, BBXMAX, BBYMIN, BBYMAX);
_DVCWeights_GetCentroids2D( cells, pList,numy,numx,nump,da);
- // We are setting the integration points to be the centroids of the Voronoi regions here and
- // the weight is the volume of each Voronoi region.
+ /* We are setting the integration points to be the centroids of the Voronoi regions here and */
+ /* the weight is the volume of each Voronoi region. */
for(i=0;i<nump;i++){
particle[i]->xi[0] = pList[i].cx;
Modified: long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c 2007-09-18 01:52:50 UTC (rev 7982)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c 2007-09-18 21:14:49 UTC (rev 7983)
@@ -769,7 +769,7 @@
u0 = pow( lambda , 7.0/3.0 )/ pow(1 + lambda*lambda*lambda*lambda, 2.0/3.0) * pow(0.5*RaT/sqrt(M_PI) , 2.0/3.0);
/* Vertical velocity of the upwelling and downwellings - Modified from Van Keken to match Turcotte and Shubert */
- v0 = u0; //lambda;
+ v0 = u0; /*lambda; */
/* Total rate of heat flow out of the top of the cell per unit distance along the axis of the roll - Equation A3 */
Q = 2.0 * sqrt(M_1_PI * lambda/u0);
Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/ConstitutiveMatrixCartesian.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/ConstitutiveMatrixCartesian.c 2007-09-18 01:52:50 UTC (rev 7982)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/ConstitutiveMatrixCartesian.c 2007-09-18 21:14:49 UTC (rev 7983)
@@ -286,7 +286,7 @@
particle->xi, dim, &detJac, GNx );
/* Assemble Constitutive Matrix */
- // TODO : pass in the context here?
+ /* TODO : pass in the context here? */
ConstitutiveMatrix_Assemble( constitutiveMatrix, lElement_I, particle );
/* Turn D Matrix into D~ Matrix by multiplying in the weight and the detJac (this is a shortcut for speed) */
Modified: long/3D/Gale/trunk/src/Underworld/plugins/ExtractPetscObjects/ExtractPetscObjects.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/ExtractPetscObjects/ExtractPetscObjects.c 2007-09-18 01:52:50 UTC (rev 7982)
+++ long/3D/Gale/trunk/src/Underworld/plugins/ExtractPetscObjects/ExtractPetscObjects.c 2007-09-18 21:14:49 UTC (rev 7983)
@@ -143,7 +143,7 @@
step = context->timeStep;
comm = context->communicator;
- // get filename from problem description
+ /* get filename from problem description */
probName = strdup( Dictionary_Entry_Value_AsString( Dictionary_Get( context->dictionary, "ProbDescription" ) ));
printf("probName = %s \n", probName );
@@ -164,7 +164,7 @@
MatView( A, mat_view_file );
PetscViewerDestroy( mat_view_file );
- //Matrix_Dump( stokesSLE->kStiffMat, mat_name );
+ /*Matrix_Dump( stokesSLE->kStiffMat, mat_name ); */
}
/* Write G to file */
if( stokesSLE->gStiffMat != NULL ) {
@@ -263,8 +263,8 @@
fclose( info );
}
-// b = (Vec)stokesSLE->pSolnVec->vector;
-// VecView( b, PETSC_VIEWER_STDOUT_WORLD );
+ /* b = (Vec)stokesSLE->pSolnVec->vector; */
+ /* VecView( b, PETSC_VIEWER_STDOUT_WORLD ); */
}
More information about the cig-commits
mailing list