/[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

revision 471 by jgs, Fri Jan 27 01:33:02 2006 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1  // $Id$  
2  /*  /* $Id$ */
3   ******************************************************************************  
4   *                                                                            *  /*******************************************************
5   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *   *
6   *                                                                            *   *           Copyright 2003-2007 by ACceSS MNRF
7   * This software is the property of ACcESS. No part of this code              *   *       Copyright 2007 by University of Queensland
8   * may be copied in any form or by any means without the expressed written    *   *
9   * consent of ACcESS.  Copying, use or modification of this software          *   *                http://esscc.uq.edu.au
10   * by any unauthorised person is illegal unless that person has a software    *   *        Primary Business: Queensland, Australia
11   * license agreement with ACcESS.                                             *   *  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_SystemMatrixAdapter_20040610_H  #if !defined  finley_SystemMatrixAdapter_20040610_H
17  #define finley_SystemMatrixAdapter_20040610_H  #define finley_SystemMatrixAdapter_20040610_H
18    #include "system_dep.h"
19    
 #include "SystemMatrixAdapter.h"  
 #include "escript/Data/AbstractSystemMatrix.h"  
 #include "escript/Data/Data.h"  
20  extern "C" {  extern "C" {
21  #include "SystemMatrix.h"  #include "paso/SystemMatrix.h"
22    #include "paso/Options.h"
23  }  }
24    
25    #include "FinleyAdapterException.h"
26    #include "FinleyError.h"
27    
28    #include "escript/AbstractSystemMatrix.h"
29    #include "escript/Data.h"
30    #include "escript/UtilC.h"
31    
32  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
33  #include <boost/shared_ptr.hpp>  #include <boost/shared_ptr.hpp>
34    #include <boost/python/extract.hpp>
35    
36  namespace finley {  namespace finley {
37    
# Line 44  class SystemMatrixAdapter:public escript Line 52  class SystemMatrixAdapter:public escript
52       Default Constructor for SystemMatrixAdapter.       Default Constructor for SystemMatrixAdapter.
53       NB: Only throws an exception.       NB: Only throws an exception.
54    */    */
55      FINLEY_DLL_API
56    SystemMatrixAdapter();    SystemMatrixAdapter();
57    
58    /**    /**
59       /brief       /brief
60       Constructor for SystemMatrixAdapter.       Constructor for SystemMatrixAdapter.
61    */    */
62      FINLEY_DLL_API
63    SystemMatrixAdapter(Paso_SystemMatrix* system_matrix,    SystemMatrixAdapter(Paso_SystemMatrix* system_matrix,
64                        const int row_blocksize,                        const int row_blocksize,
65                        const escript::FunctionSpace& row_functionspace,                        const escript::FunctionSpace& row_functionspace,
# Line 62  class SystemMatrixAdapter:public escript Line 72  class SystemMatrixAdapter:public escript
72       Destructor for SystemMatrixAdapter. As specified in the constructor       Destructor for SystemMatrixAdapter. As specified in the constructor
73       this deallocates the pointer given to the constructor.       this deallocates the pointer given to the constructor.
74    */    */
75      FINLEY_DLL_API
76    ~SystemMatrixAdapter();    ~SystemMatrixAdapter();
77    
78    /**    /**
79       \brief       \brief
80       Returns the pointer to the system matrix.       Returns the pointer to the system matrix.
81    */    */
82      FINLEY_DLL_API
83    Paso_SystemMatrix* getPaso_SystemMatrix() const;    Paso_SystemMatrix* getPaso_SystemMatrix() const;
84    
85    /**    /**
# Line 92  class SystemMatrixAdapter:public escript Line 104  class SystemMatrixAdapter:public escript
104      \brief      \brief
105      nullifyRowsAndCols - calls Paso_SystemMatrix_nullifyRowsAndCols.      nullifyRowsAndCols - calls Paso_SystemMatrix_nullifyRowsAndCols.
106    */    */
107      FINLEY_DLL_API
108    void nullifyRowsAndCols(escript::Data& row_q, escript::Data& col_q, const double mdv) const;    void nullifyRowsAndCols(escript::Data& row_q, escript::Data& col_q, const double mdv) const;
109    
110    /**    /**
111       \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
112    */    */
113      FINLEY_DLL_API
114    virtual void saveMM(const std::string& fileName) const;    virtual void saveMM(const std::string& fileName) const;
115    
116    /**    /**
117       \brief writes the matrix to a file using the Harwell-Boeing file format       \brief writes the matrix to a file using the Harwell-Boeing file format
118    */    */
119      FINLEY_DLL_API
120    virtual void saveHB(const std::string& fileName) const;    virtual void saveHB(const std::string& fileName) const;
121    
122    /**    /**
123       \brief sets the matrix entries to zero       \brief sets the matrix entries to zero
124    */    */
125      FINLEY_DLL_API
126    virtual void resetValues() const;    virtual void resetValues() const;
127    
128    /**    /**
129       \brief maps escript options onto Paso options:       \brief maps escript options onto Paso options:
130    */    */
131      FINLEY_DLL_API
132    static int mapOptionToPaso(const int option);    static int mapOptionToPaso(const int option);
133    
134   protected:   protected:
# Line 122  class SystemMatrixAdapter:public escript Line 139  class SystemMatrixAdapter:public escript
139        \brief        \brief
140        solves the linear system this*out=in        solves the linear system this*out=in
141     */     */
142       FINLEY_DLL_API
143     virtual void setToSolution(escript::Data& out, escript::Data& in, const boost::python::dict& options) const;     virtual void setToSolution(escript::Data& out, escript::Data& in, const boost::python::dict& options) const;
144    
145     /**     /**
146         \brief         \brief
147         performs y+=this*x         performs y+=this*x
148     */     */
149       FINLEY_DLL_API
150     virtual void ypAx(escript::Data& y, escript::Data& x) const;     virtual void ypAx(escript::Data& y, escript::Data& x) const;
151    
152     //     //

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

  ViewVC Help
Powered by ViewVC 1.1.26