Changeset 1557 for XIOS/trunk/src/distribution_client.cpp
- Timestamp:
- 07/05/18 14:22:36 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/distribution_client.cpp
r1549 r1557 637 637 int CDistributionClient::getAxisIndex(const int& dataIndex, const int& dataBegin, const int& ni) 638 638 { 639 int tempI = dataIndex + dataBegin; 640 return ((tempI)%ni); 639 if (ni == 0) 640 { 641 return -1; 642 } 643 int tempI = dataIndex + dataBegin; 644 if ((tempI < 0) || (tempI > ni)) 645 return -1; 646 else if (tempI == ni) 647 return tempI; 648 else 649 return ((tempI)%ni); 641 650 } 642 651
Note: See TracChangeset
for help on using the changeset viewer.