Changeset 369 for XIOS/trunk/src/node/grid.hpp
- Timestamp:
- 10/16/12 13:04:44 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/grid.hpp
r351 r369 9 9 #include "domain.hpp" 10 10 #include "axis.hpp" 11 #include "array_new.hpp" 12 #include "attribute_array.hpp" 11 13 12 14 namespace xios { … … 54 56 void solveReference(void); 55 57 56 virtual void toBinary (StdOStream & os) const;57 virtual void fromBinary(StdIStream & is);58 // virtual void toBinary (StdOStream & os) const; 59 // virtual void fromBinary(StdIStream & is); 58 60 59 61 /// Tests /// … … 63 65 64 66 /// Accesseurs /// 65 const std::deque< ARRAY(int, 1)> & getStoreIndex(void) const;66 const std::deque< ARRAY(int, 1)> & getOutIIndex(void) const;67 const std::deque< ARRAY(int, 1)> & getOutJIndex(void) const;68 const std::deque< ARRAY(int, 1)> & getOutLIndex(void) const;67 const std::deque< CArray<int, 1>* > & getStoreIndex(void) const; 68 const std::deque< CArray<int, 1>* > & getOutIIndex(void) const; 69 const std::deque< CArray<int, 1>* > & getOutJIndex(void) const; 70 const std::deque< CArray<int, 1>* > & getOutLIndex(void) const; 69 71 70 72 const CAxis* getRelAxis (void) const; … … 80 82 81 83 /// Entrées-sorties de champs /// 82 template < StdSizen>83 void inputField(const ARRAY(double, n) field, ARRAY(double, 1)stored) const;84 template <int n> 85 void inputField(const CArray<double,n>& field, CArray<double,1>& stored) const; 84 86 85 void inputFieldServer(const std::deque<ARRAY(double, 1)> storedClient, 86 ARRAY(double, 1) storedServer) const; 87 /* 88 template <StdSize n> 89 void outputField(const ARRAY(double, 1) stored, ARRAY(double, n) field) const; 90 */ 91 void outputField(int rank, const ARRAY(double, 1) stored, ARRAY(double, 3) field) ; 92 void outputField(int rank, const ARRAY(double, 1) stored, ARRAY(double, 2) field) ; 93 void outputField(int rank,const ARRAY(double, 1) stored, ARRAY(double, 1) field) ; 87 void inputFieldServer(const std::deque< CArray<double, 1>* > storedClient, 88 CArray<double, 1>& storedServer) const; 89 90 void outputField(int rank, const CArray<double,1>& stored, CArray<double,3>& field) ; 91 void outputField(int rank, const CArray<double,1>& stored, CArray<double,2>& field) ; 92 void outputField(int rank, const CArray<double,1>& stored, CArray<double,1>& field) ; 94 93 95 94 /// Destructeur /// … … 111 110 112 111 /// Entrées-sorties de champs (interne) /// 113 void storeField_arr(const double * const data, ARRAY(double, 1)stored) const;112 void storeField_arr(const double * const data, CArray<double,1>& stored) const; 114 113 115 114 /// Traitements protégés /// … … 120 119 121 120 static bool dispatchEvent(CEventServer& event) ; 122 void outputFieldToServer( ARRAY(double, 1) fieldIn, int rank, ARRAY(double, 1)fieldOut) ;121 void outputFieldToServer(CArray<double,1>& fieldIn, int rank, CArray<double,1>& fieldOut) ; 123 122 static void recvIndex(CEventServer& event) ; 124 123 void recvIndex(int rank, CBufferIn& buffer) ; … … 134 133 CDomain* domain ; 135 134 136 std::deque<ARRAY(int, 1)> storeIndex ; 137 std::deque<ARRAY(int, 1)> out_i_index ; 138 std::deque<ARRAY(int, 1)> out_j_index ; 139 std::deque<ARRAY(int, 1)> out_l_index ; 140 ARRAY(int, 1) storeIndex_client ; 141 ARRAY(int, 1) out_i_client ; 142 ARRAY(int, 1) out_j_client ; 143 ARRAY(int, 1) out_l_client ; 135 std::deque< CArray<int, 1>* > storeIndex ; 136 std::deque< CArray<int, 1>* > out_i_index ; 137 std::deque< CArray<int, 1>* > out_j_index ; 138 std::deque< CArray<int, 1>* > out_l_index ; 144 139 145 map<int,ARRAY(int, 1)> storeIndex_toSrv ; 140 CArray<int, 1> storeIndex_client ; 141 CArray<int, 1> out_i_client ; 142 CArray<int, 1> out_j_client ; 143 CArray<int, 1> out_l_client ; 144 145 map<int, CArray<int, 1>* > storeIndex_toSrv ; 146 146 map<int,int> nbSenders ; 147 147 // std::deque<ARRAY(int, 1)> out_i_toSrv ; … … 149 149 // std::deque<ARRAY(int, 1)> out_l_toSrv ; 150 150 151 map<int, ARRAY(int, 1)> out_i_fromClient ;152 map<int, ARRAY(int, 1)> out_j_fromClient ;153 map<int, ARRAY(int, 1)> out_l_fromClient ;151 map<int, CArray<int, 1>* > out_i_fromClient ; 152 map<int, CArray<int, 1>* > out_j_fromClient ; 153 map<int, CArray<int, 1>* > out_l_fromClient ; 154 154 155 155 }; // class CGrid … … 157 157 ///-------------------------------------------------------------- 158 158 159 template < StdSizen>160 void CGrid::inputField(const ARRAY(double, n) field, ARRAY(double, 1)stored) const159 template <int n> 160 void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const 161 161 { 162 if (this->getDataSize() != field ->num_elements())163 ERROR(" CGrid::inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored)",162 if (this->getDataSize() != field.numElements()) 163 ERROR("void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const", 164 164 << "[ Taille des données attendue = " << this->getDataSize() << ", " 165 << "Taille des données reçue = " << field ->num_elements() << " ] "165 << "Taille des données reçue = " << field.numElements() << " ] " 166 166 << "Le tableau de données n'a pas la bonne taille !") ; 167 this->storeField_arr(field ->data(), stored) ;167 this->storeField_arr(field.dataFirst(), stored) ; 168 168 } 169 169
Note: See TracChangeset
for help on using the changeset viewer.