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

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

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

trunk/esys2/finley/src/CPPAdapter/SystemMatrixAdapter.h revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC trunk/finley/src/CPPAdapter/SystemMatrixAdapter.h revision 471 by jgs, Fri Jan 27 01:33:02 2006 UTC
# Line 16  Line 16 
16  #if !defined  finley_SystemMatrixAdapter_20040610_H  #if !defined  finley_SystemMatrixAdapter_20040610_H
17  #define finley_SystemMatrixAdapter_20040610_H  #define finley_SystemMatrixAdapter_20040610_H
18    
19  #include "finley/CPPAdapter/SystemMatrixAdapter.h"  #include "SystemMatrixAdapter.h"
20  #include "escript/Data/AbstractSystemMatrix.h"  #include "escript/Data/AbstractSystemMatrix.h"
21  #include "escript/Data/Data.h"  #include "escript/Data/Data.h"
22  extern "C" {  extern "C" {
23  #include "finley/finleyC/System.h"  #include "SystemMatrix.h"
24  }  }
25  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
26  #include <boost/shared_ptr.hpp>  #include <boost/shared_ptr.hpp>
# Line 31  class SystemMatrixAdapter:public escript Line 31  class SystemMatrixAdapter:public escript
31    
32  /**  /**
33     \brief     \brief
34     Wrapper for Finley_SystemMatrix.     Wrapper for Paso_SystemMatrix.
35    
36     Description:     Description:
37     Wrapper for Finley_SystemMatrix.     Wrapper for Paso_SystemMatrix.
38  */  */
39    
40   public:   public:
# Line 50  class SystemMatrixAdapter:public escript Line 50  class SystemMatrixAdapter:public escript
50       /brief       /brief
51       Constructor for SystemMatrixAdapter.       Constructor for SystemMatrixAdapter.
52    */    */
53    SystemMatrixAdapter(Finley_SystemMatrix* system_matrix,    SystemMatrixAdapter(Paso_SystemMatrix* system_matrix,
54                        const int row_blocksize,                        const int row_blocksize,
55                        const escript::FunctionSpace& row_functionspace,                        const escript::FunctionSpace& row_functionspace,
56                        const int column_blocksize,                        const int column_blocksize,
# Line 68  class SystemMatrixAdapter:public escript Line 68  class SystemMatrixAdapter:public escript
68       \brief       \brief
69       Returns the pointer to the system matrix.       Returns the pointer to the system matrix.
70    */    */
71    Finley_SystemMatrix* getFinley_SystemMatrix() const;    Paso_SystemMatrix* getPaso_SystemMatrix() const;
72    
73    /**    /**
74       \brief       \brief
# Line 90  class SystemMatrixAdapter:public escript Line 90  class SystemMatrixAdapter:public escript
90    
91    /**    /**
92      \brief      \brief
93      nullifyRowsAndCols - calls Finley_SystemMatrix_nullifyRowsAndCols.      nullifyRowsAndCols - calls Paso_SystemMatrix_nullifyRowsAndCols.
94    */    */
95    void nullifyRowsAndCols(const escript::Data& row_q, const escript::Data& col_q, const double mdv) const;    void nullifyRowsAndCols(escript::Data& row_q, escript::Data& col_q, const double mdv) const;
96    
97    /**    /**
98       \brief writes the matrix to a file using the Matrix Market file format       \brief writes the matrix to a file using the Matrix Market file format
# Line 100  class SystemMatrixAdapter:public escript Line 100  class SystemMatrixAdapter:public escript
100    virtual void saveMM(const std::string& fileName) const;    virtual void saveMM(const std::string& fileName) const;
101    
102    /**    /**
103       \brief sets the matrix entries to value       \brief writes the matrix to a file using the Harwell-Boeing file format
104    */    */
105    virtual void setValue(const double value) const;    virtual void saveHB(const std::string& fileName) const;
106    
107      /**
108         \brief sets the matrix entries to zero
109      */
110      virtual void resetValues() const;
111    
112      /**
113         \brief maps escript options onto Paso options:
114      */
115      static int mapOptionToPaso(const int option);
116    
117   protected:   protected:
118    
# Line 113  class SystemMatrixAdapter:public escript Line 122  class SystemMatrixAdapter:public escript
122        \brief        \brief
123        solves the linear system this*out=in        solves the linear system this*out=in
124     */     */
125     virtual void setToSolution(escript::Data& out, const escript::Data& in, const boost::python::dict& options) const;     virtual void setToSolution(escript::Data& out, escript::Data& in, const boost::python::dict& options) const;
126    
127     /**     /**
128         \brief         \brief
129         performs y+=this*x         performs y+=this*x
130     */     */
131     virtual void ypAx(escript::Data& y, const escript::Data& x) const;     virtual void ypAx(escript::Data& y, escript::Data& x) const;
132    
133     //     //
134     // pointer to the externally created finley mesh - system_matrix.     // pointer to the externally created finley mesh - system_matrix.
135     //     //
136     boost::shared_ptr<Finley_SystemMatrix> m_system_matrix;     boost::shared_ptr<Paso_SystemMatrix> m_system_matrix;
137    
138  };  };
139    

Legend:
Removed from v.97  
changed lines
  Added in v.471

  ViewVC Help
Powered by ViewVC 1.1.26