Ignore:
Timestamp:
02/10/16 14:35:03 (8 years ago)
Author:
mhnguyen
Message:

Making some improvements of transformation algorithm

+) Correct the way to enlisting transformations in an element (domain, axis)
+) Optimize generic transformation to make sure temporary grid to be created on demand
+) Update some mpi tag to prevent conflict
+) Correct some minor stuffs
+) Update documents

Test
+) On Curie
+) all test pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp

    r809 r821  
    1515#include "netcdf.hpp" 
    1616#include "mapper.hpp" 
     17#include "mpi_tag.hpp" 
    1718 
    1819namespace xios { 
     
    9596          double step=(domainSrc_->lon_end-domainSrc_->lon_start)/domainSrc_->ni_glo ; 
    9697          for(int i=0; i<domainSrc_->ni_glo; ++i) lon_g(i)=domainSrc_->lon_start+i*step ; 
    97           step=(domainSrc_->lat_end-domainSrc_->lat_start)/domainSrc_->nj_glo ;  
     98          step=(domainSrc_->lat_end-domainSrc_->lat_start)/domainSrc_->nj_glo ; 
    9899          for(int i=0; i<domainSrc_->ni_glo; ++i) lat_g(i)=domainSrc_->lat_start+i*step ; 
    99100        } 
     
    160161          double step=(domainDest_->lon_end-domainDest_->lon_start)/domainDest_->ni_glo ; 
    161162          for(int i=0; i<domainDest_->ni_glo; ++i) lon_g(i)=domainDest_->lon_start+i*step ; 
    162           step=(domainDest_->lat_end-domainDest_->lat_start)/domainDest_->nj_glo ;  
     163          step=(domainDest_->lat_end-domainDest_->lat_start)/domainDest_->nj_glo ; 
    163164          for(int i=0; i<domainDest_->ni_glo; ++i) lat_g(i)=domainDest_->lat_start+i*step ; 
    164165        } 
     
    167168    if (std::abs(poleValue - std::abs(lat_g(domainDest_->nj_glo-1))) < NumTraits<double>::epsilon()) isSouthPole = true; 
    168169 
    169      
    170      
    171      
     170 
     171 
     172 
    172173    if (isNorthPole && (0 == domainDest_->jbegin.getValue())) 
    173174    { 
     
    469470             MPI_INT, 
    470471             itMap->first, 
    471              7, 
     472             MPI_DOMAIN_INTERPOLATION_DEST_INDEX, 
    472473             client->intraComm, 
    473474             &sendRequest.back()); 
     
    477478             MPI_INT, 
    478479             itMap->first, 
    479              8, 
     480             MPI_DOMAIN_INTERPOLATION_SRC_INDEX, 
    480481             client->intraComm, 
    481482             &sendRequest.back()); 
     
    485486             MPI_DOUBLE, 
    486487             itMap->first, 
    487              9, 
     488             MPI_DOMAIN_INTERPOLATION_WEIGHT, 
    488489             client->intraComm, 
    489490             &sendRequest.back()); 
     
    504505             MPI_INT, 
    505506             MPI_ANY_SOURCE, 
    506              7, 
     507             MPI_DOMAIN_INTERPOLATION_DEST_INDEX, 
    507508             client->intraComm, 
    508509             &recvStatus); 
     
    516517             MPI_INT, 
    517518             clientSrcRank, 
    518              8, 
     519             MPI_DOMAIN_INTERPOLATION_SRC_INDEX, 
    519520             client->intraComm, 
    520521             &recvStatus); 
     
    524525             MPI_DOUBLE, 
    525526             clientSrcRank, 
    526              9, 
     527             MPI_DOMAIN_INTERPOLATION_WEIGHT, 
    527528             client->intraComm, 
    528529             &recvStatus); 
Note: See TracChangeset for help on using the changeset viewer.