Changeset 1176 for XIOS/dev/branch_yushan_merged/extern/remap/src/polyg.cpp
- Timestamp:
- 06/21/17 09:09:59 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/extern/remap/src/polyg.cpp
r950 r1176 3 3 #include <cassert> 4 4 #include <iostream> 5 #include <stdio.h> 5 6 #include "elt.hpp" 6 7 #include "errhandle.hpp" … … 161 162 { 162 163 if (N < 3) 163 return 0; /* polygons with less th en three vertices have zero area */164 return 0; /* polygons with less than three vertices have zero area */ 164 165 Coord t[3]; 165 166 t[0] = barycentre(x, N); … … 174 175 t[2] = x[ii]; 175 176 double sc=scalarprod(crossprod(t[1] - t[0], t[2] - t[0]), t[0]) ; 176 assert(sc >= -1e-10); // Error: tri a l'env (wrong orientation) 177 //assert(sc >= -1e-10); // Error: tri a l'env (wrong orientation) 178 if(sc < -1e-10) 179 { 180 printf("N=%d, sc = %f, t[0]=(%f,%f,%f), t[1]=(%f,%f,%f), t[2]=(%f,%f,%f)\n", N, sc, 181 t[0].x, t[0].y, t[0].z, 182 t[1].x, t[1].y, t[1].z, 183 t[2].x, t[2].y, t[2].z); 184 assert(sc >= -1e-10); 185 } 177 186 double area_gc = triarea(t[0], t[1], t[2]); 178 187 double area_sc_gc_moon = 0;
Note: See TracChangeset
for help on using the changeset viewer.