Changeset 1984 for XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp
- Timestamp:
- 12/06/20 22:14:56 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp
r1975 r1984 135 135 * Go through the hierarchy to find the scalar from which the transformations must be inherited 136 136 */ 137 void CScalar::solveInheritanceTransformation ()137 void CScalar::solveInheritanceTransformation_old() 138 138 { 139 139 if (hasTransformation() || !hasDirectScalarReference()) … … 153 153 } 154 154 155 void CScalar::solveInheritanceTransformation() 156 TRY 157 { 158 if (solveInheritanceTransformation_done_) return; 159 else solveInheritanceTransformation_done_=true ; 160 161 CScalar* scalar = this; 162 CScalar* Lastscalar ; 163 std::list<CScalar*> refScalars; 164 bool out=false ; 165 vector<StdString> excludedAttr; 166 excludedAttr.push_back("scalar_ref"); 167 168 refScalars.push_front(scalar) ; 169 while (scalar->hasDirectScalarReference() && !out) 170 { 171 CScalar* lastScalar=scalar ; 172 scalar = scalar->getDirectScalarReference(); 173 scalar->solveRefInheritance() ; 174 if (!scalar->SuperClass::isEqual(lastScalar,excludedAttr)) out=true ; 175 refScalars.push_front(scalar) ; 176 } 177 178 CTransformationPaths::TPath path ; 179 auto& pathList = std::get<2>(path) ; 180 std::get<0>(path) = EElement::SCALAR ; 181 std::get<1>(path) = refScalars.front()->getId() ; 182 for (auto& scalar : refScalars) 183 { 184 CScalar::TransMapTypes transformations = scalar->getAllTransformations(); 185 for(auto& transformation : transformations) pathList.push_back({transformation.second->getTransformationType(), 186 transformation.second->getId()}) ; 187 } 188 transformationPaths_.addPath(path) ; 189 190 } 191 CATCH_DUMP_ATTR 192 155 193 /* obsolete, to remove after reimplementing coupling */ 156 194 void CScalar::sendScalarToCouplerOut(CContextClient* client, const string& fieldId, int posInGrid)
Note: See TracChangeset
for help on using the changeset viewer.