/[escript]/trunk/escript/src/Data.cpp
ViewVC logotype

Diff of /trunk/escript/src/Data.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 922 by gross, Fri Jan 5 04:23:05 2007 UTC revision 924 by trankine, Wed Jan 10 03:39:27 2007 UTC
# Line 726  Data:: getValueOfDataPoint(int dataPoint Line 726  Data:: getValueOfDataPoint(int dataPoint
726         int dataPointNoInSample = dataPointNo - sampleNo * getNumDataPointsPerSample();         int dataPointNoInSample = dataPointNo - sampleNo * getNumDataPointsPerSample();
727         //         //
728         // Check a valid sample number has been supplied         // Check a valid sample number has been supplied
729         if (sampleNo >= getNumSamples() or sampleNo < 0 ) {         if ((sampleNo >= getNumSamples()) || (sampleNo < 0 )) {
730             throw DataException("Error - Data::convertToNumArray: invalid sampleNo.");             throw DataException("Error - Data::convertToNumArray: invalid sampleNo.");
731         }         }
732                                
733         //         //
734         // Check a valid data point number has been supplied         // Check a valid data point number has been supplied
735         if (dataPointNoInSample >= getNumDataPointsPerSample() or dataPointNoInSample < 0) {         if ((dataPointNoInSample >= getNumDataPointsPerSample()) || (dataPointNoInSample < 0)) {
736             throw DataException("Error - Data::convertToNumArray: invalid dataPointNoInSample.");             throw DataException("Error - Data::convertToNumArray: invalid dataPointNoInSample.");
737         }         }
738         // TODO: global error handling         // TODO: global error handling
# Line 877  Data::getValueOfGlobalDataPoint(int proc Line 877  Data::getValueOfGlobalDataPoint(int proc
877                  int dataPointNoInSample = dataPointNo - sampleNo * getNumDataPointsPerSample();                  int dataPointNoInSample = dataPointNo - sampleNo * getNumDataPointsPerSample();
878                  //                  //
879                  // Check a valid sample number has been supplied                  // Check a valid sample number has been supplied
880                  if (sampleNo >= getNumSamples() or sampleNo < 0 ) {                  if ((sampleNo >= getNumSamples()) || (sampleNo < 0 )) {
881                    throw DataException("Error - Data::convertToNumArray: invalid sampleNo.");                    throw DataException("Error - Data::convertToNumArray: invalid sampleNo.");
882                  }                  }
883                                
884                  //                  //
885                  // Check a valid data point number has been supplied                  // Check a valid data point number has been supplied
886                  if (dataPointNoInSample >= getNumDataPointsPerSample() or dataPointNoInSample < 0) {                  if ((dataPointNoInSample >= getNumDataPointsPerSample()) || (dataPointNoInSample < 0)) {
887                    throw DataException("Error - Data::convertToNumArray: invalid dataPointNoInSample.");                    throw DataException("Error - Data::convertToNumArray: invalid dataPointNoInSample.");
888                  }                  }
889                  // TODO: global error handling                  // TODO: global error handling

Legend:
Removed from v.922  
changed lines
  Added in v.924

  ViewVC Help
Powered by ViewVC 1.1.26