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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1800 - (hide annotations)
Thu Sep 18 05:28:20 2008 UTC (11 years, 1 month 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 ksteube 1312
2 jgs 102 /* $Id$ */
3 jgs 82
4 ksteube 1312 /*******************************************************
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 jgs 474 #include "AbstractDomain.h"
17     #include "DomainException.h"
18 jgs 480 #include "Data.h"
19 ksteube 1800 #include "paso/Paso_MPI.h"
20 jgs 480
21 jgs 121 using namespace std;
22 jgs 149
23 jgs 82 namespace escript {
24    
25     AbstractDomain::AbstractDomain() {
26     }
27    
28     AbstractDomain::~AbstractDomain() {
29     }
30    
31 ksteube 1312 int AbstractDomain::getMPISize() const
32     {
33     return 1;
34     }
35     int AbstractDomain::getMPIRank() const
36     {
37     return 0;
38     }
39 ksteube 1800 MPI_Comm AbstractDomain::getMPIComm() const
40     {
41     return 0;
42     }
43 ksteube 1312
44    
45 jgs 82 void AbstractDomain::throwStandardException(const std::string& functionName) const
46     {
47 jgs 115 throw DomainException("Error - Base class function: " + functionName + " should not be called. Programming error.");
48 jgs 82 }
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 ksteube 1312 void AbstractDomain::dump(const std::string& filename) const
80     {
81     throwStandardException("AbstractDomain::dump");
82     return;
83     }
84 jgs 82
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 gross 964 int* AbstractDomain::borrowSampleReferenceIDs(int functionSpaceType) const
98 jgs 110 {
99 gross 964 throwStandardException("AbstractDomain::borrowSampleReferenceIDs");
100 jgs 110 return 0;
101     }
102    
103 jgs 82 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 jgs 102 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 jgs 115
132 jgs 102 escript::Data AbstractDomain::getSize() const
133     {
134     throwStandardException("AbstractDomain::getSize");
135     return Data();
136     }
137 jgs 115
138 jgs 82 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 jgs 115
150 jgs 82 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 gross 767 void AbstractDomain::setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const
163     {
164     throwStandardException("AbstractDomain::setTags");
165     return;
166     }
167    
168 jgs 153 void AbstractDomain::saveDX(const std::string& filename,const boost::python::dict& arg) const
169 jgs 82 {
170     throwStandardException("AbstractDomain::saveDX");
171     return;
172     }
173    
174 jgs 153 void AbstractDomain::saveVTK(const std::string& filename,const boost::python::dict& arg) const
175 jgs 110 {
176     throwStandardException("AbstractDomain::saveVTK");
177     return;
178     }
179    
180 jgs 82 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 jgs 121 throwStandardException("AbstractDomain::operator==");
201     return false;
202 jgs 82 }
203     bool AbstractDomain::operator!=(const AbstractDomain& other) const
204     {
205 jgs 121 throwStandardException("AbstractDomain::operator!=");
206     return false;
207 jgs 82 }
208    
209 gross 797 AbstractDomain::StatusType AbstractDomain::getStatus() const
210     {
211     throwStandardException("AbstractDomain::getStatus");
212     return 0;
213     }
214 gross 1044 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 gross 797
224 gross 1044 bool AbstractDomain::isValidTagName(const std::string& name) const
225     {
226     return false;
227     }
228 gross 797
229 gross 1044 std::string AbstractDomain::showTagNames() const
230     {
231     throwStandardException("AbstractDomain::showTagNames is not implemented.");
232     return string();
233     }
234    
235 gross 1716 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 gross 1044
246    
247 gross 1716
248    
249    
250    
251 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