/[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

trunk/esys2/escript/src/Data/AbstractDomain.cpp revision 110 by jgs, Mon Feb 14 04:14:42 2005 UTC temp_trunk_copy/escript/src/AbstractDomain.cpp revision 1384 by phornby, Fri Jan 11 02:29:38 2008 UTC
# Line 1  Line 1 
1    
2  /* $Id$ */  /* $Id$ */
3  /*  
4   ******************************************************************************  /*******************************************************
5   *                                                                            *   *
6   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *   *           Copyright 2003-2007 by ACceSS MNRF
7   *                                                                            *   *       Copyright 2007 by University of Queensland
8   * This software is the property of ACcESS. No part of this code              *   *
9   * may be copied in any form or by any means without the expressed written    *   *                http://esscc.uq.edu.au
10   * consent of ACcESS.  Copying, use or modification of this software          *   *        Primary Business: Queensland, Australia
11   * by any unauthorised person is illegal unless that person has a software    *   *  Licensed under the Open Software License version 3.0
12   * license agreement with ACcESS.                                             *   *     http://www.opensource.org/licenses/osl-3.0.php
13   *                                                                            *   *
14   ******************************************************************************   *******************************************************/
15  */  
16    #include "AbstractDomain.h"
17  #include "escript/Data/AbstractDomain.h"  #include "DomainException.h"
18  #include "escript/Data/DomainException.h"  #include "Data.h"
19  #include "escript/Data/AbstractSystemMatrix.h"  
20  #include "escript/Data/FunctionSpace.h"  using namespace std;
21    
22  namespace escript {  namespace escript {
23    
# Line 26  AbstractDomain::AbstractDomain() { Line 27  AbstractDomain::AbstractDomain() {
27  AbstractDomain::~AbstractDomain() {  AbstractDomain::~AbstractDomain() {
28  }  }
29    
30    int AbstractDomain::getMPISize() const
31    {
32       return 1;
33    }
34    int AbstractDomain::getMPIRank() const
35    {
36       return 0;
37    }
38    
39    
40  void AbstractDomain::throwStandardException(const std::string& functionName) const  void AbstractDomain::throwStandardException(const std::string& functionName) const
41  {  {
42    throw DomainException("Error - Base class function: " +    throw DomainException("Error - Base class function: " + functionName + " should not be called. Programming error.");
             functionName + " should not be called. Programming error.");  
43  }  }
44    
45  bool AbstractDomain::isValidFunctionSpaceType(int functionSpaceType) const  bool AbstractDomain::isValidFunctionSpaceType(int functionSpaceType) const
# Line 61  void AbstractDomain::write(const std::st Line 71  void AbstractDomain::write(const std::st
71    throwStandardException("AbstractDomain::write");    throwStandardException("AbstractDomain::write");
72    return;    return;
73  }  }
74    void AbstractDomain::dump(const std::string& filename) const
 void AbstractDomain::getTagList(int functionSpaceType, int** tagList, int* numTags) const  
75  {  {
76    throwStandardException("AbstractDomain::getTagList");    throwStandardException("AbstractDomain::dump");
   return;  
 }  
   
 void AbstractDomain::getReferenceNoList(int functionSpaceType, int** referenceNoList, int* numReferenceNo) const  
 {  
   throwStandardException("AbstractDomain::getTagList");  
77    return;    return;
78  }  }
79    
# Line 86  int AbstractDomain::getTagFromSampleNo(i Line 89  int AbstractDomain::getTagFromSampleNo(i
89    return 0;    return 0;
90  }  }
91    
92  int AbstractDomain::getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const  int* AbstractDomain::borrowSampleReferenceIDs(int functionSpaceType) const
93  {  {
94    throwStandardException("AbstractDomain::getReferenceNoFromSampleNo");    throwStandardException("AbstractDomain::borrowSampleReferenceIDs");
95    return 0;    return 0;
96  }  }
97    
# Line 120  escript::Data AbstractDomain::getNormal( Line 123  escript::Data AbstractDomain::getNormal(
123    throwStandardException("AbstractDomain::getNormal");    throwStandardException("AbstractDomain::getNormal");
124    return Data();    return Data();
125  }  }
126    
127  escript::Data AbstractDomain::getSize() const  escript::Data AbstractDomain::getSize() const
128  {  {
129    throwStandardException("AbstractDomain::getSize");    throwStandardException("AbstractDomain::getSize");
130    return Data();    return Data();
131  }  }
132    
133  void AbstractDomain::setToX(escript::Data& out) const  void AbstractDomain::setToX(escript::Data& out) const
134  {  {
135    throwStandardException("AbstractDomain::setToX");    throwStandardException("AbstractDomain::setToX");
# Line 136  void AbstractDomain::setToNormal(escript Line 141  void AbstractDomain::setToNormal(escript
141    throwStandardException("AbstractDomain::setToNormal");    throwStandardException("AbstractDomain::setToNormal");
142    return;    return;
143  }  }
144    
145  void AbstractDomain::setToSize(escript::Data& out) const  void AbstractDomain::setToSize(escript::Data& out) const
146  {  {
147    throwStandardException("AbstractDomain::setToSize");    throwStandardException("AbstractDomain::setToSize");
# Line 148  void AbstractDomain::setToGradient(escri Line 154  void AbstractDomain::setToGradient(escri
154    return;    return;
155  }  }
156    
157  void AbstractDomain::saveDX(const std::string& filename,const escript::Data& arg) const  void AbstractDomain::setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const
158    {
159      throwStandardException("AbstractDomain::setTags");
160      return;
161    }
162    
163    void AbstractDomain::saveDX(const std::string& filename,const boost::python::dict& arg) const
164  {  {
165    throwStandardException("AbstractDomain::saveDX");    throwStandardException("AbstractDomain::saveDX");
166    return;    return;
167  }  }
168    
169  void AbstractDomain::saveVTK(const std::string& filename,const escript::Data& arg) const  void AbstractDomain::saveVTK(const std::string& filename,const boost::python::dict& arg) const
170  {  {
171    throwStandardException("AbstractDomain::saveVTK");    throwStandardException("AbstractDomain::saveVTK");
172    return;    return;
# Line 180  bool AbstractDomain::isCellOriented(int Line 192  bool AbstractDomain::isCellOriented(int
192    
193  bool AbstractDomain::operator==(const AbstractDomain& other) const  bool AbstractDomain::operator==(const AbstractDomain& other) const
194  {  {
195    return (this==&other);    throwStandardException("AbstractDomain::operator==");
196      return false;
197  }  }
                                                                                                                                         
198  bool AbstractDomain::operator!=(const AbstractDomain& other) const  bool AbstractDomain::operator!=(const AbstractDomain& other) const
199  {  {
200    return (!operator==(other));    throwStandardException("AbstractDomain::operator!=");
201      return false;
202    }
203    
204    AbstractDomain::StatusType AbstractDomain::getStatus() const
205    {
206      throwStandardException("AbstractDomain::getStatus");
207      return 0;
208    }
209    void AbstractDomain::setTagMap(const std::string& name,  int tag)
210    {
211      throwStandardException("AbstractDomain::set TagMap is not implemented.");
212    }
213    int AbstractDomain::getTag(const std::string& name) const
214    {
215      throwStandardException("AbstractDomain::getTag is not implemented.");
216      return 0;
217    }
218    
219    bool AbstractDomain::isValidTagName(const std::string& name) const
220    {
221      return false;
222  }  }
223    
224  }  // end of namespace  std::string AbstractDomain::showTagNames() const
225    {
226      throwStandardException("AbstractDomain::showTagNames is not implemented.");
227      return string();
228    }
229    
230    
231    
232    } // end of namespace

Legend:
Removed from v.110  
changed lines
  Added in v.1384

  ViewVC Help
Powered by ViewVC 1.1.26