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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1800 - (show annotations)
Thu Sep 18 05:28:20 2008 UTC (11 years ago) by ksteube
File size: 6170 byte(s)
Serialized parallel I/O when writing mesh or data to NetCDF file on multiple MPI processors.
Added domain method getMPIComm() to complement getMPISize() and getMPIRank().

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26