Changeset 291
- Timestamp:
- 05/07/09 08:32:18 (16 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ContourToMeshx/ContourToMeshx.cpp
r1 r291 31 31 for (i=0;i<numcontours;i++){ 32 32 #ifdef _DEBUG_ 33 printf(" Handling contour %i/%i\n",i,numcontours);33 printf("\nHandling contour %i/%i\n",i,numcontours); 34 34 #endif 35 35 contouri=*(contours+i); -
issm/trunk/src/c/shared/Exp/IsInPoly.cpp
r1 r291 6 6 #include "../../toolkits/toolkits.h" 7 7 #include "./exp.h" 8 #include "../shared.h" 9 8 10 9 11 10 12 int IsInPoly(Vec in,double* xc,double* yc,int numgrids,double* x,double* y,int nods, int edgevalue){ 11 13 12 int i ,j;14 int i; 13 15 double x0,y0; 14 16 double value; … … 16 18 /*Go through all grids of the mesh:*/ 17 19 for (i=MPI_Lowerrow(nods);i<MPI_Upperrow(nods);i++){ 18 /*pick up grid: */ 19 x0=x[i]; 20 y0=y[i]; 21 if (pnpoly(numgrids,xc,yc,x0,y0,edgevalue)){ 22 value=1; 20 21 //Get current value of value[i] -> do not change it if != 0 22 VecGetValues(in,1,&i,&value); 23 if (value){ 24 /*this grid already is inside one of the contours, continue*/ 25 continue; 23 26 } 24 else{ 25 value=0; 26 } 27 28 /*pick up grid (x[i],y[i]) and figure out if located inside contour (xc,yc)*/ 29 x0=x[i]; y0=y[i]; 30 value=pnpoly(numgrids,xc,yc,x0,y0,edgevalue); 27 31 VecSetValues(in,1,&i,&value,INSERT_VALUES); 28 32 }
Note:
See TracChangeset
for help on using the changeset viewer.