- Timestamp:
- 07/10/17 18:17:04 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/extern/remap/src/intersect.cpp
r1155 r1205 17 17 using namespace std; 18 18 19 extern CRemapGrid srcGrid;20 #pragma omp threadprivate(srcGrid)21 22 extern CRemapGrid tgtGrid;23 #pragma omp threadprivate(tgtGrid)24 25 19 /** returns index of edge of a that is shared with b, 26 20 or NOT_FOUND if a and b do not share an edge */ … … 62 56 for (int j = 0; j < b.n; j++) 63 57 { 64 // share a full edge ? be carefull at the orientation 65 66 //if(squaredist(a.vertex[i], b.vertex[j]) > 1e-10*1e-10 || 67 // squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10 ) 68 //{ 69 //printf("A : squaredist(a.vertex[%d], b.vertex[%d]) = %.10e %d\n", 70 // i, j, squaredist(a.vertex[i], b.vertex[j]), 71 // squaredist(a.vertex[i], b.vertex[j]) > 1e-10*1e-10 ? true : false); 72 //printf("B : squaredist(a.vertex[%d], b.vertex[%d]) = %.10e %d\n", 73 // (i+1)%a.n, (j+1)%b.n, squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]), 74 // squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10 ? true : false); 75 76 assert(squaredist(a.vertex[ i ], b.vertex[ j ]) > 1e-10*1e-10 || 77 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10); 78 79 //} 80 58 // share a full edge ? be carefull at the orientation 59 assert(squaredist(a.vertex[ i ], b.vertex[ j ]) > 1e-10*1e-10 || 60 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10); 81 61 if ( squaredist(a.vertex[ i ], b.vertex[ j ]) < 1e-10*1e-10 && 82 62 squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+b.n-1)%b.n]) < 1e-10*1e-10)
Note: See TracChangeset
for help on using the changeset viewer.