|
Last change
on this file since 10937 was 8303, checked in by seroussi, 15 years ago |
|
changed from grid to node in c
|
|
File size:
705 bytes
|
| Line | |
|---|
| 1 | /*! \file ContourToNodesx.c
|
|---|
| 2 | */
|
|---|
| 3 |
|
|---|
| 4 | #include "./ContourToNodesx.h"
|
|---|
| 5 |
|
|---|
| 6 | int ContourToNodesx( Vec* pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue){
|
|---|
| 7 |
|
|---|
| 8 | int i;
|
|---|
| 9 | int m,n;
|
|---|
| 10 |
|
|---|
| 11 | /*Contour:*/
|
|---|
| 12 | Contour* contouri=NULL;
|
|---|
| 13 | int numnodes;
|
|---|
| 14 | double* xc=NULL;
|
|---|
| 15 | double* yc=NULL;
|
|---|
| 16 | double value;
|
|---|
| 17 |
|
|---|
| 18 | /*output: */
|
|---|
| 19 | Vec flags=NULL;
|
|---|
| 20 |
|
|---|
| 21 | flags=NewVec(nods);
|
|---|
| 22 |
|
|---|
| 23 | /*Loop through all contours: */
|
|---|
| 24 | for (i=0;i<numcontours;i++){
|
|---|
| 25 | contouri=*(contours+i);
|
|---|
| 26 | numnodes=contouri->nods;
|
|---|
| 27 | xc=contouri->x;
|
|---|
| 28 | yc=contouri->y;
|
|---|
| 29 | IsInPoly(flags,xc,yc,numnodes,x,y,0,nods,edgevalue);
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | /*Assemble vector: */
|
|---|
| 33 | VecAssemblyBegin(flags);
|
|---|
| 34 | VecAssemblyEnd(flags);
|
|---|
| 35 |
|
|---|
| 36 | /*Assign output pointers: */
|
|---|
| 37 | *pflags=flags;
|
|---|
| 38 |
|
|---|
| 39 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.