/[escript]/trunk/finley/src/CPPAdapter/MeshAdapter.h
ViewVC logotype

Diff of /trunk/finley/src/CPPAdapter/MeshAdapter.h

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

revision 1859 by gross, Wed Oct 8 03:03:37 2008 UTC revision 2751 by caltinay, Wed Nov 18 00:30:47 2009 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*******************************************************
3  *  *
4  * Copyright (c) 2003-2008 by University of Queensland  * Copyright (c) 2003-2009 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * Earth Systems Science Computational Center (ESSCC)
6  * http://www.uq.edu.au/esscc  * http://www.uq.edu.au/esscc
7  *  *
# Line 43  extern "C" { Line 43  extern "C" {
43  #include <string>  #include <string>
44  #include <sstream>  #include <sstream>
45    
 //  
 // forward declarations  
 class Data;  
   
 //using namespace escript;  
   
46  namespace finley {  namespace finley {
47    
48  struct null_deleter  struct null_deleter
# Line 142  class MeshAdapter : public escript::Abst Line 136  class MeshAdapter : public escript::Abst
136    
137    /**    /**
138       \brief       \brief
139         If compiled for MPI then execute an MPI_Barrier, else do nothing
140      */
141    
142      FINLEY_DLL_API
143      virtual void MPIBarrier() const;
144    
145      /**
146         \brief
147         Return true if on MPI processor 0, else false
148      */
149    
150      FINLEY_DLL_API
151      virtual bool onMasterProcessor() const;
152    
153      FINLEY_DLL_API
154    #ifdef PASO_MPI
155      MPI_Comm
156    #else
157      unsigned int
158    #endif
159      getMPIComm() const;
160    
161      /**
162         \brief
163       return this as an AbstractContinuousDomain.       return this as an AbstractContinuousDomain.
164    */    */
165    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const
# Line 168  class MeshAdapter : public escript::Abst Line 186  class MeshAdapter : public escript::Abst
186    
187    /**    /**
188       \brief       \brief
189       Write the current mesh to a file with the given name.       \param full
      \param fileName Input - The name of the file to write to.  
190    */    */
191    FINLEY_DLL_API    FINLEY_DLL_API
192    void Print_Mesh_Info(const bool) const;    void Print_Mesh_Info(const bool full=false) const;
193    
194    /**    /**
195       \brief       \brief
# Line 204  class MeshAdapter : public escript::Abst Line 221  class MeshAdapter : public escript::Abst
221       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
222    */    */
223    FINLEY_DLL_API    FINLEY_DLL_API
224    int* borrowSampleReferenceIDs(int functionSpaceType) const;    const int* borrowSampleReferenceIDs(int functionSpaceType) const;
225    
226    /**    /**
227       \brief       \brief
# Line 340  class MeshAdapter : public escript::Abst Line 357  class MeshAdapter : public escript::Abst
357    
358    /**    /**
359       \brief       \brief
360          Returns a status indicator of the domain. The status identifier should be unique over
361          the live time if the object but may be updated if changes to the domain happen, e.g.
362          modifications to its geometry.
363    
364         This has to be implemented by the actual Domain adapter.
365      */
366      FINLEY_DLL_API
367      virtual StatusType getStatus() const;
368    
369    
370      /**
371         \brief
372       Return the number of data points summed across all MPI processes       Return the number of data points summed across all MPI processes
373    */    */
374    FINLEY_DLL_API    FINLEY_DLL_API
# Line 406  class MeshAdapter : public escript::Abst Line 435  class MeshAdapter : public escript::Abst
435    */    */
436    FINLEY_DLL_API    FINLEY_DLL_API
437    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
438    
439    
440    FINLEY_DLL_API    FINLEY_DLL_API
441    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
442    
443    /**    /**
444        \brief given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to.
445        \return true is result is valid, false if not
446      */
447      FINLEY_DLL_API
448      bool
449      commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;
450    
451      /**
452       \brief       \brief
453       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.
454       has to be implemented by the actual Domain adapter.       has to be implemented by the actual Domain adapter.
455    */    */
456    FINLEY_DLL_API    FINLEY_DLL_API
457    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
458    
459      /**
460      \brief determines whether interpolation from source to target is possible.
461      Must be implemented by the actual Domain adapter
462      */
463    FINLEY_DLL_API    FINLEY_DLL_API
464    virtual bool probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const;    virtual bool probeInterpolationACross(int functionSpaceType_source,const escript::AbstractDomain& targetDomain, int functionSpaceType_target) const;
465    
466    /**    /**
467       \brief       \brief
# Line 455  class MeshAdapter : public escript::Abst Line 499  class MeshAdapter : public escript::Abst
499       \brief       \brief
500       return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, perconditioner,       return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, perconditioner,
501       and symmetric matrix is used.       and symmetric matrix is used.
      \param precondioner  
502       \param solver       \param solver
503         \param preconditioner
504         \param package
505       \param symmetry       \param symmetry
506    */    */
507    FINLEY_DLL_API    FINLEY_DLL_API
# Line 466  class MeshAdapter : public escript::Abst Line 511  class MeshAdapter : public escript::Abst
511       \brief       \brief
512       return the identifier of the transport problem type to be used when a particular solver, perconditioner, package       return the identifier of the transport problem type to be used when a particular solver, perconditioner, package
513       and symmetric matrix is used.       and symmetric matrix is used.
      \param precondioner  
514       \param solver       \param solver
515         \param preconditioner
516         \param package
517       \param symmetry       \param symmetry
518    */    */
519    FINLEY_DLL_API    FINLEY_DLL_API
# Line 498  class MeshAdapter : public escript::Abst Line 544  class MeshAdapter : public escript::Abst
544       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
545    */    */
546    FINLEY_DLL_API    FINLEY_DLL_API
547    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;
548    
549      FINLEY_DLL_API
550      virtual bool ownSample(int fs_code, index_t id) const;
551    
552    /**    /**
553       \brief       \brief
# Line 597  class MeshAdapter : public escript::Abst Line 646  class MeshAdapter : public escript::Abst
646       \brief comparison operators       \brief comparison operators
647    */    */
648    FINLEY_DLL_API    FINLEY_DLL_API
649    virtual bool operator==(const AbstractDomain& other) const;    virtual bool operator==(const escript::AbstractDomain& other) const;
650    FINLEY_DLL_API    FINLEY_DLL_API
651    virtual bool operator!=(const AbstractDomain& other) const;    virtual bool operator!=(const escript::AbstractDomain& other) const;
652    
653    /**    /**
654       \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 617  class MeshAdapter : public escript::Abst Line 666  class MeshAdapter : public escript::Abst
666    virtual int getNumberOfTagsInUse(int functionSpaceCode) const;    virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
667    
668    FINLEY_DLL_API    FINLEY_DLL_API
669    virtual int* borrowListOfTagsInUse(int functionSpaceCode) const;    virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
670    
671    
672    /**    /**
# Line 631  class MeshAdapter : public escript::Abst Line 680  class MeshAdapter : public escript::Abst
680   protected:   protected:
681    
682   private:   private:
683      void extractArgsFromDict(const boost::python::dict& arg, int& numData,
684                                 char**& names, escriptDataC*& data,
685                                 escriptDataC**& dataPtr) const;
686    
687    //    //
688    // pointer to the externally created finley mesh    // pointer to the externally created finley mesh

Legend:
Removed from v.1859  
changed lines
  Added in v.2751

  ViewVC Help
Powered by ViewVC 1.1.26