/[escript]/trunk-mpi-branch/escript/src/Data.cpp
ViewVC logotype

Diff of /trunk-mpi-branch/escript/src/Data.cpp

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

revision 1310 by matt, Wed Sep 19 06:39:45 2007 UTC revision 1311 by matt, Mon Sep 24 06:13:58 2007 UTC
# Line 61  Data::Data(double value, Line 61  Data::Data(double value,
61    for (int i = 0; i < shape.attr("__len__")(); ++i) {    for (int i = 0; i < shape.attr("__len__")(); ++i) {
62      dataPointShape.push_back(extract<const int>(shape[i]));      dataPointShape.push_back(extract<const int>(shape[i]));
63    }    }
64    DataArray temp(dataPointShape,value);  
65    initialise(temp.getView(),what,expanded);    int len = DataArrayView::noValues(dataPointShape);
66    
67      DataVector temp_data(len,value,len);
68      DataArrayView temp_dataView(temp_data, dataPointShape);
69    
70      initialise(temp_dataView, what, expanded);
71    
72      // DataArray temp(dataPointShape,value);
73      // initialise(temp.getView(),what,expanded);
74    m_protected=false;    m_protected=false;
75  }  }
76    
# Line 71  Data::Data(double value, Line 79  Data::Data(double value,
79         const FunctionSpace& what,         const FunctionSpace& what,
80             bool expanded)             bool expanded)
81  {  {
82    DataArray temp(dataPointShape,value);    int len = DataArrayView::noValues(dataPointShape);
83    initialise(temp.getView(),what,expanded);  
84      DataVector temp_data(len,value,len);
85      DataArrayView temp_dataView(temp_data, dataPointShape);
86    
87      initialise(temp_dataView, what, expanded);
88    
89      // DataArray temp(dataPointShape,value);
90      // initialise(temp.getView(),what,expanded);
91    m_protected=false;    m_protected=false;
92  }  }
93    
# Line 162  Data::Data(const object& value, Line 177  Data::Data(const object& value,
177    // Create DataConstant using the given value and all other parameters    // Create DataConstant using the given value and all other parameters
178    // copied from other. If value is a rank 0 object this Data    // copied from other. If value is a rank 0 object this Data
179    // will assume the point data shape of other.    // will assume the point data shape of other.
180      
181    DataArray temp(value);    DataArray temp(value);
182    if (temp.getView().getRank()==0) {    if (temp.getView().getRank()==0) {
183      //      //

Legend:
Removed from v.1310  
changed lines
  Added in v.1311

  ViewVC Help
Powered by ViewVC 1.1.26