/[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 1801 by ksteube, Fri Sep 19 01:37:09 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 this as an AbstractContinuousDomain.       return this as an AbstractContinuousDomain.
147    */    */
148    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const    inline const AbstractContinuousDomain& asAbstractContinuousDomain() const
# Line 149  class MeshAdapter : public escript::Abst Line 169  class MeshAdapter : public escript::Abst
169    
170    /**    /**
171       \brief       \brief
172         Write the current mesh to a file with the given name.
173         \param fileName Input - The name of the file to write to.
174      */
175      FINLEY_DLL_API
176      void Print_Mesh_Info(const bool) const;
177    
178      /**
179         \brief
180         dumps the mesh to a file with the given name.
181         \param fileName Input - The name of the file
182      */
183      FINLEY_DLL_API
184      void dump(const std::string& fileName) const;
185    
186      /**
187         \brief
188       return the pointer to the underlying finley mesh structure       return the pointer to the underlying finley mesh structure
189    */    */
190    FINLEY_DLL_API    FINLEY_DLL_API
# Line 209  class MeshAdapter : public escript::Abst Line 245  class MeshAdapter : public escript::Abst
245    
246    /**    /**
247       \brief       \brief
248         Return a continuous on reduced order nodes FunctionSpace code
249      */
250      FINLEY_DLL_API
251      virtual int getReducedContinuousFunctionCode() const;
252    
253      /**
254         \brief
255       Return a function FunctionSpace code       Return a function FunctionSpace code
256    */    */
257    FINLEY_DLL_API    FINLEY_DLL_API
# Line 298  class MeshAdapter : public escript::Abst Line 341  class MeshAdapter : public escript::Abst
341    
342    /**    /**
343       \brief       \brief
344         Return the number of data points summed across all MPI processes
345      */
346      FINLEY_DLL_API
347      virtual int getNumDataPointsGlobal() const;
348    
349      /**
350         \brief
351       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.
352       \param functionSpaceCode Input -       \param functionSpaceCode Input -
353    */    */
# Line 457  class MeshAdapter : public escript::Abst Line 507  class MeshAdapter : public escript::Abst
507                       const escript::Data& D, const escript::Data& X, const escript::Data& Y,                       const escript::Data& D, const escript::Data& X, const escript::Data& Y,
508                       const escript::Data& d, const escript::Data& y,                       const escript::Data& d, const escript::Data& y,
509                       const escript::Data& d_contact, const escript::Data& y_contact) const;                       const escript::Data& d_contact, const escript::Data& y_contact) const;
510      /**
511         \brief
512         adds a PDE onto the lumped stiffness matrix matrix
513      */
514      FINLEY_DLL_API
515      virtual void addPDEToLumpedSystem(
516                         escript::Data& mat,
517                         const escript::Data& D,
518                         const escript::Data& d) const;
519    
520    /**    /**
521       \brief       \brief
# Line 466  class MeshAdapter : public escript::Abst Line 525  class MeshAdapter : public escript::Abst
525    virtual void addPDEToRHS(escript::Data& rhs,    virtual void addPDEToRHS(escript::Data& rhs,
526                       const escript::Data& X, const escript::Data& Y,                       const escript::Data& X, const escript::Data& Y,
527                       const escript::Data& y, const escript::Data& y_contact) const;                       const escript::Data& y, const escript::Data& y_contact) const;
528      /**
529         \brief
530         adds a PDE onto a transport problem
531      */
532    
533      FINLEY_DLL_API
534      virtual void addPDEToTransportProblem(
535                         TransportProblemAdapter& tp, escript::Data& source,
536                         const escript::Data& M,
537                         const escript::Data& A, const escript::Data& B, const escript::Data& C,const  escript::Data& D,
538                         const  escript::Data& X,const  escript::Data& Y,
539                         const escript::Data& d, const escript::Data& y,
540                         const escript::Data& d_contact,const escript::Data& y_contact) const;
541    
542    
543    /**    /**
544       \brief       \brief
545      creates a SystemMatrixAdapter stiffness matrix an initializes it with zeros:      creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
546    */    */
547    FINLEY_DLL_API    FINLEY_DLL_API
548    SystemMatrixAdapter newSystemMatrix(    SystemMatrixAdapter newSystemMatrix(
# Line 478  class MeshAdapter : public escript::Abst Line 551  class MeshAdapter : public escript::Abst
551                        const int column_blocksize,                        const int column_blocksize,
552                        const escript::FunctionSpace& column_functionspace,                        const escript::FunctionSpace& column_functionspace,
553                        const int type) const;                        const int type) const;
554      /**
555       \brief
556        creates a TransportProblemAdapter
557    
558      */
559    
560      FINLEY_DLL_API
561      TransportProblemAdapter newTransportProblem(
562                          const double theta,
563                          const int blocksize,
564                          const escript::FunctionSpace& functionspace,
565                          const int type) const;
566    
567    /**    /**
568       \brief returns locations in the FEM nodes       \brief returns locations in the FEM nodes
# Line 513  class MeshAdapter : public escript::Abst Line 598  class MeshAdapter : public escript::Abst
598    FINLEY_DLL_API    FINLEY_DLL_API
599    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;
600    
601      /**
602          \brief
603              return the number of tags in use and a pointer to an array with the number of tags in use
604      */
605      FINLEY_DLL_API
606      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
607    
608      FINLEY_DLL_API
609      virtual int* borrowListOfTagsInUse(int functionSpaceCode) const;
610    
611   protected:   protected:
612    
613   private:   private:

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

  ViewVC Help
Powered by ViewVC 1.1.26