/[escript]/branches/arrayview_from_1695_trunk/escript/src/DataEmpty.cpp
ViewVC logotype

Contents of /branches/arrayview_from_1695_trunk/escript/src/DataEmpty.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1773 - (show annotations)
Tue Sep 9 02:52:26 2008 UTC (13 years, 1 month ago) by jfenwick
File size: 1997 byte(s)
Branch commit

Fixed some bugs.
Code now passes all_tests.
Next step is to test under OMP and MPI


1
2 /* $Id$ */
3
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
20 namespace {
21
22
23 // This function is inlined to prevent the compiler complaining about missing return statements
24 // in methods where it is called.
25 // inline
26 void
27 throwStandardException(const std::string& functionName)
28 {
29 throw escript::DataException("Error - "+functionName+" function call invalid for DataEmpty.");
30 }
31
32
33 }
34
35 namespace escript {
36
37 DataEmpty::DataEmpty() :
38 DataAbstract(FunctionSpace(),DataTypes::scalarShape)
39 {
40 // resetPointDataView();
41 }
42
43 DataEmpty::~DataEmpty()
44 {
45 }
46
47 std::string
48 DataEmpty::toString() const
49 {
50 return "(Empty Data)";
51 }
52
53 DataTypes::ValueType::size_type
54 DataEmpty::getPointOffset(int sampleNo,
55 int dataPointNo) const
56 {
57 throwStandardException("getPointOffset");
58 return 0;
59 }
60
61 // DataArrayView
62 // DataEmpty::getDataPoint(int sampleNo,
63 // int dataPointNo)
64 // {
65 // throwStandardException("getDataPoint");
66 // return getPointDataView();
67 // }
68
69 DataTypes::ValueType::size_type
70 DataEmpty::getLength() const
71 {
72 return 0;
73 }
74
75 DataAbstract*
76 DataEmpty::getSlice(const DataTypes::RegionType& region) const
77 {
78 throwStandardException("getSlice");
79 return 0;
80 }
81
82 void
83 DataEmpty::setSlice(const DataAbstract* value,
84 const DataTypes::RegionType& region)
85 {
86 throwStandardException("setSlice");
87 }
88
89
90
91 DataTypes::ValueType&
92 DataEmpty::getVector()
93 {
94 throwStandardException("getVector");
95 }
96
97 const DataTypes::ValueType&
98 DataEmpty::getVector() const
99 {
100 throwStandardException("getVector");
101 }
102
103
104
105 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26