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

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

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

temp_trunk_copy/escript/src/AbstractDomain.h revision 1384 by phornby, Fri Jan 11 02:29:38 2008 UTC trunk/escript/src/AbstractDomain.h revision 2533 by gross, Wed Jul 15 05:57:01 2009 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #if !defined escript_AbstractDomain_20040609_H  #if !defined escript_AbstractDomain_20040609_H
16  #define escript_AbstractDomain_20040609_H  #define escript_AbstractDomain_20040609_H
# Line 21  Line 20 
20  #include <string>  #include <string>
21  #include <map>  #include <map>
22  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
23    #include <boost/python/list.hpp>
24    #include "paso/Paso_MPI.h"
25    
26    
27    #include "Pointers.h"
28    
29  namespace escript {  namespace escript {
30  // class forward declarations  // class forward declarations
# Line 33  class Data; Line 37  class Data;
37     Base class for all escript domains.     Base class for all escript domains.
38  */  */
39    
40  class AbstractDomain {  class AbstractDomain;
41    
42    typedef POINTER_WRAPPER_CLASS(AbstractDomain) Domain_ptr;
43    typedef POINTER_WRAPPER_CLASS(const AbstractDomain) const_Domain_ptr;
44    
45    class AbstractDomain : public REFCOUNT_BASE_CLASS(AbstractDomain){
46    
47   public:   public:
48    
49    /**
50    \brief Returns smart pointer which is managing this object.
51    If one does not exist yet it creates one.
52    
53    Note: This is _not_ equivalent to weak_ptr::lock.
54    */
55       ESCRIPT_DLL_API
56       Domain_ptr getPtr();
57       ESCRIPT_DLL_API
58       const_Domain_ptr getPtr() const;
59    
60     // structure holding values for X, size and normal     // structure holding values for X, size and normal
61     typedef int StatusType;     typedef int StatusType;
# Line 99  class AbstractDomain { Line 118  class AbstractDomain {
118    ESCRIPT_DLL_API    ESCRIPT_DLL_API
119    virtual int getMPIRank() const;    virtual int getMPIRank() const;
120    
121      /**
122         \brief
123         If compiled for MPI then execute an MPI_Barrier, else do nothing
124      */
125    
126      ESCRIPT_DLL_API
127      virtual void MPIBarrier() const;
128      /**
129         \brief
130         Return true if on MPI master, else false
131      */
132    
133      ESCRIPT_DLL_API
134      virtual bool onMasterProcessor() const;
135    
136    
137    
138    /**    /**
# Line 218  class AbstractDomain { Line 252  class AbstractDomain {
252       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
253    */    */
254    ESCRIPT_DLL_API    ESCRIPT_DLL_API
255    virtual int* borrowSampleReferenceIDs(int functionSpaceType) const;    virtual const int* borrowSampleReferenceIDs(int functionSpaceType) const;
256    
257    /**    /**
258       \brief       \brief
# Line 325  class AbstractDomain { Line 359  class AbstractDomain {
359    
360    /**    /**
361       \brief       \brief
362       Saves a dictonary of Data objects to an VTK XML input file. The keywords are used as identifier       Saves a dictonary of Data objects to an VTK XML input file. The keywords are used as identifier.
363         metadata is string representing some meta data to be added. metadata_schema assign schema to namespaces used in the meta data.
364    
365       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
366    */    */
367    ESCRIPT_DLL_API    ESCRIPT_DLL_API
368    virtual void saveVTK(const std::string& filename,const boost::python::dict& arg) const;    virtual void saveVTK(const std::string& filename,const boost::python::dict& arg, const std::string& metadata, const std::string& metadata_schema) const;
   
   /**  
      \brief  
      returns the function space representation of the type functionSpaceCode on this domain  
      as a vtkObject.  
   
      This has to be implemented by the actual Domain adapter.  
   */  
   //virtual vtkObject createVtkObject(int functionSpaceCode) const;  
369    
370    /**    /**
371       \brief assigns new tag newTag to all samples of functionspace with a positive       \brief assigns new tag newTag to all samples of functionspace with a positive
# Line 361  class AbstractDomain { Line 387  class AbstractDomain {
387    
388    /**    /**
389       \brief       \brief
390       returns status of the domain.        Returns a status indicator of the domain. The status identifier should be unique over
391          the live time if the object but may be updated if changes to the domain happen, e.g.
392          modifications to its geometry.
393    
394       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
395    */    */
# Line 376  class AbstractDomain { Line 404  class AbstractDomain {
404    ESCRIPT_DLL_API    ESCRIPT_DLL_API
405    void throwStandardException(const std::string& functionName) const;    void throwStandardException(const std::string& functionName) const;
406    
407      /**
408            \brief
409                      return the number of tags in use and a pointer to an array with the number of tags in use
410      */
411      ESCRIPT_DLL_API
412      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
413    
414      ESCRIPT_DLL_API
415      virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
416    
417      /**
418        \brief Checks if this domain allows tags for the specified functionSpaceCode.
419      */
420      ESCRIPT_DLL_API
421      virtual bool canTag(int functionspacecode) const;
422    
423   protected:   protected:
424    
425   private:   private:

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

  ViewVC Help
Powered by ViewVC 1.1.26