/[escript]/trunk/escript/src/AbstractSystemMatrix.h
ViewVC logotype

Diff of /trunk/escript/src/AbstractSystemMatrix.h

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

trunk/escript/src/Data/AbstractSystemMatrix.h revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC temp_trunk_copy/escript/src/AbstractSystemMatrix.h revision 1384 by phornby, Fri Jan 11 02:29:38 2008 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  escript_AbstractSystemMatrix_20040628_H  #if !defined  escript_AbstractSystemMatrix_20040628_H
17  #define escript_AbstractSystemMatrix_20040628_H  #define escript_AbstractSystemMatrix_20040628_H
18    #include "system_dep.h"
19    
20    #include "FunctionSpace.h"
21    #include "SystemMatrixException.h"
22    
 #include "escript/Data/FunctionSpace.h"  
 #include "escript/Data/SystemMatrixException.h"  
 #include "escript/Data/Data.h"  
23  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
24    
25    //
26    // Forward declaration
27    class Data;
28    
29  namespace escript {  namespace escript {
30    
31  /**  /**
# Line 51  class AbstractSystemMatrix { Line 56  class AbstractSystemMatrix {
56       Throws:       Throws:
57       Describe any exceptions thrown       Describe any exceptions thrown
58    */    */
59      ESCRIPT_DLL_API
60    AbstractSystemMatrix();    AbstractSystemMatrix();
61    
62      ESCRIPT_DLL_API
63    AbstractSystemMatrix(const int row_blocksize,    AbstractSystemMatrix(const int row_blocksize,
64                         const FunctionSpace& row_functionspace,                         const FunctionSpace& row_functionspace,
65                         const int column_blocksize,                         const int column_blocksize,
# Line 61  class AbstractSystemMatrix { Line 68  class AbstractSystemMatrix {
68      \brief      \brief
69      Destructor.      Destructor.
70    */    */
71      ESCRIPT_DLL_API
72    virtual ~AbstractSystemMatrix();    virtual ~AbstractSystemMatrix();
73    
74    /**    /**
75      \brief      \brief
76      matrix*vector multiplication      matrix*vector multiplication
77    */    */
78      ESCRIPT_DLL_API
79    Data vectorMultiply(Data& right) const;    Data vectorMultiply(Data& right) const;
80    
81    /**    /**
82      \brief      \brief
83      returns true if the matrix is empty      returns true if the matrix is empty
84    */    */
85      ESCRIPT_DLL_API
86    int isEmpty() const;    int isEmpty() const;
87    
88    /**    /**
89      \brief      \brief
90      returns the column function space      returns the column function space
91    */    */
92      ESCRIPT_DLL_API
93    inline FunctionSpace getColumnFunctionSpace() const    inline FunctionSpace getColumnFunctionSpace() const
94    {    {
95         if (isEmpty())         if (isEmpty())
# Line 90  class AbstractSystemMatrix { Line 101  class AbstractSystemMatrix {
101      \brief      \brief
102      returns the row function space      returns the row function space
103    */    */
104      ESCRIPT_DLL_API
105    inline FunctionSpace getRowFunctionSpace() const    inline FunctionSpace getRowFunctionSpace() const
106    {    {
107         if (isEmpty())         if (isEmpty())
# Line 101  class AbstractSystemMatrix { Line 113  class AbstractSystemMatrix {
113      \brief      \brief
114      returns the row block size      returns the row block size
115    */    */
116      ESCRIPT_DLL_API
117    inline int getRowBlockSize() const    inline int getRowBlockSize() const
118    {    {
119         if (isEmpty())         if (isEmpty())
# Line 112  class AbstractSystemMatrix { Line 125  class AbstractSystemMatrix {
125      \brief      \brief
126      returns the column block size      returns the column block size
127    */    */
128      ESCRIPT_DLL_API
129    inline int getColumnBlockSize() const    inline int getColumnBlockSize() const
130    {    {
131         if (isEmpty())         if (isEmpty())
# Line 123  class AbstractSystemMatrix { Line 137  class AbstractSystemMatrix {
137       \brief       \brief
138       returns the solution u of the linear system this*u=in       returns the solution u of the linear system this*u=in
139    */    */
140      ESCRIPT_DLL_API
141    Data solve(Data& in,const boost::python::dict& options) const;    Data solve(Data& in,const boost::python::dict& options) const;
142    
143    /**    /**
144       \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
145    */    */
146      ESCRIPT_DLL_API
147    virtual void saveMM(const std::string& fileName) const;    virtual void saveMM(const std::string& fileName) const;
148    
149    /**    /**
150       \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
151    */    */
152      ESCRIPT_DLL_API
153    virtual void saveHB(const std::string& fileName) const;    virtual void saveHB(const std::string& fileName) const;
154    
155    /**    /**
156       \brief resets the matrix entries       \brief resets the matrix entries
157    */    */
158      ESCRIPT_DLL_API
159    virtual void resetValues() const;    virtual void resetValues() const;
160    
161   protected:   protected:
# Line 148  class AbstractSystemMatrix { Line 166  class AbstractSystemMatrix {
166       \brief       \brief
167       solves the linear system this*out=in       solves the linear system this*out=in
168    */    */
169      ESCRIPT_DLL_API
170    virtual void setToSolution(Data& out,Data& in,const boost::python::dict& options) const;    virtual void setToSolution(Data& out,Data& in,const boost::python::dict& options) const;
171    
172    /**    /**
173       \brief       \brief
174       performs y+=this*x       performs y+=this*x
175    */    */
176      ESCRIPT_DLL_API
177    virtual void ypAx(Data& y,Data& x) const;    virtual void ypAx(Data& y,Data& x) const;
178    
179    int m_empty;    int m_empty;
# Line 164  class AbstractSystemMatrix { Line 184  class AbstractSystemMatrix {
184    
185  };  };
186    
187  Data operator*(const AbstractSystemMatrix& left,const Data& right) ;  ESCRIPT_DLL_API Data operator*(const AbstractSystemMatrix& left,const Data& right) ;
188    
189    
190    

Legend:
Removed from v.155  
changed lines
  Added in v.1384

  ViewVC Help
Powered by ViewVC 1.1.26