/[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 1802 by jfenwick, Tue Sep 23 01:03:29 2008 UTC revision 2640 by jfenwick, Mon Aug 31 06:22:10 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 finley_MeshAdapter_20040526_H  #if !defined finley_MeshAdapter_20040526_H
16  #define finley_MeshAdapter_20040526_H  #define finley_MeshAdapter_20040526_H
# Line 143  class MeshAdapter : public escript::Abst Line 142  class MeshAdapter : public escript::Abst
142    
143    /**    /**
144       \brief       \brief
145         If compiled for MPI then execute an MPI_Barrier, else do nothing
146      */
147    
148      FINLEY_DLL_API
149      virtual void MPIBarrier() const;
150    
151      /**
152         \brief
153         Return true if on MPI processor 0, else false
154      */
155    
156      FINLEY_DLL_API
157      virtual bool onMasterProcessor() const;
158    
159      FINLEY_DLL_API
160    #ifdef PASO_MPI
161      MPI_Comm
162    #else
163      unsigned int
164    #endif
165      getMPIComm() const;
166    
167      /**
168         \brief
169       return this as an AbstractContinuousDomain.       return this as an AbstractContinuousDomain.
170    */    */
171    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const
# Line 169  class MeshAdapter : public escript::Abst Line 192  class MeshAdapter : public escript::Abst
192    
193    /**    /**
194       \brief       \brief
195       Write the current mesh to a file with the given name.       \param full
      \param fileName Input - The name of the file to write to.  
196    */    */
197    FINLEY_DLL_API    FINLEY_DLL_API
198    void Print_Mesh_Info(const bool) const;    void Print_Mesh_Info(const bool full=false) const;
199    
200    /**    /**
201       \brief       \brief
# Line 205  class MeshAdapter : public escript::Abst Line 227  class MeshAdapter : public escript::Abst
227       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
228    */    */
229    FINLEY_DLL_API    FINLEY_DLL_API
230    int* borrowSampleReferenceIDs(int functionSpaceType) const;    const int* borrowSampleReferenceIDs(int functionSpaceType) const;
231    
232    /**    /**
233       \brief       \brief
# Line 341  class MeshAdapter : public escript::Abst Line 363  class MeshAdapter : public escript::Abst
363    
364    /**    /**
365       \brief       \brief
366          Returns a status indicator of the domain. The status identifier should be unique over
367          the live time if the object but may be updated if changes to the domain happen, e.g.
368          modifications to its geometry.
369    
370         This has to be implemented by the actual Domain adapter.
371      */
372      FINLEY_DLL_API
373      virtual StatusType getStatus() const;
374    
375    
376      /**
377         \brief
378       Return the number of data points summed across all MPI processes       Return the number of data points summed across all MPI processes
379    */    */
380    FINLEY_DLL_API    FINLEY_DLL_API
# Line 407  class MeshAdapter : public escript::Abst Line 441  class MeshAdapter : public escript::Abst
441    */    */
442    FINLEY_DLL_API    FINLEY_DLL_API
443    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
444    
445    
446    FINLEY_DLL_API    FINLEY_DLL_API
447    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
448    
449    /**    /**
450        \brief given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to.
451        \return true is result is valid, false if not
452      */
453      FINLEY_DLL_API
454      bool
455      commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;
456    
457      /**
458       \brief       \brief
459       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.
460       has to be implemented by the actual Domain adapter.       has to be implemented by the actual Domain adapter.
461    */    */
462    FINLEY_DLL_API    FINLEY_DLL_API
463    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
464    
465      /**
466      \brief determines whether interpolation from source to target is possible.
467      Must be implemented by the actual Domain adapter
468      */
469    FINLEY_DLL_API    FINLEY_DLL_API
470    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;
471    
472    /**    /**
473       \brief       \brief
# Line 454  class MeshAdapter : public escript::Abst Line 503  class MeshAdapter : public escript::Abst
503    
504    /**    /**
505       \brief       \brief
506       return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package       return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, perconditioner,
507         and symmetric matrix is used.
508         \param solver
509         \param preconditioner
510         \param package
511         \param symmetry
512      */
513      FINLEY_DLL_API
514      virtual int getSystemMatrixTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
515    
516      /**
517         \brief
518         return the identifier of the transport problem type to be used when a particular solver, perconditioner, package
519       and symmetric matrix is used.       and symmetric matrix is used.
520       \param solver       \param solver
521         \param preconditioner
522         \param package
523       \param symmetry       \param symmetry
524    */    */
525    FINLEY_DLL_API    FINLEY_DLL_API
526    virtual int getSystemMatrixTypeId(const int solver, const int package, const bool symmetry) const;    virtual int getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
527    
528    /**    /**
529       \brief       \brief
# Line 487  class MeshAdapter : public escript::Abst Line 550  class MeshAdapter : public escript::Abst
550       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
551    */    */
552    FINLEY_DLL_API    FINLEY_DLL_API
553    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;
554    
555    /**    /**
556       \brief       \brief
# Line 586  class MeshAdapter : public escript::Abst Line 649  class MeshAdapter : public escript::Abst
649       \brief comparison operators       \brief comparison operators
650    */    */
651    FINLEY_DLL_API    FINLEY_DLL_API
652    virtual bool operator==(const AbstractDomain& other) const;    virtual bool operator==(const escript::AbstractDomain& other) const;
653    FINLEY_DLL_API    FINLEY_DLL_API
654    virtual bool operator!=(const AbstractDomain& other) const;    virtual bool operator!=(const escript::AbstractDomain& other) const;
655    
656    /**    /**
657       \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 606  class MeshAdapter : public escript::Abst Line 669  class MeshAdapter : public escript::Abst
669    virtual int getNumberOfTagsInUse(int functionSpaceCode) const;    virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
670    
671    FINLEY_DLL_API    FINLEY_DLL_API
672    virtual int* borrowListOfTagsInUse(int functionSpaceCode) const;    virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
673    
674    
675    /**    /**
# Line 620  class MeshAdapter : public escript::Abst Line 683  class MeshAdapter : public escript::Abst
683   protected:   protected:
684    
685   private:   private:
686      void extractArgsFromDict(const boost::python::dict& arg, int& numData,
687                                 char**& names, escriptDataC*& data,
688                                 escriptDataC**& dataPtr) const;
689    
690    //    //
691    // pointer to the externally created finley mesh    // pointer to the externally created finley mesh

Legend:
Removed from v.1802  
changed lines
  Added in v.2640

  ViewVC Help
Powered by ViewVC 1.1.26