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

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

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

revision 1720 by jfenwick, Thu Aug 21 04:52:14 2008 UTC revision 1721 by jfenwick, Fri Aug 22 00:39:32 2008 UTC
# Line 223  DataVector::copyFromNumArray(const boost Line 223  DataVector::copyFromNumArray(const boost
223      arrayManager.delete_array(m_array_data);      arrayManager.delete_array(m_array_data);
224    }    }
225    
 // Need to ensure these values are handled properly  
 //   m_size = other.m_size;  
 //   m_dim = other.m_dim;  
 //   m_N = other.m_N;  
   
226    
227    m_array_data = arrayManager.new_array(1,value.nelements());    m_array_data = arrayManager.new_array(1,value.nelements());
 //   int i;  
 //   #pragma omp parallel for private(i) schedule(static)  
 //   for (i=0; i<m_size; i++) {  
 //     m_array_data[i] = other.m_array_data[i];  
 //   }  
228    
229        int si=0,sj=0,sk=0,sl=0;      // bounds for each dimension of the shape        int si=0,sj=0,sk=0,sl=0;      // bounds for each dimension of the shape
230        DataTypes::ShapeType tempShape;            DataTypes::ShapeType tempShape;    
# Line 242  DataVector::copyFromNumArray(const boost Line 232  DataVector::copyFromNumArray(const boost
232           tempShape.push_back(extract<int>(value.getshape()[i]));           tempShape.push_back(extract<int>(value.getshape()[i]));
233        }        }
234    
 //       EsysAssert((!isEmpty()&&checkShape(tempShape)),  
 //                  createShapeErrorMessage("Error - Couldn't copy due to shape mismatch.",tempShape));  
   
235        if (value.getrank()==0) {        if (value.getrank()==0) {
236      m_array_data[0]=extract<double>(value[0]);      m_array_data[0]=extract<double>(value[value.getshape()]);
237        } else if (value.getrank()==1) {        } else if (value.getrank()==1) {
238       si=tempShape[0];       si=tempShape[0];
239           for (ValueType::size_type i=0;i<si;i++) {           for (ValueType::size_type i=0;i<si;i++) {

Legend:
Removed from v.1720  
changed lines
  Added in v.1721

  ViewVC Help
Powered by ViewVC 1.1.26