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

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

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

revision 1962 by gross, Tue Nov 4 07:17:31 2008 UTC revision 2005 by jfenwick, Mon Nov 10 01:21:39 2008 UTC
# Line 36  namespace escript { Line 36  namespace escript {
36    
37  DataExpanded::DataExpanded(const boost::python::numeric::array& value,  DataExpanded::DataExpanded(const boost::python::numeric::array& value,
38                             const FunctionSpace& what)                             const FunctionSpace& what)
39    : DataAbstract(what,DataTypes::shapeFromNumArray(value))    : parent(what,DataTypes::shapeFromNumArray(value))
40  {  {
41    //    //
42    // initialise the data array for this object    // initialise the data array for this object
# Line 47  DataExpanded::DataExpanded(const boost:: Line 47  DataExpanded::DataExpanded(const boost::
47  }  }
48    
49  DataExpanded::DataExpanded(const DataExpanded& other)  DataExpanded::DataExpanded(const DataExpanded& other)
50    : DataAbstract(other.getFunctionSpace(), other.getShape()),    : parent(other.getFunctionSpace(), other.getShape()),
51    m_data(other.m_data)    m_data(other.m_data)
52  {  {
53  }  }
54    
55  DataExpanded::DataExpanded(const DataConstant& other)  DataExpanded::DataExpanded(const DataConstant& other)
56    : DataAbstract(other.getFunctionSpace(), other.getShape())    : parent(other.getFunctionSpace(), other.getShape())
57  {  {
58    //    //
59    // initialise the data array for this object    // initialise the data array for this object
# Line 64  DataExpanded::DataExpanded(const DataCon Line 64  DataExpanded::DataExpanded(const DataCon
64  }  }
65    
66  DataExpanded::DataExpanded(const DataTagged& other)  DataExpanded::DataExpanded(const DataTagged& other)
67    : DataAbstract(other.getFunctionSpace(), other.getShape())    : parent(other.getFunctionSpace(), other.getShape())
68  {  {
69    //    //
70    // initialise the data array for this object    // initialise the data array for this object
# Line 92  DataExpanded::DataExpanded(const DataTag Line 92  DataExpanded::DataExpanded(const DataTag
92    
93  DataExpanded::DataExpanded(const DataExpanded& other,  DataExpanded::DataExpanded(const DataExpanded& other,
94                             const DataTypes::RegionType& region)                             const DataTypes::RegionType& region)
95    : DataAbstract(other.getFunctionSpace(),DataTypes::getResultSliceShape(region))    : parent(other.getFunctionSpace(),DataTypes::getResultSliceShape(region))
96  {  {
97    //    //
98    // get the shape of the slice    // get the shape of the slice
# Line 145  DataExpanded::DataExpanded(const DataExp Line 145  DataExpanded::DataExpanded(const DataExp
145  DataExpanded::DataExpanded(const FunctionSpace& what,  DataExpanded::DataExpanded(const FunctionSpace& what,
146                             const DataTypes::ShapeType &shape,                             const DataTypes::ShapeType &shape,
147                             const DataTypes::ValueType &data)                             const DataTypes::ValueType &data)
148    : DataAbstract(what,shape)    : parent(what,shape)
149  {  {
150    EsysAssert(data.size()%getNoValues()==0,    EsysAssert(data.size()%getNoValues()==0,
151                   "DataExpanded Constructor - size of supplied data is not a multiple of shape size.");                   "DataExpanded Constructor - size of supplied data is not a multiple of shape size.");
# Line 359  DataExpanded::getPointOffset(int sampleN Line 359  DataExpanded::getPointOffset(int sampleN
359  {  {
360    return m_data.index(sampleNo,dataPointNo);    return m_data.index(sampleNo,dataPointNo);
361  }  }
362    
363    DataTypes::ValueType::size_type
364    DataExpanded::getPointOffset(int sampleNo,
365                                 int dataPointNo)
366    {
367      return m_data.index(sampleNo,dataPointNo);
368    }
369    
370  DataTypes::ValueType::size_type  DataTypes::ValueType::size_type
371  DataExpanded::getLength() const  DataExpanded::getLength() const

Legend:
Removed from v.1962  
changed lines
  Added in v.2005

  ViewVC Help
Powered by ViewVC 1.1.26