Escript
Revision_4320
Main Page
Namespaces
Classes
Files
File List
File Members
escript
src
AbstractSystemMatrix.h
Go to the documentation of this file.
1
2
/*****************************************************************************
3
*
4
* Copyright (c) 2003-2013 by University of Queensland
5
* http://www.uq.edu.au
6
*
7
* Primary Business: Queensland, Australia
8
* Licensed under the Open Software License version 3.0
9
* http://www.opensource.org/licenses/osl-3.0.php
10
*
11
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12
* Development since 2012 by School of Earth Sciences
13
*
14
*****************************************************************************/
15
16
17
#if !defined escript_AbstractSystemMatrix_20040628_H
18
#define escript_AbstractSystemMatrix_20040628_H
19
#include "
system_dep.h
"
20
21
#include "
FunctionSpace.h
"
22
#include "
SystemMatrixException.h
"
23
#include <boost/python/object.hpp>
24
25
26
namespace
escript {
27
28
//
29
// Forward declaration
30
class
Data;
31
43
class
AbstractSystemMatrix
{
44
45
public
:
46
60
ESCRIPT_DLL_API
61
AbstractSystemMatrix
();
62
63
ESCRIPT_DLL_API
64
AbstractSystemMatrix
(
const
int
row_blocksize,
65
const
FunctionSpace
& row_functionspace,
66
const
int
column_blocksize,
67
const
FunctionSpace
& column_functionspace);
72
ESCRIPT_DLL_API
73
virtual
~AbstractSystemMatrix
();
74
75
80
ESCRIPT_DLL_API
81
Data
vectorMultiply
(
Data
& right)
const
;
82
87
ESCRIPT_DLL_API
88
int
isEmpty
()
const
;
89
94
ESCRIPT_DLL_API
95
inline
FunctionSpace
getColumnFunctionSpace
()
const
96
{
97
if
(
isEmpty
())
98
throw
SystemMatrixException
(
"Error - Matrix is empty."
);
99
return
m_column_functionspace
;
100
}
101
106
ESCRIPT_DLL_API
107
inline
FunctionSpace
getRowFunctionSpace
()
const
108
{
109
if
(
isEmpty
())
110
throw
SystemMatrixException
(
"Error - Matrix is empty."
);
111
return
m_row_functionspace
;
112
}
113
118
ESCRIPT_DLL_API
119
inline
int
getRowBlockSize
()
const
120
{
121
if
(
isEmpty
())
122
throw
SystemMatrixException
(
"Error - Matrix is empty."
);
123
return
m_row_blocksize
;
124
}
125
130
ESCRIPT_DLL_API
131
inline
int
getColumnBlockSize
()
const
132
{
133
if
(
isEmpty
())
134
throw
SystemMatrixException
(
"Error - Matrix is empty."
);
135
return
m_column_blocksize
;
136
}
137
142
ESCRIPT_DLL_API
143
Data
solve
(
Data
& in, boost::python::object& options)
const
;
144
149
ESCRIPT_DLL_API
150
virtual
void
nullifyRowsAndCols
(
escript::Data
& row_q,
escript::Data
& col_q,
const
double
mdv)
const
;
151
152
156
ESCRIPT_DLL_API
157
virtual
void
saveMM
(
const
std::string& fileName)
const
;
158
162
ESCRIPT_DLL_API
163
virtual
void
saveHB
(
const
std::string& fileName)
const
;
164
168
ESCRIPT_DLL_API
169
virtual
void
resetValues
()
const
;
170
171
protected
:
172
173
private
:
174
179
ESCRIPT_DLL_API
180
virtual
void
setToSolution
(
Data
& out,
Data
& in, boost::python::object& options)
const
;
181
186
ESCRIPT_DLL_API
187
virtual
void
ypAx
(
Data
& y,
Data
& x)
const
;
188
189
int
m_empty
;
190
int
m_column_blocksize
;
191
int
m_row_blocksize
;
192
FunctionSpace
m_row_functionspace
;
193
FunctionSpace
m_column_functionspace
;
194
195
196
};
197
198
ESCRIPT_DLL_API
Data
operator*
(
const
AbstractSystemMatrix
& left,
const
Data
& right) ;
199
200
typedef
boost::shared_ptr<AbstractSystemMatrix>
ASM_ptr
;
201
202
}
// end of namespace
203
#endif
Generated on Fri Mar 15 2013 14:07:48 for Escript by
1.8.1.2