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

Diff of /trunk/escript/src/DataExpanded.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 383  DataExpanded::copyToDataPoint(const int Line 383  DataExpanded::copyToDataPoint(const int
383    ShapeType dataPointShape = getPointDataView().getShape();    ShapeType dataPointShape = getPointDataView().getShape();
384    if (numSamples*numDataPointsPerSample > 0) {    if (numSamples*numDataPointsPerSample > 0) {
385       //TODO: global error handling       //TODO: global error handling
386       if (sampleNo >= numSamples or sampleNo < 0 ) {       if ((sampleNo >= numSamples) || (sampleNo < 0 )) {
387            throw DataException("Error - DataExpanded::copyDataPoint invalid sampleNo.");            throw DataException("Error - DataExpanded::copyDataPoint invalid sampleNo.");
388       }       }
389       if (dataPointNo >= numDataPointsPerSample or dataPointNo < 0) {       if ((dataPointNo >= numDataPointsPerSample) || (dataPointNo < 0)) {
390             throw DataException("Error - DataExpanded::copyDataPoint invalid dataPointNoInSample.");             throw DataException("Error - DataExpanded::copyDataPoint invalid dataPointNoInSample.");
391       }       }
392       DataArrayView dataPointView = getDataPoint(sampleNo, dataPointNo);       DataArrayView dataPointView = getDataPoint(sampleNo, dataPointNo);
# Line 437  DataExpanded::copyToDataPoint(const int Line 437  DataExpanded::copyToDataPoint(const int
437         throw DataException("Rank of numarray does not match Data object rank");         throw DataException("Rank of numarray does not match Data object rank");
438    if (numSamples*numDataPointsPerSample > 0) {    if (numSamples*numDataPointsPerSample > 0) {
439       //TODO: global error handling       //TODO: global error handling
440       if (sampleNo >= numSamples or sampleNo < 0 ) {       if ((sampleNo >= numSamples) || (sampleNo < 0 )) {
441            throw DataException("Error - DataExpanded::copyDataPoint invalid sampleNo.");            throw DataException("Error - DataExpanded::copyDataPoint invalid sampleNo.");
442       }       }
443       if (dataPointNo >= numDataPointsPerSample or dataPointNo < 0) {       if ((dataPointNo >= numDataPointsPerSample) || (dataPointNo < 0)) {
444             throw DataException("Error - DataExpanded::copyDataPoint invalid dataPointNoInSample.");             throw DataException("Error - DataExpanded::copyDataPoint invalid dataPointNoInSample.");
445       }       }
446       DataArrayView dataPointView = getDataPoint(sampleNo, dataPointNo);       DataArrayView dataPointView = getDataPoint(sampleNo, dataPointNo);

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

  ViewVC Help
Powered by ViewVC 1.1.26