/[escript]/branches/arrayview_from_1695_trunk/escript/src/Data.cpp
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/escript/src/Data.cpp

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

revision 1697 by jfenwick, Mon Aug 11 06:29:54 2008 UTC revision 1698 by jfenwick, Tue Aug 12 01:13:16 2008 UTC
# Line 61  Data::Data(double value, Line 61  Data::Data(double value,
61      dataPointShape.push_back(extract<const int>(shape[i]));      dataPointShape.push_back(extract<const int>(shape[i]));
62    }    }
63    
64    int len = DataArrayView::noValues(dataPointShape);    int len = DataTypes::noValues(dataPointShape);
65    DataVector temp_data(len,value,len);    DataVector temp_data(len,value,len);
66    DataArrayView temp_dataView(temp_data, dataPointShape);    DataArrayView temp_dataView(temp_data, dataPointShape);
67    
# Line 75  Data::Data(double value, Line 75  Data::Data(double value,
75         const FunctionSpace& what,         const FunctionSpace& what,
76             bool expanded)             bool expanded)
77  {  {
78    int len = DataArrayView::noValues(dataPointShape);    int len = DataTypes::noValues(dataPointShape);
79    
80    DataVector temp_data(len,value,len);    DataVector temp_data(len,value,len);
81    DataArrayView temp_dataView(temp_data, dataPointShape);    DataArrayView temp_dataView(temp_data, dataPointShape);
# Line 178  Data::Data(const object& value, Line 178  Data::Data(const object& value,
178      tempShape.push_back(extract<int>(asNumArray.getshape()[i]));      tempShape.push_back(extract<int>(asNumArray.getshape()[i]));
179    }    }
180    // get the space for the data vector    // get the space for the data vector
181    int len = DataArrayView::noValues(tempShape);    int len = DataTypes::noValues(tempShape);
182    DataVector temp_data(len, 0.0, len);    DataVector temp_data(len, 0.0, len);
183    DataArrayView temp_dataView(temp_data, tempShape);    DataArrayView temp_dataView(temp_data, tempShape);
184    temp_dataView.copy(asNumArray);    temp_dataView.copy(asNumArray);
# Line 189  Data::Data(const object& value, Line 189  Data::Data(const object& value,
189    // will assume the point data shape of other.    // will assume the point data shape of other.
190    
191    if (temp_dataView.getRank()==0) {    if (temp_dataView.getRank()==0) {
192      int len = DataArrayView::noValues(other.getPointDataView().getShape());      int len = DataTypes::noValues(other.getPointDataView().getShape());
193    
194      DataVector temp2_data(len, temp_dataView(), len);      DataVector temp2_data(len, temp_dataView(), len);
195      DataArrayView temp2_dataView(temp2_data, other.getPointDataView().getShape());      DataArrayView temp2_dataView(temp2_data, other.getPointDataView().getShape());
# Line 1783  Data::setTaggedValue(int tagKey, Line 1783  Data::setTaggedValue(int tagKey,
1783    }    }
1784    
1785    // get the space for the data vector    // get the space for the data vector
1786    int len = DataArrayView::noValues(tempShape);    int len = DataTypes::noValues(tempShape);
1787    DataVector temp_data(len, 0.0, len);    DataVector temp_data(len, 0.0, len);
1788    DataArrayView temp_dataView(temp_data, tempShape);    DataArrayView temp_dataView(temp_data, tempShape);
1789    temp_dataView.copy(asNumArray);    temp_dataView.copy(asNumArray);

Legend:
Removed from v.1697  
changed lines
  Added in v.1698

  ViewVC Help
Powered by ViewVC 1.1.26