Changeset 632 for XIOS/trunk/src/node/grid.cpp
- Timestamp:
- 07/08/15 14:27:28 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/grid.cpp
r631 r632 1161 1161 } 1162 1162 1163 void CGrid::transformGrid(CGrid* transform edGrid)1164 { 1165 if ( transformedGrid->isTransformed()) return;1166 transformedGrid->setTransformed();1167 if (axis_domain_order.numElements() != transform edGrid->axis_domain_order.numElements())1168 { 1169 ERROR("CGrid::transformGrid(CGrid* transform edGrid)",1163 void CGrid::transformGrid(CGrid* transformGridSrc) 1164 { 1165 if (isTransformed()) return; 1166 setTransformed(); 1167 if (axis_domain_order.numElements() != transformGridSrc->axis_domain_order.numElements()) 1168 { 1169 ERROR("CGrid::transformGrid(CGrid* transformGridSrc)", 1170 1170 << "Two grids have different dimension size" 1171 << "Dimension of grid source" <<this->getId() << " is " << axis_domain_order.numElements() << std::endl1172 << "Dimension of grid destination " <<transformedGrid->getId() << " is " << transformedGrid->axis_domain_order.numElements());1171 << "Dimension of grid destination " <<this->getId() << " is " << axis_domain_order.numElements() << std::endl 1172 << "Dimension of grid source " <<transformGridSrc->getId() << " is " << transformGridSrc->axis_domain_order.numElements()); 1173 1173 } 1174 1174 else … … 1176 1176 int ssize = axis_domain_order.numElements(); 1177 1177 for (int i = 0; i < ssize; ++i) 1178 if (axis_domain_order(i) != (transform edGrid->axis_domain_order)(i))1179 ERROR("CGrid::transformGrid(CGrid* transform edGrid)",1180 << "Grids " <<this->getId() <<" and " << transform edGrid->getId()1178 if (axis_domain_order(i) != (transformGridSrc->axis_domain_order)(i)) 1179 ERROR("CGrid::transformGrid(CGrid* transformGridSrc)", 1180 << "Grids " <<this->getId() <<" and " << transformGridSrc->getId() 1181 1181 << " don't have elements in the same order"); 1182 1182 } 1183 1183 1184 transformations_ = new CGridTransformation(t ransformedGrid, this);1184 transformations_ = new CGridTransformation(this, transformGridSrc); 1185 1185 transformations_->computeAll(); 1186 1186 1187 1187 // Ok, now need to compute index of grid source 1188 checkMaskIndex(false);1188 transformGridSrc->checkMaskIndex(false); 1189 1189 } 1190 1190
Note: See TracChangeset
for help on using the changeset viewer.