/[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 1059 by gross, Fri Mar 23 11:01:53 2007 UTC revision 1800 by ksteube, Thu Sep 18 05:28:20 2008 UTC
# Line 1  Line 1 
1  // $Id$  
2  /*  /* $Id$ */
3   ************************************************************  
4   *          Copyright 2006 by ACcESS MNRF                   *  /*******************************************************
5   *                                                          *   *
6   *              http://www.access.edu.au                    *   *           Copyright 2003-2007 by ACceSS MNRF
7   *       Primary Business: Queensland, Australia            *   *       Copyright 2007 by University of Queensland
8   *  Licensed under the Open Software License version 3.0    *   *
9   *     http://www.opensource.org/licenses/osl-3.0.php       *   *                http://esscc.uq.edu.au
10   *                                                          *   *        Primary Business: Queensland, Australia
11   ************************************************************   *  Licensed under the Open Software License version 3.0
12  */   *     http://www.opensource.org/licenses/osl-3.0.php
13                                                                               *
14     *******************************************************/
15    
16  #if !defined finley_MeshAdapter_20040526_H  #if !defined finley_MeshAdapter_20040526_H
17  #define finley_MeshAdapter_20040526_H  #define finley_MeshAdapter_20040526_H
18  #include "system_dep.h"  #include "system_dep.h"
# Line 20  extern "C" { Line 22  extern "C" {
22  #include "../Finley.h"  #include "../Finley.h"
23  #include "../Assemble.h"  #include "../Assemble.h"
24  #include "paso/SystemMatrix.h"  #include "paso/SystemMatrix.h"
25    #include "paso/SolverFCT.h"
26    #include "paso/Paso_MPI.h"
27  }  }
28    
29  #include "FinleyError.h"  #include "FinleyError.h"
30  #include "FinleyAdapterException.h"  #include "FinleyAdapterException.h"
31    
32  #include "SystemMatrixAdapter.h"  #include "SystemMatrixAdapter.h"
33    #include "TransportProblemAdapter.h"
34  #include "escript/AbstractContinuousDomain.h"  #include "escript/AbstractContinuousDomain.h"
35  #include "escript/FunctionSpace.h"  #include "escript/FunctionSpace.h"
36  #include "escript/FunctionSpaceFactory.h"  #include "escript/FunctionSpaceFactory.h"
# Line 74  class MeshAdapter : public escript::Abst Line 79  class MeshAdapter : public escript::Abst
79    static const int DegreesOfFreedom;    static const int DegreesOfFreedom;
80    static const int ReducedDegreesOfFreedom;    static const int ReducedDegreesOfFreedom;
81    static const int Nodes;    static const int Nodes;
82      static const int ReducedNodes;
83    static const int Elements;    static const int Elements;
84    static const int ReducedElements;    static const int ReducedElements;
85    static const int FaceElements;    static const int FaceElements;
# Line 90  class MeshAdapter : public escript::Abst Line 96  class MeshAdapter : public escript::Abst
96    
97       Description:       Description:
98       Constructor for MeshAdapter. The pointer passed to MeshAdapter       Constructor for MeshAdapter. The pointer passed to MeshAdapter
99       is deleted using a call to Finley_Mesh_deallocate in the       is deleted using a call to Finley_Mesh_free in the
100       MeshAdapter destructor.       MeshAdapter destructor.
101    
102       Throws:       Throws:
# Line 99  class MeshAdapter : public escript::Abst Line 105  class MeshAdapter : public escript::Abst
105       \param finleyMesh Input - A pointer to the externally constructed       \param finleyMesh Input - A pointer to the externally constructed
106                                 finley mesh.The pointer passed to MeshAdapter                                 finley mesh.The pointer passed to MeshAdapter
107                                 is deleted using a call to                                 is deleted using a call to
108                                 Finley_Mesh_deallocate in the MeshAdapter                                 Finley_Mesh_free in the MeshAdapter
109                                 destructor.                                 destructor.
110    */    */
111    FINLEY_DLL_API    FINLEY_DLL_API
# Line 115  class MeshAdapter : public escript::Abst Line 121  class MeshAdapter : public escript::Abst
121    /**    /**
122       \brief       \brief
123       Destructor for MeshAdapter. As specified in the constructor       Destructor for MeshAdapter. As specified in the constructor
124       this calls Finley_Mesh_deallocate for the pointer given to the       this calls Finley_Mesh_free for the pointer given to the
125       constructor.       constructor.
126    */    */
127    FINLEY_DLL_API    FINLEY_DLL_API
# Line 123  class MeshAdapter : public escript::Abst Line 129  class MeshAdapter : public escript::Abst
129    
130    /**    /**
131       \brief       \brief
132         return the number of processors used for this domain
133      */
134      FINLEY_DLL_API
135      virtual int getMPISize() const;
136      /**
137         \brief
138         return the number MPI rank of this processor
139      */
140    
141      FINLEY_DLL_API
142      virtual int getMPIRank() const;
143    
144      /**
145         \brief
146         return the MPI communicator
147      */
148    
149      FINLEY_DLL_API
150      virtual MPI_Comm getMPIComm() const;
151    
152      /**
153         \brief
154       return this as an AbstractContinuousDomain.       return this as an AbstractContinuousDomain.
155    */    */
156    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const
# Line 149  class MeshAdapter : public escript::Abst Line 177  class MeshAdapter : public escript::Abst
177    
178    /**    /**
179       \brief       \brief
180         Write the current mesh to a file with the given name.
181         \param fileName Input - The name of the file to write to.
182      */
183      FINLEY_DLL_API
184      void Print_Mesh_Info(const bool) const;
185    
186      /**
187         \brief
188         dumps the mesh to a file with the given name.
189         \param fileName Input - The name of the file
190      */
191      FINLEY_DLL_API
192      void dump(const std::string& fileName) const;
193    
194      /**
195         \brief
196       return the pointer to the underlying finley mesh structure       return the pointer to the underlying finley mesh structure
197    */    */
198    FINLEY_DLL_API    FINLEY_DLL_API
# Line 209  class MeshAdapter : public escript::Abst Line 253  class MeshAdapter : public escript::Abst
253    
254    /**    /**
255       \brief       \brief
256         Return a continuous on reduced order nodes FunctionSpace code
257      */
258      FINLEY_DLL_API
259      virtual int getReducedContinuousFunctionCode() const;
260    
261      /**
262         \brief
263       Return a function FunctionSpace code       Return a function FunctionSpace code
264    */    */
265    FINLEY_DLL_API    FINLEY_DLL_API
# Line 298  class MeshAdapter : public escript::Abst Line 349  class MeshAdapter : public escript::Abst
349    
350    /**    /**
351       \brief       \brief
352         Return the number of data points summed across all MPI processes
353      */
354      FINLEY_DLL_API
355      virtual int getNumDataPointsGlobal() const;
356    
357      /**
358         \brief
359       Return the number of data points per sample, and the number of samples as a pair.       Return the number of data points per sample, and the number of samples as a pair.
360       \param functionSpaceCode Input -       \param functionSpaceCode Input -
361    */    */
# Line 457  class MeshAdapter : public escript::Abst Line 515  class MeshAdapter : public escript::Abst
515                       const escript::Data& D, const escript::Data& X, const escript::Data& Y,                       const escript::Data& D, const escript::Data& X, const escript::Data& Y,
516                       const escript::Data& d, const escript::Data& y,                       const escript::Data& d, const escript::Data& y,
517                       const escript::Data& d_contact, const escript::Data& y_contact) const;                       const escript::Data& d_contact, const escript::Data& y_contact) const;
518      /**
519         \brief
520         adds a PDE onto the lumped stiffness matrix matrix
521      */
522      FINLEY_DLL_API
523      virtual void addPDEToLumpedSystem(
524                         escript::Data& mat,
525                         const escript::Data& D,
526                         const escript::Data& d) const;
527    
528    /**    /**
529       \brief       \brief
# Line 466  class MeshAdapter : public escript::Abst Line 533  class MeshAdapter : public escript::Abst
533    virtual void addPDEToRHS(escript::Data& rhs,    virtual void addPDEToRHS(escript::Data& rhs,
534                       const escript::Data& X, const escript::Data& Y,                       const escript::Data& X, const escript::Data& Y,
535                       const escript::Data& y, const escript::Data& y_contact) const;                       const escript::Data& y, const escript::Data& y_contact) const;
536      /**
537         \brief
538         adds a PDE onto a transport problem
539      */
540    
541      FINLEY_DLL_API
542      virtual void addPDEToTransportProblem(
543                         TransportProblemAdapter& tp, escript::Data& source,
544                         const escript::Data& M,
545                         const escript::Data& A, const escript::Data& B, const escript::Data& C,const  escript::Data& D,
546                         const  escript::Data& X,const  escript::Data& Y,
547                         const escript::Data& d, const escript::Data& y,
548                         const escript::Data& d_contact,const escript::Data& y_contact) const;
549    
550    
551    /**    /**
552       \brief       \brief
553      creates a SystemMatrixAdapter stiffness matrix an initializes it with zeros:      creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
554    */    */
555    FINLEY_DLL_API    FINLEY_DLL_API
556    SystemMatrixAdapter newSystemMatrix(    SystemMatrixAdapter newSystemMatrix(
# Line 478  class MeshAdapter : public escript::Abst Line 559  class MeshAdapter : public escript::Abst
559                        const int column_blocksize,                        const int column_blocksize,
560                        const escript::FunctionSpace& column_functionspace,                        const escript::FunctionSpace& column_functionspace,
561                        const int type) const;                        const int type) const;
562      /**
563       \brief
564        creates a TransportProblemAdapter
565    
566      */
567    
568      FINLEY_DLL_API
569      TransportProblemAdapter newTransportProblem(
570                          const double theta,
571                          const int blocksize,
572                          const escript::FunctionSpace& functionspace,
573                          const int type) const;
574    
575    /**    /**
576       \brief returns locations in the FEM nodes       \brief returns locations in the FEM nodes
# Line 513  class MeshAdapter : public escript::Abst Line 606  class MeshAdapter : public escript::Abst
606    FINLEY_DLL_API    FINLEY_DLL_API
607    virtual void setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const;    virtual void setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const;
608    
609      /**
610          \brief
611              return the number of tags in use and a pointer to an array with the number of tags in use
612      */
613      FINLEY_DLL_API
614      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
615    
616      FINLEY_DLL_API
617      virtual int* borrowListOfTagsInUse(int functionSpaceCode) const;
618    
619   protected:   protected:
620    
621   private:   private:

Legend:
Removed from v.1059  
changed lines
  Added in v.1800

  ViewVC Help
Powered by ViewVC 1.1.26