/[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 2641 by jfenwick, Mon Aug 31 07:41:49 2009 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2009 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
17    
18  #include "system_dep.h"  #include "system_dep.h"
19    
20    #include <vector>
21  #include <string>  #include <string>
22  #include <map>  #include <map>
23  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
24    #include <boost/python/list.hpp>
25    #include "paso/Paso_MPI.h"
26    
27    
28    #include "Pointers.h"
29    
30  namespace escript {  namespace escript {
31  // class forward declarations  // class forward declarations
# Line 33  class Data; Line 38  class Data;
38     Base class for all escript domains.     Base class for all escript domains.
39  */  */
40    
41  class AbstractDomain {  class AbstractDomain;
42    
43    typedef POINTER_WRAPPER_CLASS(AbstractDomain) Domain_ptr;
44    typedef POINTER_WRAPPER_CLASS(const AbstractDomain) const_Domain_ptr;
45    
46    class AbstractDomain : public REFCOUNT_BASE_CLASS(AbstractDomain){
47    
48   public:   public:
49    
50    /**
51    \brief Returns smart pointer which is managing this object.
52    If one does not exist yet it creates one.
53    
54    Note: This is _not_ equivalent to weak_ptr::lock.
55    */
56       ESCRIPT_DLL_API
57       Domain_ptr getPtr();
58       ESCRIPT_DLL_API
59       const_Domain_ptr getPtr() const;
60    
61     // structure holding values for X, size and normal     // structure holding values for X, size and normal
62     typedef int StatusType;     typedef int StatusType;
# Line 99  class AbstractDomain { Line 119  class AbstractDomain {
119    ESCRIPT_DLL_API    ESCRIPT_DLL_API
120    virtual int getMPIRank() const;    virtual int getMPIRank() const;
121    
122      /**
123         \brief
124         If compiled for MPI then execute an MPI_Barrier, else do nothing
125      */
126    
127      ESCRIPT_DLL_API
128      virtual void MPIBarrier() const;
129      /**
130         \brief
131         Return true if on MPI master, else false
132      */
133    
134      ESCRIPT_DLL_API
135      virtual bool onMasterProcessor() const;
136    
137      /**
138      \brief get the communicator for this domain.
139      Returns 0 on non-MPI builds
140      */
141      ESCRIPT_DLL_API
142      virtual
143    #ifdef PASO_MPI
144      MPI_Comm
145    #else
146      unsigned int
147    #endif
148      getMPIComm() const;
149    
150    /**    /**
151       \brief       \brief
# Line 218  class AbstractDomain { Line 264  class AbstractDomain {
264       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
265    */    */
266    ESCRIPT_DLL_API    ESCRIPT_DLL_API
267    virtual int* borrowSampleReferenceIDs(int functionSpaceType) const;    virtual const int* borrowSampleReferenceIDs(int functionSpaceType) const;
268    
269    /**    /**
270       \brief       \brief
# Line 241  class AbstractDomain { Line 287  class AbstractDomain {
287    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
288    
289    /**    /**
290        \brief given a vector of FunctionSpace type codes, pass back a code which then can all be interpolated to.
291        \note This method must be called on the domain which the FunctionSpaces point to
292        \return true is result is valid, false if not
293      */
294      ESCRIPT_DLL_API
295      virtual
296      bool
297      commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;
298    
299      /**
300       \brief       \brief
301       Interpolates data given on source onto target where source and target are given on different domains.       Interpolates data given on source onto target where source and target are given on different domains.
302    
# Line 325  class AbstractDomain { Line 381  class AbstractDomain {
381    
382    /**    /**
383       \brief       \brief
384       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.
385         metadata is string representing some meta data to be added. metadata_schema assign schema to namespaces used in the meta data.
386    
387       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
388    */    */
389    ESCRIPT_DLL_API    ESCRIPT_DLL_API
390    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;  
391    
392    /**    /**
393       \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 409  class AbstractDomain {
409    
410    /**    /**
411       \brief       \brief
412       returns status of the domain.        Returns a status indicator of the domain. The status identifier should be unique over
413          the live time if the object but may be updated if changes to the domain happen, e.g.
414          modifications to its geometry.
415    
416       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
417    */    */
# Line 376  class AbstractDomain { Line 426  class AbstractDomain {
426    ESCRIPT_DLL_API    ESCRIPT_DLL_API
427    void throwStandardException(const std::string& functionName) const;    void throwStandardException(const std::string& functionName) const;
428    
429      /**
430            \brief
431                      return the number of tags in use and a pointer to an array with the number of tags in use
432      */
433      ESCRIPT_DLL_API
434      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
435    
436      ESCRIPT_DLL_API
437      virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
438    
439      /**
440        \brief Checks if this domain allows tags for the specified functionSpaceCode.
441      */
442      ESCRIPT_DLL_API
443      virtual bool canTag(int functionspacecode) const;
444    
445   protected:   protected:
446    
447   private:   private:

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

  ViewVC Help
Powered by ViewVC 1.1.26