Last change
on this file since 13975 was 13975, checked in by Mathieu Morlighem, 12 years ago |
merged trunk-jpl and trunk for revision 13974
|
File size:
596 bytes
|
Line | |
---|
1 | /*!\file: AssociateSegmentToElement.cpp
|
---|
2 | * \brief for each segment, look for the corresponding element.
|
---|
3 | */
|
---|
4 |
|
---|
5 | #include "./trimesh.h"
|
---|
6 |
|
---|
7 | int AssociateSegmentToElement(double** psegments,int nseg, double* index,int nel){
|
---|
8 |
|
---|
9 | /*Error management: */
|
---|
10 | int i;
|
---|
11 | int noerr=1;
|
---|
12 |
|
---|
13 | /*Input: */
|
---|
14 | double* segments=NULL;
|
---|
15 |
|
---|
16 | /*node indices: */
|
---|
17 | double A,B;
|
---|
18 |
|
---|
19 | /*Recover segments: */
|
---|
20 | segments=*psegments;
|
---|
21 |
|
---|
22 | for (i=0;i<nseg;i++){
|
---|
23 | A=*(segments+3*i+0);
|
---|
24 | B=*(segments+3*i+1);
|
---|
25 | *(segments+3*i+2)=FindElement(A,B,index,nel)+1; //matlab indexing.
|
---|
26 | }
|
---|
27 |
|
---|
28 | /*Assign output pointers: */
|
---|
29 | *psegments=segments;
|
---|
30 | return noerr;
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.