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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 615 by elspeth, Wed Mar 22 02:12:00 2006 UTC revision 1872 by jfenwick, Mon Oct 13 00:18:55 2008 UTC
# Line 1  Line 1 
1  /* $Id$ */  
2  /*  /*******************************************************
3   ************************************************************  *
4   *          Copyright 2006 by ACcESS MNRF                   *  * Copyright (c) 2003-2008 by University of Queensland
5   *                                                          *  * Earth Systems Science Computational Center (ESSCC)
6   *              http://www.access.edu.au                    *  * http://www.uq.edu.au/esscc
7   *       Primary Business: Queensland, Australia            *  *
8   *  Licensed under the Open Software License version 3.0    *  * Primary Business: Queensland, Australia
9   *     http://www.opensource.org/licenses/osl-3.0.php       *  * Licensed under the Open Software License version 3.0
10   *                                                          *  * http://www.opensource.org/licenses/osl-3.0.php
11   ************************************************************  *
12  */  *******************************************************/
13    
14    
15  #include "AbstractDomain.h"  #include "AbstractDomain.h"
16  #include "DomainException.h"  #include "DomainException.h"
 //#include "AbstractSystemMatrix.h"  
 //#include "FunctionSpace.h"  
   
17  #include "Data.h"  #include "Data.h"
18    #include "paso/Paso_MPI.h"
19    
20  using namespace std;  using namespace std;
21    
22  namespace escript {  namespace escript {
23    
24    
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  AbstractDomain::AbstractDomain() {  AbstractDomain::AbstractDomain() {
50  }  }
51    
52  AbstractDomain::~AbstractDomain() {  AbstractDomain::~AbstractDomain() {
53  }  }
54    
55    int AbstractDomain::getMPISize() const
56    {
57       return 1;
58    }
59    int AbstractDomain::getMPIRank() const
60    {
61       return 0;
62    }
63    
64    
65  void AbstractDomain::throwStandardException(const std::string& functionName) const  void AbstractDomain::throwStandardException(const std::string& functionName) const
66  {  {
67    throw DomainException("Error - Base class function: " + functionName + " should not be called. Programming error.");    throw DomainException("Error - Base class function: " + functionName + " should not be called. Programming error.");
# Line 62  void AbstractDomain::write(const std::st Line 96  void AbstractDomain::write(const std::st
96    throwStandardException("AbstractDomain::write");    throwStandardException("AbstractDomain::write");
97    return;    return;
98  }  }
99    void AbstractDomain::dump(const std::string& filename) const
100    {
101      throwStandardException("AbstractDomain::dump");
102      return;
103    }
104    
105  std::pair<int,int> AbstractDomain::getDataShape(int functionSpaceCode) const  std::pair<int,int> AbstractDomain::getDataShape(int functionSpaceCode) const
106  {  {
# Line 75  int AbstractDomain::getTagFromSampleNo(i Line 114  int AbstractDomain::getTagFromSampleNo(i
114    return 0;    return 0;
115  }  }
116    
117  int AbstractDomain::getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const  int* AbstractDomain::borrowSampleReferenceIDs(int functionSpaceType) const
118  {  {
119    throwStandardException("AbstractDomain::getReferenceNoFromSampleNo");    throwStandardException("AbstractDomain::borrowSampleReferenceIDs");
120    return 0;    return 0;
121  }  }
122    
# Line 140  void AbstractDomain::setToGradient(escri Line 179  void AbstractDomain::setToGradient(escri
179    return;    return;
180  }  }
181    
182    void AbstractDomain::setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const
183    {
184      throwStandardException("AbstractDomain::setTags");
185      return;
186    }
187    
188  void AbstractDomain::saveDX(const std::string& filename,const boost::python::dict& arg) const  void AbstractDomain::saveDX(const std::string& filename,const boost::python::dict& arg) const
189  {  {
190    throwStandardException("AbstractDomain::saveDX");    throwStandardException("AbstractDomain::saveDX");
# Line 181  bool AbstractDomain::operator!=(const Ab Line 226  bool AbstractDomain::operator!=(const Ab
226    return false;    return false;
227  }  }
228    
229    AbstractDomain::StatusType AbstractDomain::getStatus() const
230    {
231      throwStandardException("AbstractDomain::getStatus");
232      return 0;
233    }
234    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    
244    bool AbstractDomain::isValidTagName(const std::string& name) const
245    {
246      return false;
247    }
248    
249    std::string AbstractDomain::showTagNames() const
250    {
251      throwStandardException("AbstractDomain::showTagNames is not implemented.");
252      return string();
253    }
254    
255    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    
266    
267    bool AbstractDomain::canTag(int functionspacecode) const
268    {
269      throwStandardException("AbstractDomain::canTag is not implemented.");
270      return false;
271    }
272    
273    
274    
275  } // end of namespace  } // end of namespace

Legend:
Removed from v.615  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC 1.1.26