Ignore:
Timestamp:
10/24/16 16:16:51 (8 years ago)
Author:
mhnguyen
Message:

Fortran interfaces:

+) Adding Fortran interfaces of transformation

Test
+) Only complilation on Curie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c/icxml_tree.cpp

    r934 r981  
    5151   typedef xios::CGenerateRectilinearDomain *  XGenerateRectilinearDomainPtr; 
    5252   typedef xios::CComputeConnectivityDomain *  XComputeConnectivityDomainPtr; 
    53  
    54    typedef xios::CTransformation<CAxis>   *  XTransformationAxisPtr; 
    55    typedef xios::CZoomAxis                *  XZoomAxisPtr; 
    56    typedef xios::CInterpolateAxis         *  XInterpolateAxisPtr; 
    57    typedef xios::CInverseAxis             *  XInverseAxisPtr; 
     53   typedef xios::CExpandDomain              *  XExpandDomainPtr; 
     54 
     55   typedef xios::CTransformation<CAxis>     *  XTransformationAxisPtr; 
     56   typedef xios::CZoomAxis                  *  XZoomAxisPtr; 
     57   typedef xios::CInterpolateAxis           *  XInterpolateAxisPtr; 
     58   typedef xios::CInverseAxis               *  XInverseAxisPtr; 
     59   typedef xios::CExtractDomainToAxis       *  XExtractDomainToAxisPtr; 
     60   typedef xios::CReduceDomainToAxis        *  XReduceDomainToAxisPtr; 
    5861 
    5962   typedef xios::CTransformation<CScalar>   *  XTransformationScalarPtr; 
    6063   typedef xios::CReduceAxisToScalar        *  XReduceAxisToScalarPtr; 
     64   typedef xios::CReduceDomainToScalar      *  XReduceDomainToScalarPtr; 
     65   typedef xios::CExtractAxisToScalar       *  XExtractAxisToScalarPtr; 
     66 
    6167 
    6268   // ----------------------- Ajout d'enfant à un parent ----------------------- 
     
    402408   } 
    403409 
     410   //--------------------------------------------------------------------------- 
     411   //-------------------------Transformations ----------------------------------- 
     412   //--------------------------------------------------------------------------- 
    404413   void cxios_xml_tree_add_zoomdomaintodomain 
    405414      (XDomainPtr parent_, XZoomDomainPtr * child_, const char * child_id, int child_id_size) 
     
    464473      if (cstr2string(child_id, child_id_size, child_id_str)) 
    465474      { 
     475         tmpChild_ = parent_->addTransformation(TRANS_EXPAND_DOMAIN, child_id_str); 
     476      } 
     477      else 
     478      { 
     479         tmpChild_ = parent_->addTransformation(TRANS_EXPAND_DOMAIN); 
     480      } 
     481      *child_ = static_cast<XComputeConnectivityDomainPtr>(tmpChild_); 
     482      CTimer::get("XIOS").suspend() ; 
     483   } 
     484 
     485   void cxios_xml_tree_add_expanddomaintodomain 
     486      (XDomainPtr parent_, XExpandDomainPtr * child_, const char * child_id, int child_id_size) 
     487   { 
     488      std::string child_id_str; 
     489      XTransformationDomainPtr tmpChild_; 
     490      CTimer::get("XIOS").resume() ; 
     491      if (cstr2string(child_id, child_id_size, child_id_str)) 
     492      { 
    466493         tmpChild_ = parent_->addTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN, child_id_str); 
    467494      } 
     
    470497         tmpChild_ = parent_->addTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN); 
    471498      } 
    472       *child_ = static_cast<XComputeConnectivityDomainPtr>(tmpChild_); 
    473       CTimer::get("XIOS").suspend() ; 
    474    } 
    475  
     499      *child_ = static_cast<XExpandDomainPtr>(tmpChild_); 
     500      CTimer::get("XIOS").suspend() ; 
     501   } 
     502 
     503   // -----------------------Axis transformation-------------------------------- 
    476504   void cxios_xml_tree_add_zoomaxistoaxis 
    477505      (XAxisPtr parent_, XZoomAxisPtr * child_, const char * child_id, int child_id_size) 
     
    528556   } 
    529557 
     558   void cxios_xml_tree_add_extractdomaintoaxistoaxis 
     559      (XAxisPtr parent_, XExtractDomainToAxisPtr * child_, const char * child_id, int child_id_size) 
     560   { 
     561      std::string child_id_str; 
     562      XTransformationAxisPtr tmpChild_; 
     563      CTimer::get("XIOS").resume() ; 
     564      if (cstr2string(child_id, child_id_size, child_id_str)) 
     565      { 
     566         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS, child_id_str); 
     567      } 
     568      else 
     569      { 
     570         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS); 
     571      } 
     572      *child_ = static_cast<XExtractDomainToAxisPtr>(tmpChild_); 
     573      CTimer::get("XIOS").suspend() ; 
     574   } 
     575 
     576   void cxios_xml_tree_add_reducedomaintoaxistoaxis 
     577      (XAxisPtr parent_, XReduceDomainToAxisPtr * child_, const char * child_id, int child_id_size) 
     578   { 
     579      std::string child_id_str; 
     580      XTransformationAxisPtr tmpChild_; 
     581      CTimer::get("XIOS").resume() ; 
     582      if (cstr2string(child_id, child_id_size, child_id_str)) 
     583      { 
     584         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS, child_id_str); 
     585      } 
     586      else 
     587      { 
     588         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS); 
     589      } 
     590      *child_ = static_cast<XReduceDomainToAxisPtr>(tmpChild_); 
     591      CTimer::get("XIOS").suspend() ; 
     592   } 
     593 
     594 
    530595   void cxios_xml_tree_add_reduceaxistoscalartoscalar 
    531596      (XScalarPtr parent_, XReduceAxisToScalarPtr * child_, const char * child_id, int child_id_size) 
     
    543608      } 
    544609      *child_ = static_cast<XReduceAxisToScalarPtr>(tmpChild_); 
     610      CTimer::get("XIOS").suspend() ; 
     611   } 
     612 
     613   void cxios_xml_tree_add_reducedomaintoscalartoscalar 
     614      (XScalarPtr parent_, XReduceDomainToScalarPtr * child_, const char * child_id, int child_id_size) 
     615   { 
     616      std::string child_id_str; 
     617      XTransformationScalarPtr tmpChild_; 
     618      CTimer::get("XIOS").resume() ; 
     619      if (cstr2string(child_id, child_id_size, child_id_str)) 
     620      { 
     621         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR, child_id_str); 
     622      } 
     623      else 
     624      { 
     625         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR); 
     626      } 
     627      *child_ = static_cast<XReduceDomainToScalarPtr>(tmpChild_); 
     628      CTimer::get("XIOS").suspend() ; 
     629   } 
     630 
     631   void cxios_xml_tree_add_extractaxistoscalartoscalar 
     632      (XScalarPtr parent_, XExtractAxisToScalarPtr * child_, const char * child_id, int child_id_size) 
     633   { 
     634      std::string child_id_str; 
     635      XTransformationScalarPtr tmpChild_; 
     636      CTimer::get("XIOS").resume() ; 
     637      if (cstr2string(child_id, child_id_size, child_id_str)) 
     638      { 
     639         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR, child_id_str); 
     640      } 
     641      else 
     642      { 
     643         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR); 
     644      } 
     645      *child_ = static_cast<XExtractAxisToScalarPtr>(tmpChild_); 
    545646      CTimer::get("XIOS").suspend() ; 
    546647   } 
Note: See TracChangeset for help on using the changeset viewer.