Ignore:
Timestamp:
06/21/17 09:09:59 (7 years ago)
Author:
yushan
Message:

save modif

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/extern/remap/src/polyg.cpp

    r950 r1176  
    33#include <cassert> 
    44#include <iostream> 
     5#include <stdio.h> 
    56#include "elt.hpp" 
    67#include "errhandle.hpp" 
     
    161162{ 
    162163        if (N < 3) 
    163                 return 0; /* polygons with less then three vertices have zero area */ 
     164                return 0; /* polygons with less than three vertices have zero area */ 
    164165        Coord t[3]; 
    165166        t[0] = barycentre(x, N); 
     
    174175                t[2] = x[ii]; 
    175176                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                } 
    177186                double area_gc = triarea(t[0], t[1], t[2]); 
    178187                double area_sc_gc_moon = 0; 
Note: See TracChangeset for help on using the changeset viewer.