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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 854 - (hide annotations)
Thu Sep 21 05:29:42 2006 UTC (13 years, 2 months ago) by gross
File size: 1755 byte(s)
Some modifications to the binary operations +,-,*/, pow. 
The code is a bit simpler now and more efficient has there is
no reseising required now. the resizing method has been removed as
it is very, very inefficient. Even serial code should be faster now.
It is now forbidden to do an inplace update of scalar data object with an object 
of rank >0 as this is very slow (and does not make much sense). 


1 jgs 102 //$Id$
2 jgs 121
3 jgs 82 /*
4 elspeth 615 ************************************************************
5     * Copyright 2006 by ACcESS MNRF *
6     * *
7     * http://www.access.edu.au *
8     * Primary Business: Queensland, Australia *
9     * Licensed under the Open Software License version 3.0 *
10     * http://www.opensource.org/licenses/osl-3.0.php *
11     * *
12     ************************************************************
13 jgs 82 */
14    
15 jgs 474 #include "DataEmpty.h"
16     #include "DataException.h"
17 jgs 82
18     namespace escript {
19    
20     DataEmpty::DataEmpty() :
21 jgs 102 DataAbstract(FunctionSpace())
22 jgs 82 {
23 jgs 119 resetPointDataView();
24 jgs 82 }
25    
26 jgs 102 DataEmpty::~DataEmpty()
27     {
28 jgs 82 }
29    
30 jgs 102 std::string
31     DataEmpty::toString() const
32     {
33 jgs 121 return "(Empty Data)";
34 jgs 82 }
35    
36 jgs 102 DataArrayView::ValueType::size_type
37     DataEmpty::getPointOffset(int sampleNo,
38     int dataPointNo) const
39 jgs 82 {
40     throwStandardException("getPointOffset");
41     return 0;
42     }
43    
44 jgs 102 DataArrayView
45     DataEmpty::getDataPoint(int sampleNo,
46     int dataPointNo)
47 jgs 82 {
48     throwStandardException("getDataPoint");
49     return getPointDataView();
50     }
51    
52 jgs 102 DataArrayView::ValueType::size_type
53     DataEmpty::getLength() const
54 jgs 82 {
55     return 0;
56     }
57    
58 jgs 102 DataAbstract*
59     DataEmpty::getSlice(const DataArrayView::RegionType& region) const
60 jgs 82 {
61     throwStandardException("getSlice");
62     return 0;
63     }
64    
65 jgs 102 void
66     DataEmpty::setSlice(const DataAbstract* value,
67     const DataArrayView::RegionType& region)
68 jgs 82 {
69     throwStandardException("setSlice");
70     }
71    
72 jgs 102 void
73 jgs 121 DataEmpty::throwStandardException(const std::string& functionName) const
74     {
75     throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
76     }
77    
78 jgs 82 } // end of namespace

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26