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