Changeset 976
- Timestamp:
- 10/18/16 11:08:11 (8 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 5 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/config/node_type.conf
r960 r976 83 83 #endif //__XIOS_CExtractAxisToScalar__ 84 84 85 #ifdef __XIOS_CReduceDomainToScalar__ 86 DECLARE_NODE(ReduceDomainToScalar, reduce_domain_to_scalar) 87 #endif //__XIOS_CReduceDomainToScalar__ 88 85 89 #ifdef __XIOS_CContext__ 86 90 DECLARE_NODE_PAR(Context, context) -
XIOS/trunk/src/group_factory_decl.cpp
r960 r976 38 38 macro(CExpandDomainGroup) 39 39 macro(CExtractAxisToScalarGroup) 40 macro(CReduceDomainToScalarGroup) 40 41 } -
XIOS/trunk/src/group_template_decl.cpp
r960 r976 27 27 macro(ExpandDomain) 28 28 macro(ExtractAxisToScalar) 29 macro(ReduceDomainToScalar) 29 30 30 31 } -
XIOS/trunk/src/node/grid.hpp
r957 r976 346 346 ++idx; ++idxAxis; 347 347 } 348 else ++idx;348 else {}; 349 349 } 350 350 -
XIOS/trunk/src/node/node_enum.hpp
r960 r976 32 32 eComputeConnectivityDomain, 33 33 eExpandDomain, 34 eExtractAxisToScalar 34 eExtractAxisToScalar, 35 eReduceDomainToScalar 35 36 36 37 } ENodeType; -
XIOS/trunk/src/node/node_type.hpp
r960 r976 23 23 #include "expand_domain.hpp" 24 24 #include "extract_axis_to_scalar.hpp" 25 #include "reduce_domain_to_scalar.hpp" 26 25 27 26 28 -
XIOS/trunk/src/node/scalar.cpp
r968 r976 31 31 bool CScalar::initializeTransformationMap(std::map<StdString, ETranformationType>& m) 32 32 { 33 m["reduce_axis"] = TRANS_REDUCE_AXIS_TO_SCALAR; 34 m["extract_axis"] = TRANS_EXTRACT_AXIS_TO_SCALAR; 33 m["reduce_axis"] = TRANS_REDUCE_AXIS_TO_SCALAR; 34 m["extract_axis"] = TRANS_EXTRACT_AXIS_TO_SCALAR; 35 m["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_SCALAR; 35 36 } 36 37 -
XIOS/trunk/src/node/transformation_enum.hpp
r960 r976 19 19 TRANS_EXPAND_DOMAIN = 10, 20 20 TRANS_EXTRACT_AXIS_TO_SCALAR = 11, 21 TRANS_REDUCE_DOMAIN_TO_SCALAR = 12, 21 22 } ETranformationType; 22 23 -
XIOS/trunk/src/object_factory_decl.cpp
r960 r976 39 39 macro(CExpandDomain) 40 40 macro(CExtractAxisToScalar) 41 macro(CReduceDomainToScalar) 41 42 42 43 macro(CFieldGroup) … … 60 61 macro(CExpandDomainGroup) 61 62 macro(CExtractAxisToScalarGroup) 63 macro(CReduceDomainToScalarGroup) 62 64 } -
XIOS/trunk/src/object_template_decl.cpp
r960 r976 26 26 template class CObjectTemplate<CExpandDomain>; 27 27 template class CObjectTemplate<CExtractAxisToScalar>; 28 template class CObjectTemplate<CReduceDomainToScalar>; 28 29 29 30 template class CObjectTemplate<CContextGroup>; … … 47 48 template class CObjectTemplate<CExpandDomainGroup>; 48 49 template class CObjectTemplate<CExtractAxisToScalarGroup>; 50 template class CObjectTemplate<CReduceDomainToScalarGroup>; 49 51 } -
XIOS/trunk/src/transformation/algo_types.hpp
r960 r976 10 10 #define __XIOS_ALGORITHM_TRANSFORMATION_TYPES_HPP__ 11 11 12 #include "scalar_algorithm_reduce_axis.hpp" 13 #include "scalar_algorithm_extract_axis.hpp" 14 #include "scalar_algorithm_reduce_domain.hpp" 12 15 13 #include "reduce_axis_to_scalar.hpp"14 #include "scalar_algorithm_reduce_axis.hpp"15 16 #include "axis_algorithm_inverse.hpp" 16 17 #include "axis_algorithm_zoom.hpp" 17 18 #include "axis_algorithm_interpolate.hpp" 18 #include "domain_algorithm_zoom.hpp"19 #include "domain_algorithm_interpolate.hpp"20 #include "reduce_domain_to_axis.hpp"21 19 #include "axis_algorithm_reduce_domain.hpp" 22 20 #include "axis_algorithm_transformation.hpp" 23 21 #include "axis_algorithm_extract_domain.hpp" 24 #include "extract_domain_to_axis.hpp" 22 23 #include "domain_algorithm_zoom.hpp" 24 #include "domain_algorithm_interpolate.hpp" 25 25 #include "domain_algorithm_compute_connectivity.hpp" 26 #include "compute_connectivity_domain.hpp"27 #include "expand_domain.hpp"28 26 #include "domain_algorithm_expand.hpp" 29 #include "extract_axis_to_scalar.hpp" 30 #include "scalar_algorithm_extract_axis.hpp" 27 28 29 30 31 31 32 32 #endif // __XIOS_ALGORITHM_TRANSFORMATION_TYPES_HPP__ -
XIOS/trunk/src/transformation/grid_transformation_selector.cpp
r960 r976 21 21 CScalarAlgorithmReduceScalar::registerTrans(); 22 22 CScalarAlgorithmExtractScalar::registerTrans(); 23 CScalarAlgorithmReduceDomain::registerTrans(); 23 24 24 25 //! Axis -
XIOS/trunk/src/transformation/scalar_algorithm_transformation.cpp
r888 r976 3 3 \author Ha NGUYEN 4 4 \since 23 June 2016 5 \date 23 June20165 \date 23 Oct 2016 6 6 7 7 \brief Interface for all scalar transformation algorithms. … … 48 48 49 49 /*! 50 Compute global index of scalar on different processes 51 \param [in] globalScalarIndex global index of scalar source 52 \param [out] globalScalarIndexOnProc processes which contain the corresponding global index of scalar source 50 Compute global index of element source on different processes on knowing the global index source of transformation 51 52 \param [in] globalIndexElementSource global index source of transformation (represented in the transformation mapping) 53 \param [in] elementSourceType type of element source 54 \param [out] globalIndexElementSourceOnProc processes which contain the corresponding global index of scalar source 53 55 */ 54 void CScalarAlgorithmTransformation::computeExchangeGlobalIndex(const CArray<size_t,1>& global ScalarIndex,55 int element Type,56 CClientClientDHTInt::Index2VectorInfoTypeMap& global ScalarIndexOnProc)56 void CScalarAlgorithmTransformation::computeExchangeGlobalIndex(const CArray<size_t,1>& globalIndexElementSource, 57 int elementSourceType, 58 CClientClientDHTInt::Index2VectorInfoTypeMap& globalIndexElementSourceOnProc) 57 59 { 58 60 CContext* context = CContext::getCurrent(); … … 61 63 int clientSize = client->clientSize; 62 64 63 if (1 == elementType) 65 if (2 == elementSourceType) // Source is a domain 66 { 67 size_t globalIndex; 68 int nIndexSize = domainSrc_->i_index.numElements(); 69 CArray<int,1>& iIndex = domainSrc_->i_index; 70 CArray<int,1>& jIndex = domainSrc_->j_index; 71 int niGlo = domainSrc_->ni_glo; 72 73 CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank; 74 globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor())); 75 for (int idx = 0; idx < nIndexSize; ++idx) 76 { 77 globalIndex = jIndex(idx) * niGlo + iIndex(idx); 78 globalIndex2ProcRank[globalIndex].resize(1); 79 globalIndex2ProcRank[globalIndex][0] = clientRank; 80 } 81 82 CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm); 83 dhtIndexProcRank.computeIndexInfoMapping(globalIndexElementSource); 84 globalIndexElementSourceOnProc = dhtIndexProcRank.getInfoIndexMap(); 85 } 86 else if (1 == elementSourceType) // Source is an axis 64 87 { 65 88 size_t globalIndex; … … 75 98 76 99 CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm); 77 dhtIndexProcRank.computeIndexInfoMapping(globalScalarIndex); 78 globalScalarIndexOnProc = dhtIndexProcRank.getInfoIndexMap(); 100 dhtIndexProcRank.computeIndexInfoMapping(globalIndexElementSource); 101 globalIndexElementSourceOnProc = dhtIndexProcRank.getInfoIndexMap(); 102 } 103 else // scalar 104 { 105 size_t globalIndex = 0; 106 CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank; 107 globalIndex2ProcRank[globalIndex].resize(1); 108 globalIndex2ProcRank[globalIndex][0] = clientRank; 109 110 CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm); 111 dhtIndexProcRank.computeIndexInfoMapping(globalIndexElementSource); 112 globalIndexElementSourceOnProc = dhtIndexProcRank.getInfoIndexMap(); 79 113 } 80 114 } -
XIOS/trunk/src/type/type_util.hpp
r960 r976 46 46 class CExtractAxisToScalar; 47 47 class CExtractAxisToScalarGroup; 48 class CReduceDomainToScalar; 49 class CReduceDomainToScalarGroup; 48 50 49 51 template <typename T> inline string getStrType(void); … … 108 110 macro(CExtractAxisToScalar) 109 111 macro(CExtractAxisToScalarGroup) 110 112 macro(CReduceDomainToScalar) 113 macro(CReduceDomainToScalarGroup) 114 111 115 #undef macro 112 116 } -
XIOS/trunk/src/xml_parser_decl.cpp
r960 r976 32 32 macro( ExpandDomain ) 33 33 macro( ExtractAxisToScalar ) 34 macro( ReduceDomainToScalar ) 34 35 } 35 36 }
Note: See TracChangeset
for help on using the changeset viewer.