/[escript]/branches/trilinos_from_5897/escriptcore/src/DataAbstract.cpp
ViewVC logotype

Diff of /branches/trilinos_from_5897/escriptcore/src/DataAbstract.cpp

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

revision 5962 by caltinay, Fri Feb 5 03:37:49 2016 UTC revision 5963 by caltinay, Mon Feb 22 06:59:27 2016 UTC
# Line 91  DataAbstract::isLazy() const Line 91  DataAbstract::isLazy() const
91      return (dynamic_cast<const DataLazy*>(this)!=0);      return (dynamic_cast<const DataLazy*>(this)!=0);
92  }  }
93    
94    bool
95    DataAbstract::isComplex() const
96    {
97        return m_iscompl;
98    }
99    
100    
101  DataAbstract::DataAbstract(const FunctionSpace& what, const ShapeType& shape, bool isDataEmpty):  DataAbstract::DataAbstract(const FunctionSpace& what, const ShapeType& shape, bool isDataEmpty, bool isCplx):
102      m_lazyshared(false),      m_lazyshared(false),
103      m_noSamples(what.getNumSamples()),      m_noSamples(what.getNumSamples()),
104      m_noDataPointsPerSample(what.getNumDPPSample()),      m_noDataPointsPerSample(what.getNumDPPSample()),
105        m_iscompl(isCplx),
106      m_functionSpace(what),      m_functionSpace(what),
107      m_shape(shape),      m_shape(shape),
108      m_novalues(DataTypes::noValues(shape)),      m_novalues(DataTypes::noValues(shape)),
109      m_rank(DataTypes::getRank(shape))      m_rank(DataTypes::getRank(shape))
   
110  {  {
111  #ifdef EXWRITECHK  #ifdef EXWRITECHK
112      exclusivewritecalled=false;      exclusivewritecalled=false;
# Line 162  DataAbstract::dump(const std::string fil Line 167  DataAbstract::dump(const std::string fil
167    
168    
169    
170  DataAbstract::ValueType::value_type*  DataTypes::real_t*
171  DataAbstract::getSampleDataByTag(int tag)  DataAbstract::getSampleDataByTag(int tag)
172  {  {
173      throw DataException("Error - DataAbstract::getSampleDataByTag: Data type does not have tag values.");      throw DataException("Error - DataAbstract::getSampleDataByTag: Data type does not have tag values.");
174  }  }
175    
176    
177    DataTypes::cplx_t*
178    DataAbstract::getSampleDataByTag_C(int tag)
179    {
180        throw DataException("Error - DataAbstract::getSampleDataByTag_C: Data type does not have complex tag values.");
181    }
182    
183  size_t  size_t
184  DataAbstract::getTagCount() const  DataAbstract::getTagCount() const
185  {  {
# Line 179  DataAbstract::getTagCount() const Line 191  DataAbstract::getTagCount() const
191  void    void  
192  DataAbstract::setTaggedValue(int tagKey,  DataAbstract::setTaggedValue(int tagKey,
193             const DataTypes::ShapeType& pointshape,             const DataTypes::ShapeType& pointshape,
194                 const DataTypes::ValueType& value,             const DataTypes::RealVectorType& value,
195             int dataOffset)             int dataOffset)
196  {  {
197      throw DataException("Error - DataAbstract::setTaggedValue: Data type does not have tag values.");      throw DataException("Error - DataAbstract::setTaggedValue: Data type does not have tag values.");
198  }  }
199    
200    void  
201    DataAbstract::setTaggedValue(int tagKey,
202               const DataTypes::ShapeType& pointshape,
203               const DataTypes::CplxVectorType& value,
204               int dataOffset)
205    {
206        throw DataException("Error - DataAbstract::setTaggedValue: Data type does not have tag values.");
207    }
208    
209  int  int
210  DataAbstract::getTagNumber(int dpno)  DataAbstract::getTagNumber(int dpno)
# Line 194  DataAbstract::getTagNumber(int dpno) Line 214  DataAbstract::getTagNumber(int dpno)
214  }  }
215    
216  void  void
217  DataAbstract::copyToDataPoint(const int sampleNo, const int dataPointNo, const double value)  DataAbstract::copyToDataPoint(const int sampleNo, const int dataPointNo, const DataTypes::real_t value)
218    {
219        throw DataException("Error - DataAbstract::copying data from double value to a single data point is not supported.");
220    }
221    
222    void
223    DataAbstract::copyToDataPoint(const int sampleNo, const int dataPointNo, const DataTypes::cplx_t value)
224  {  {
225      throw DataException("Error - DataAbstract::copying data from double value to a single data point is not supported.");      throw DataException("Error - DataAbstract::copying data from double value to a single data point is not supported.");
226  }  }
# Line 261  DataAbstract::setToZero() Line 287  DataAbstract::setToZero()
287  }  }
288    
289  void  void
290  DataAbstract::reorderByReferenceIDs(dim_t *reference_ids)  DataAbstract::reorderByReferenceIDs(DataTypes::dim_t* reference_ids)
291  {  {
292      throw DataException("Error - DataAbstract:: cannot reorder by reference ids.");      throw DataException("Error - DataAbstract:: cannot reorder by reference ids.");
293  }  }
# Line 313  void DataAbstract::makeLazyShared() Line 339  void DataAbstract::makeLazyShared()
339      }      }
340  }    }  
341    
342    void DataAbstract::complicate()
343    {
344        throw DataException("This type does not support converting to complex.");
345    }
346    
347    
348  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.5962  
changed lines
  Added in v.5963

  ViewVC Help
Powered by ViewVC 1.1.26