/[escript]/branches/schroedinger/escript/src/Data.h
ViewVC logotype

Diff of /branches/schroedinger/escript/src/Data.h

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

revision 1864 by jfenwick, Thu Oct 9 03:09:30 2008 UTC revision 1865 by jfenwick, Thu Oct 9 03:53:57 2008 UTC
# Line 340  class Data { Line 340  class Data {
340    std::string    std::string
341    toString() const;    toString() const;
342    
   
 //  /**  
 /*     \brief  
      Return the DataArrayView of the point data. This essentially contains  
      the shape information for each data point although it also may be used  
      to manipulate the point data.*/  
 //  */  
 //   ESCRIPT_DLL_API  
 //   inline  
 //   const DataArrayView&  
 //   getPointDataView() const  
 //   {  
 //      return m_data->getPointDataView();  
 //   }  
   
343    /**    /**
344       \brief       \brief
345       Whatever the current Data type make this into a DataExpanded.       Whatever the current Data type make this into a DataExpanded.
# Line 406  class Data { Line 391  class Data {
391    isLazy() const;    isLazy() const;
392    
393    /**    /**
394         \brief Return true if this data is ready.
395      */
396      ESCRIPT_DLL_API
397      bool
398      isReady() const;
399    
400      /**
401       \brief       \brief
402       Return true if this Data holds an instance of DataEmpty. This is _not_ the same as asking if the object       Return true if this Data holds an instance of DataEmpty. This is _not_ the same as asking if the object
403  contains datapoints.  contains datapoints.
# Line 1735  Data::algorithm(BinaryFunction operation Line 1727  Data::algorithm(BinaryFunction operation
1727      return escript::algorithm(*leftC,operation,initial_value);      return escript::algorithm(*leftC,operation,initial_value);
1728    } else if (isEmpty()) {    } else if (isEmpty()) {
1729      throw DataException("Error - Operations not permitted on instances of DataEmpty.");      throw DataException("Error - Operations not permitted on instances of DataEmpty.");
1730      } else if (isLazy()) {
1731        throw DataException("Error - Operations not permitted on instances of DataLazy.");
1732      } else {
1733        throw DataException("Error - Data encapsulates an unknown type.");
1734    }    }
   return 0;  
1735  }  }
1736    
1737  /**  /**
# Line 1781  Data::dp_algorithm(BinaryFunction operat Line 1776  Data::dp_algorithm(BinaryFunction operat
1776      EsysAssert((resultC!=0), "Programming error - casting result to DataConstant.");      EsysAssert((resultC!=0), "Programming error - casting result to DataConstant.");
1777      escript::dp_algorithm(*dataC,*resultC,operation,initial_value);      escript::dp_algorithm(*dataC,*resultC,operation,initial_value);
1778      return result;      return result;
1779      } else if (isLazy()) {
1780        throw DataException("Error - Operations not permitted on instances of DataLazy.");
1781      } else {
1782        throw DataException("Error - Data encapsulates an unknown type.");
1783    }    }
   Data falseRetVal; // to keep compiler quiet  
   return falseRetVal;  
1784  }  }
1785    
1786  /**  /**
# Line 1804  C_TensorBinaryOperation(Data const &arg_ Line 1801  C_TensorBinaryOperation(Data const &arg_
1801    {    {
1802       throw DataException("Error - Operations not permitted on instances of DataEmpty.");       throw DataException("Error - Operations not permitted on instances of DataEmpty.");
1803    }    }
1804      if (arg_0.isLazy() || arg_1.isLazy())
1805      {
1806         throw DataException("Error - Operations not permitted on lazy data.");
1807      }
1808    // Interpolate if necessary and find an appropriate function space    // Interpolate if necessary and find an appropriate function space
1809    Data arg_0_Z, arg_1_Z;    Data arg_0_Z, arg_1_Z;
1810    if (arg_0.getFunctionSpace()!=arg_1.getFunctionSpace()) {    if (arg_0.getFunctionSpace()!=arg_1.getFunctionSpace()) {
# Line 2717  C_TensorUnaryOperation(Data const &arg_0 Line 2718  C_TensorUnaryOperation(Data const &arg_0
2718    {    {
2719       throw DataException("Error - Operations not permitted on instances of DataEmpty.");       throw DataException("Error - Operations not permitted on instances of DataEmpty.");
2720    }    }
2721      if (arg_0.isLazy())
2722      {
2723         throw DataException("Error - Operations not permitted on lazy data.");
2724      }
2725    // Interpolate if necessary and find an appropriate function space    // Interpolate if necessary and find an appropriate function space
2726    Data arg_0_Z = Data(arg_0);    Data arg_0_Z = Data(arg_0);
2727    

Legend:
Removed from v.1864  
changed lines
  Added in v.1865

  ViewVC Help
Powered by ViewVC 1.1.26