/[escript]/branches/lapack2681/escript/src/DataConstant.cpp
ViewVC logotype

Diff of /branches/lapack2681/escript/src/DataConstant.cpp

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

revision 108 by jgs, Thu Jan 27 06:21:59 2005 UTC revision 119 by jgs, Tue Apr 12 04:45:05 2005 UTC
# Line 32  DataConstant::DataConstant(const boost:: Line 32  DataConstant::DataConstant(const boost::
32    //    //
33    // copy the data in the correct format    // copy the data in the correct format
34    m_data=temp.getData();    m_data=temp.getData();
   DataArrayView tempView(m_data,temp.getView().getShape());  
35    //    //
36    // copy the view of the data    // create the view of the data
37      DataArrayView tempView(m_data,temp.getView().getShape());
38    setPointDataView(tempView);    setPointDataView(tempView);
39  }  }
40    
# Line 45  DataConstant::DataConstant(const DataArr Line 45  DataConstant::DataConstant(const DataArr
45    //    //
46    // copy the data in the correct format    // copy the data in the correct format
47    m_data=value.getData();    m_data=value.getData();
   DataArrayView tempView(m_data,value.getShape());  
48    //    //
49    // copy the view of the data    // create the view of the data
50      DataArrayView tempView(m_data,value.getShape());
51    setPointDataView(tempView);    setPointDataView(tempView);
52  }  }
53    
# Line 57  DataConstant::DataConstant(const DataCon Line 57  DataConstant::DataConstant(const DataCon
57    //    //
58    // copy the data in the correct format    // copy the data in the correct format
59    m_data=other.m_data;    m_data=other.m_data;
   DataArrayView tempView(m_data,other.getPointDataView().getShape());  
60    //    //
61    // copy the view of the data    // create the view of the data
62      DataArrayView tempView(m_data,other.getPointDataView().getShape());
63    setPointDataView(tempView);    setPointDataView(tempView);
64  }  }
65    
# Line 76  DataConstant::DataConstant(const DataCon Line 76  DataConstant::DataConstant(const DataCon
76    //    //
77    // create a view of the data with the correct shape    // create a view of the data with the correct shape
78    DataArrayView tempView(m_data,shape);    DataArrayView tempView(m_data,shape);
   // copy the data from the slice to the temp view  
79    DataArrayView::RegionLoopRangeType region_loop_range=getSliceRegionLoopRange(region);    DataArrayView::RegionLoopRangeType region_loop_range=getSliceRegionLoopRange(region);
80      //
81      // load the view with the data from the slice
82    tempView.copySlice(other.getPointDataView(),region_loop_range);    tempView.copySlice(other.getPointDataView(),region_loop_range);
83      setPointDataView(tempView);
84    }
85    
86    DataConstant::DataConstant(const FunctionSpace& what,
87                               const DataArrayView::ShapeType &shape,
88                               const DataArrayView::ValueType &data)
89      : DataAbstract(what)
90    {
91    //    //
92    // store the temp view of the data in this object    // copy the data in the correct format
93      m_data=data;
94      //
95      // create the view of the data
96      DataArrayView tempView(m_data,shape);
97    setPointDataView(tempView);    setPointDataView(tempView);
98  }  }
99    

Legend:
Removed from v.108  
changed lines
  Added in v.119

  ViewVC Help
Powered by ViewVC 1.1.26