Changeset 2591
- Timestamp:
- 11/02/09 14:36:31 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ContourToMeshx/ContourToMeshx.cpp
r1904 r2591 1 1 /*! \file ContourToMeshx.c 2 2 */ 3 4 #ifdef HAVE_CONFIG_H 5 #include "config.h" 6 #else 7 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 8 #endif 9 3 10 4 11 #include "./ContourToMeshx.h" … … 14 21 15 22 /*Contour:*/ 16 Contour* contouri=NULL;17 int numgrids;18 double* xc=NULL;19 double* yc=NULL;20 23 double* in_nod_serial; 21 24 double value; 25 26 /*threading: */ 27 ContourToMeshxThreadStruct gate; 28 int num=1; 29 #ifdef _MULTITHREADING_ 30 num=_NUMTHREADS_; 31 #endif 32 22 33 23 34 /*output: */ … … 28 39 in_elem=NewVec(nel); 29 40 30 /*Loop through all contours: */ 31 for (i=0;i<numcontours;i++){ 32 #ifdef _ISSM_DEBUG_ 33 printf("\nHandling contour %i/%i\n",i,numcontours); 34 #endif 35 contouri=*(contours+i); 36 numgrids=contouri->nods; 37 xc=contouri->x; 38 yc=contouri->y; 39 IsInPoly(in_nod,xc,yc,numgrids,x,y,nods,edgevalue); 40 } 41 /*initialize thread parameters: */ 42 gate.numcontours=numcontours; 43 gate.contours=contours; 44 gate.nods=nods; 45 gate.edgevalue=edgevalue; 46 gate.in_nod=in_nod; 47 gate.x=x; 48 gate.y=y; 49 50 /*launch the thread manager with ContourToMeshxt as a core: */ 51 LaunchThread(ContourToMeshxt,(void*)&gate,num); 52 53 /*Assemble in_nod: */ 54 VecAssemblyBegin(in_nod); 55 VecAssemblyEnd(in_nod); 41 56 42 57 /*Get in_nod serialised for next operation: */ … … 53 68 54 69 /*Assemble vectors: */ 55 VecAssemblyBegin(in_nod);56 VecAssemblyEnd(in_nod);57 70 VecAssemblyBegin(in_elem); 58 71 VecAssemblyEnd(in_elem); -
issm/trunk/src/c/ContourToMeshx/ContourToMeshx.h
r1 r2591 10 10 #include "../objects/objects.h" 11 11 12 /*threading: */ 13 typedef struct{ 14 15 int numcontours; 16 Contour** contours; 17 int nods; 18 int edgevalue; 19 Vec in_nod; 20 double* x; 21 double* y; 22 23 } ContourToMeshxThreadStruct; 24 25 12 26 /* local prototypes: */ 13 27 int ContourToMeshx( Vec* pin_nods,Vec* pin_elem, double* index, double* x, double* y,Contour** contours,int numcontours,char* interptype,int nel,int nods, int edgevalue); 14 28 29 void* ContourToMeshxt(void* vContourToMeshxThreadStruct); 30 31 15 32 #endif /* _CONTOURTOMESHX_H */ 16 33 -
issm/trunk/src/c/ContourToNodesx/ContourToNodesx.cpp
r1904 r2591 33 33 xc=contouri->x; 34 34 yc=contouri->y; 35 IsInPoly(flags,xc,yc,numgrids,x,y, nods,edgevalue);35 IsInPoly(flags,xc,yc,numgrids,x,y,0,nods,edgevalue); 36 36 } 37 37 -
issm/trunk/src/c/Makefile.am
r2549 r2591 263 263 ./MeshPartitionx/MeshPartitionx.h\ 264 264 ./ContourToMeshx/ContourToMeshx.cpp\ 265 ./ContourToMeshx/ContourToMeshxt.cpp\ 265 266 ./ContourToMeshx/ContourToMeshx.h\ 266 267 ./ContourToNodesx/ContourToNodesx.cpp\ … … 561 562 ./MeshPartitionx/MeshPartitionx.h\ 562 563 ./ContourToMeshx/ContourToMeshx.cpp\ 564 ./ContourToMeshx/ContourToMeshxt.cpp\ 563 565 ./ContourToMeshx/ContourToMeshx.h\ 564 566 ./Reducevectorgtosx/Reducevectorgtosx.cpp\
Note:
See TracChangeset
for help on using the changeset viewer.