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

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

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

trunk/esys2/escript/src/Data/DataEmpty.cpp revision 102 by jgs, Wed Dec 15 07:08:39 2004 UTC trunk/escript/src/DataEmpty.cpp revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
 //$Id$  
 /*  
  ******************************************************************************  
  *                                                                            *  
  *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *  
  *                                                                            *  
  * This software is the property of ACcESS. No part of this code              *  
  * may be copied in any form or by any means without the expressed written    *  
  * consent of ACcESS.  Copying, use or modification of this software          *  
  * by any unauthorised person is illegal unless that person has a software    *  
  * license agreement with ACcESS.                                             *  
  *                                                                            *  
  ******************************************************************************  
 */  
1    
2  #include "escript/Data/DataEmpty.h"  /* $Id$ */
3  #include "escript/Data/DataException.h"  
4    /*******************************************************
5     *
6     *           Copyright 2003-2007 by ACceSS MNRF
7     *       Copyright 2007 by University of Queensland
8     *
9     *                http://esscc.uq.edu.au
10     *        Primary Business: Queensland, Australia
11     *  Licensed under the Open Software License version 3.0
12     *     http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16    #include "DataEmpty.h"
17    #include "DataException.h"
18    
19  namespace escript {  namespace escript {
20    
21  DataEmpty::DataEmpty() :  DataEmpty::DataEmpty() :
22    DataAbstract(FunctionSpace())    DataAbstract(FunctionSpace())
23  {  {
24      resetPointDataView();
25  }  }
26    
27  DataEmpty::~DataEmpty()  DataEmpty::~DataEmpty()
# Line 30  DataEmpty::~DataEmpty() Line 31  DataEmpty::~DataEmpty()
31  std::string  std::string
32  DataEmpty::toString() const  DataEmpty::toString() const
33  {  {
34    return "Empty Data.";    return "(Empty Data)";
 }  
   
 void  
 DataEmpty::throwStandardException(const std::string& functionName) const  
 {  
   throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");  
35  }  }
36    
37  DataArrayView::ValueType::size_type  DataArrayView::ValueType::size_type
# Line 47  DataEmpty::getPointOffset(int sampleNo, Line 42  DataEmpty::getPointOffset(int sampleNo,
42    return 0;    return 0;
43  }  }
44    
 double*  
 DataEmpty::getSampleDataByTag(int tag)  
 {  
   throwStandardException("getSampleDataByTag");  
   return 0;  
 }  
   
45  DataArrayView  DataArrayView
46  DataEmpty::getDataPoint(int sampleNo,  DataEmpty::getDataPoint(int sampleNo,
47                          int dataPointNo)                          int dataPointNo)
# Line 83  DataEmpty::setSlice(const DataAbstract* Line 71  DataEmpty::setSlice(const DataAbstract*
71  }  }
72    
73  void  void
74  DataEmpty::reshapeDataPoint(const DataArrayView::ShapeType& shape)  DataEmpty::throwStandardException(const std::string& functionName) const
75  {  {
76    throwStandardException("reshapeDataPoint");    throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
77  }  }
78    
79  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.102  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26