/[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 1322 by matt, Thu Sep 27 00:27:51 2007 UTC revision 1323 by matt, Thu Sep 27 06:20:29 2007 UTC
# Line 217  DataExpanded::copy(const DataArrayView& Line 217  DataExpanded::copy(const DataArrayView&
217        // DOASSERT is on which of course will play        // DOASSERT is on which of course will play
218        // havoc with the omp threads. Run single threaded        // havoc with the omp threads. Run single threaded
219        // if using DOASSERT.        // if using DOASSERT.
220        getPointDataView().copy(m_data.index(i,j),value);        getPointDataView().copy(getPointOffset(i,j),value);
221      }      }
222    }    }
223  }  }
# Line 274  DataExpanded::toString() const Line 274  DataExpanded::toString() const
274    DataArrayView tempView(getPointDataView().getData(),getPointDataView().getShape(),getPointDataView().getOffset());    DataArrayView tempView(getPointDataView().getData(),getPointDataView().getShape(),getPointDataView().getOffset());
275    for (int i=0;i<m_data.getNumRows();i++) {    for (int i=0;i<m_data.getNumRows();i++) {
276      for (int j=0;j<m_data.getNumCols();j++) {      for (int j=0;j<m_data.getNumCols();j++) {
277        tempView.setOffset(m_data.index(i,j));        tempView.setOffset(getPointOffset(i,j));
278        stringstream suffix;        stringstream suffix;
279        suffix << "( id: " << i << ", ref: " << fs.getReferenceIDOfSample(i) << ", pnt: " << j << ")";        suffix << "( id: " << i << ", ref: " << fs.getReferenceIDOfSample(i) << ", pnt: " << j << ")";
280        temp << tempView.toString(suffix.str());        temp << tempView.toString(suffix.str());
# Line 297  DataArrayView Line 297  DataArrayView
297  DataExpanded::getDataPoint(int sampleNo,  DataExpanded::getDataPoint(int sampleNo,
298                             int dataPointNo)                             int dataPointNo)
299  {  {
300    DataArrayView temp(m_data.getData(),getPointDataView().getShape(),m_data.index(sampleNo,dataPointNo));    DataArrayView temp(m_data.getData(),getPointDataView().getShape(),getPointOffset(sampleNo,dataPointNo));
301    return temp;    return temp;
302  }  }
303    

Legend:
Removed from v.1322  
changed lines
  Added in v.1323

  ViewVC Help
Powered by ViewVC 1.1.26