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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1872 - (hide annotations)
Mon Oct 13 00:18:55 2008 UTC (11 years ago) by jfenwick
File size: 6553 byte(s)
Closing the moreshared branch

1 ksteube 1312
2     /*******************************************************
3 ksteube 1811 *
4     * Copyright (c) 2003-2008 by University of Queensland
5     * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
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 ksteube 1312
14 ksteube 1811
15 jgs 474 #include "AbstractDomain.h"
16     #include "DomainException.h"
17 jgs 480 #include "Data.h"
18 ksteube 1800 #include "paso/Paso_MPI.h"
19 jgs 480
20 jgs 121 using namespace std;
21 jgs 149
22 jgs 82 namespace escript {
23    
24 jfenwick 1872
25     Domain_ptr AbstractDomain::getPtr()
26     {
27     if (_internal_weak_this.expired())
28     {
29     return Domain_ptr(this);
30     }
31     else
32     {
33     return shared_from_this();
34     }
35     }
36    
37     const_Domain_ptr AbstractDomain::getPtr() const
38     {
39     if (_internal_weak_this.expired())
40     {
41     return const_Domain_ptr(this);
42     }
43     else
44     {
45     return shared_from_this();
46     }
47     }
48    
49 jgs 82 AbstractDomain::AbstractDomain() {
50     }
51    
52     AbstractDomain::~AbstractDomain() {
53     }
54    
55 ksteube 1312 int AbstractDomain::getMPISize() const
56     {
57     return 1;
58     }
59     int AbstractDomain::getMPIRank() const
60     {
61     return 0;
62     }
63    
64    
65 jgs 82 void AbstractDomain::throwStandardException(const std::string& functionName) const
66     {
67 jgs 115 throw DomainException("Error - Base class function: " + functionName + " should not be called. Programming error.");
68 jgs 82 }
69    
70     bool AbstractDomain::isValidFunctionSpaceType(int functionSpaceType) const
71     {
72     throwStandardException("AbstractDomain::isValidFunctionSpaceType");
73     return false;
74     }
75    
76     std::string AbstractDomain::getDescription() const
77     {
78     throwStandardException("AbstractDomain::getDescription");
79     return "";
80     }
81    
82     std::string AbstractDomain::functionSpaceTypeAsString(int functionSpaceType) const
83     {
84     throwStandardException("AbstractDomain::functionSpaceTypeAsString");
85     return "";
86     }
87    
88     int AbstractDomain::getDim() const
89     {
90     throwStandardException("AbstractDomain::getDim");
91     return 0;
92     }
93    
94     void AbstractDomain::write(const std::string& filename) const
95     {
96     throwStandardException("AbstractDomain::write");
97     return;
98     }
99 ksteube 1312 void AbstractDomain::dump(const std::string& filename) const
100     {
101     throwStandardException("AbstractDomain::dump");
102     return;
103     }
104 jgs 82
105     std::pair<int,int> AbstractDomain::getDataShape(int functionSpaceCode) const
106     {
107     throwStandardException("AbstractDomain::getDataShape");
108     return std::pair<int,int>(0,0);
109     }
110    
111     int AbstractDomain::getTagFromSampleNo(int functionSpaceType, int sampleNo) const
112     {
113     throwStandardException("AbstractDomain::getTagFromSampleNo");
114     return 0;
115     }
116    
117 gross 964 int* AbstractDomain::borrowSampleReferenceIDs(int functionSpaceType) const
118 jgs 110 {
119 gross 964 throwStandardException("AbstractDomain::borrowSampleReferenceIDs");
120 jgs 110 return 0;
121     }
122    
123 jgs 82 void AbstractDomain::setNewX(const escript::Data& arg)
124     {
125     throwStandardException("AbstractDomain::setNewX");
126     return;
127     }
128    
129     void AbstractDomain::interpolateOnDomain(escript::Data& target,const escript::Data& source) const
130     {
131     throwStandardException("AbstractDomain::interpolateOnDomain");
132     return;
133     }
134     void AbstractDomain::interpolateACross(escript::Data& target, const escript::Data& source) const
135     {
136     throwStandardException("AbstractDomain::interpolateACross");
137     return;
138     }
139    
140 jgs 102 escript::Data AbstractDomain::getX() const
141     {
142     throwStandardException("AbstractDomain::getX");
143     return Data();
144     }
145    
146     escript::Data AbstractDomain::getNormal() const
147     {
148     throwStandardException("AbstractDomain::getNormal");
149     return Data();
150     }
151 jgs 115
152 jgs 102 escript::Data AbstractDomain::getSize() const
153     {
154     throwStandardException("AbstractDomain::getSize");
155     return Data();
156     }
157 jgs 115
158 jgs 82 void AbstractDomain::setToX(escript::Data& out) const
159     {
160     throwStandardException("AbstractDomain::setToX");
161     return;
162     }
163    
164     void AbstractDomain::setToNormal(escript::Data& out) const
165     {
166     throwStandardException("AbstractDomain::setToNormal");
167     return;
168     }
169 jgs 115
170 jgs 82 void AbstractDomain::setToSize(escript::Data& out) const
171     {
172     throwStandardException("AbstractDomain::setToSize");
173     return;
174     }
175    
176     void AbstractDomain::setToGradient(escript::Data& grad, const escript::Data& arg) const
177     {
178     throwStandardException("AbstractDomain::setToGradient");
179     return;
180     }
181    
182 gross 767 void AbstractDomain::setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const
183     {
184     throwStandardException("AbstractDomain::setTags");
185     return;
186     }
187    
188 jgs 153 void AbstractDomain::saveDX(const std::string& filename,const boost::python::dict& arg) const
189 jgs 82 {
190     throwStandardException("AbstractDomain::saveDX");
191     return;
192     }
193    
194 jgs 153 void AbstractDomain::saveVTK(const std::string& filename,const boost::python::dict& arg) const
195 jgs 110 {
196     throwStandardException("AbstractDomain::saveVTK");
197     return;
198     }
199    
200 jgs 82 bool AbstractDomain::probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const
201     {
202     throwStandardException("AbstractDomain::probeInterpolationOnDomain");
203     return false;
204     }
205    
206     bool AbstractDomain::probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const
207     {
208     throwStandardException("AbstractDomain::probeInterpolationACross");
209     return false;
210     }
211    
212     bool AbstractDomain::isCellOriented(int functionSpaceCode) const
213     {
214     throwStandardException("AbstractDomain::isCellOriented");
215     return false;
216     }
217    
218     bool AbstractDomain::operator==(const AbstractDomain& other) const
219     {
220 jgs 121 throwStandardException("AbstractDomain::operator==");
221     return false;
222 jgs 82 }
223     bool AbstractDomain::operator!=(const AbstractDomain& other) const
224     {
225 jgs 121 throwStandardException("AbstractDomain::operator!=");
226     return false;
227 jgs 82 }
228    
229 gross 797 AbstractDomain::StatusType AbstractDomain::getStatus() const
230     {
231     throwStandardException("AbstractDomain::getStatus");
232     return 0;
233     }
234 gross 1044 void AbstractDomain::setTagMap(const std::string& name, int tag)
235     {
236     throwStandardException("AbstractDomain::set TagMap is not implemented.");
237     }
238     int AbstractDomain::getTag(const std::string& name) const
239     {
240     throwStandardException("AbstractDomain::getTag is not implemented.");
241     return 0;
242     }
243 gross 797
244 gross 1044 bool AbstractDomain::isValidTagName(const std::string& name) const
245     {
246     return false;
247     }
248 gross 797
249 gross 1044 std::string AbstractDomain::showTagNames() const
250     {
251     throwStandardException("AbstractDomain::showTagNames is not implemented.");
252     return string();
253     }
254    
255 gross 1716 int AbstractDomain::getNumberOfTagsInUse(int functionSpaceCode) const
256     {
257     throwStandardException("AbstractDomain::getNumberOfTagsInUse is not implemented.");
258     return 0;
259     }
260     int* AbstractDomain::borrowListOfTagsInUse(int functionSpaceCode) const
261     {
262     throwStandardException("AbstractDomain::borrowListOfTagsInUse is not implemented.");
263     return NULL;
264     }
265 gross 1044
266    
267 jfenwick 1802 bool AbstractDomain::canTag(int functionspacecode) const
268     {
269     throwStandardException("AbstractDomain::canTag is not implemented.");
270     return false;
271     }
272 gross 1716
273    
274    
275 jgs 115 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26