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

save modif

Location:
XIOS/dev/branch_yushan_merged/extern/remap/src
Files:
3 edited

Legend:

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

    r1155 r1176  
    1616#include "gridRemap.hpp" 
    1717 
     18#include <stdio.h> 
     19 
    1820using namespace sphereRemap ; 
    1921 
    20 extern CRemapGrid srcGrid; 
    21 #pragma omp threadprivate(srcGrid) 
     22//extern CRemapGrid srcGrid; 
     23//#pragma omp threadprivate(srcGrid) 
    2224 
    23 extern CRemapGrid tgtGrid; 
    24 #pragma omp threadprivate(tgtGrid) 
     25//extern CRemapGrid tgtGrid; 
     26//#pragma omp threadprivate(tgtGrid) 
    2527 
    2628 
     
    4042                     int order, int* n_weights) 
    4143{ 
    42         assert(src_bounds_lon); 
    43         assert(src_bounds_lat); 
    44         assert(n_vert_per_cell_src >= 3); 
    45         assert(n_cell_src >= 4); 
    46         assert(dst_bounds_lon); 
    47         assert(dst_bounds_lat); 
    48         assert(n_vert_per_cell_dst >= 3); 
    49         assert(n_cell_dst >= 4); 
    50         assert(1 <= order && order <= 2); 
     44  printf("libmapper callded : remap_get_num_weights\n"); 
     45  assert(src_bounds_lon); 
     46  assert(src_bounds_lat); 
     47  assert(n_vert_per_cell_src >= 3); 
     48  assert(n_cell_src >= 4); 
     49  assert(dst_bounds_lon); 
     50  assert(dst_bounds_lat); 
     51  assert(n_vert_per_cell_dst >= 3); 
     52  assert(n_cell_dst >= 4); 
     53  assert(1 <= order && order <= 2); 
    5154 
    5255  mapper = new Mapper(MPI_COMM_WORLD); 
     
    8790        double tic = cputime(); 
    8891        mapper = new Mapper(MPI_COMM_WORLD); 
    89   mapper->setVerbosity(PROGRESS) ; 
     92        mapper->setVerbosity(PROGRESS) ; 
    9093        mapper->buildSSTree(src_msh, dst_msh); 
    9194        double tac = cputime(); 
     
    122125                     double* centre_lon, double* centre_lat, double* areas) 
    123126{ 
     127  printf("libmapper callded : remap_get_barycentres_and_areas\n"); 
    124128        for (int i = 0; i < n_cell; i++) 
    125129        { 
     
    145149extern "C" void remap_get_weights(double* weights, int* src_indices, int* dst_indices) 
    146150{ 
     151  printf("libmapper callded : remap_get_weights\n"); 
    147152        memcpy(weights, mapper->remapMatrix, mapper->nWeights*sizeof(double)); 
    148153        memcpy(src_indices, mapper->srcAddress, mapper->nWeights*sizeof(int)); 
  • 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; 
  • XIOS/dev/branch_yushan_merged/extern/remap/src/triple.cpp

    r1016 r1176  
    33namespace sphereRemap { 
    44 
    5 extern const Coord ORIGIN(0.0, 0.0, 0.0); 
     5const Coord ORIGIN(0.0, 0.0, 0.0); 
    66 
    77std::ostream& operator<<(std::ostream& os, const Coord& c) { 
Note: See TracChangeset for help on using the changeset viewer.