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

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

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

revision 150 by jgs, Fri Jul 8 04:08:13 2005 UTC revision 151 by jgs, Thu Sep 22 01:55:00 2005 UTC
# Line 72  DataConstant::DataConstant(const DataCon Line 72  DataConstant::DataConstant(const DataCon
72    DataArrayView::ShapeType shape(DataArrayView::getResultSliceShape(region));    DataArrayView::ShapeType shape(DataArrayView::getResultSliceShape(region));
73    //    //
74    // allocate space for this new DataConstant's data    // allocate space for this new DataConstant's data
75    m_data.resize(DataArrayView::noValues(shape));    int len = DataArrayView::noValues(shape);
76      m_data.resize(len,0.,len);
77    //    //
78    // create a view of the data with the correct shape    // create a view of the data with the correct shape
79    DataArrayView tempView(m_data,shape);    DataArrayView tempView(m_data,shape);
# Line 170  DataConstant::reshapeDataPoint(const Dat Line 171  DataConstant::reshapeDataPoint(const Dat
171           << "This Data has data points with rank: " << getPointDataView().getRank();           << "This Data has data points with rank: " << getPointDataView().getRank();
172      throw DataException(temp.str());      throw DataException(temp.str());
173    }    }
174    m_data.resize(DataArrayView::noValues(shape),getPointDataView()());    int len = DataArrayView::noValues(shape);
175      m_data.resize(len,getPointDataView()(),len);
176    DataArrayView newView(m_data,shape);    DataArrayView newView(m_data,shape);
177    setPointDataView(newView);    setPointDataView(newView);
178  }  }

Legend:
Removed from v.150  
changed lines
  Added in v.151

  ViewVC Help
Powered by ViewVC 1.1.26