OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
imlsolver.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef imlsolver_h
36 #define imlsolver_h
37 
38 #include "sparselinsystemnm.h"
39 #include "sparsemtrx.h"
40 #include "floatarray.h"
41 #include "precond.h"
42 
44 
45 #define _IFT_IMLSolver_Name "iml"
46 #define _IFT_IMLSolver_stype "stype"
47 #define _IFT_IMLSolver_lstol "lstol"
48 #define _IFT_IMLSolver_lsiter "lsiter"
49 #define _IFT_IMLSolver_lsprecond "lsprecond"
50 
51 
52 namespace oofem {
53 class Domain;
54 class EngngModel;
55 class FloatMatrix;
56 
61 class OOFEM_EXPORT IMLSolver : public SparseLinearSystemNM
62 {
63 private:
65  enum IMLSolverType { IML_ST_CG, IML_ST_GMRES };
67  enum IMLPrecondType { IML_VoidPrec, IML_DiagPrec, IML_ILU_CompColPrec, IML_ILU_CompRowPrec, IML_ICPrec };
68 
81  // Preconditioner attribute string
82  // InputRecord precondAttributes;
83 
85  double tol;
87  int maxite;
88 
89 
90 public:
92  IMLSolver(Domain * d, EngngModel * m);
94  virtual ~IMLSolver();
95 
103  virtual NM_Status solve(SparseMtrx &A, FloatArray &b, FloatArray &x);
104 
105  virtual IRResultType initializeFrom(InputRecord *ir);
106  virtual const char *giveClassName() const { return "IMLSolver"; }
107  virtual LinSystSolverType giveLinSystSolverType() const { return ST_IML; }
108  virtual SparseMtrxType giveRecommendedMatrix(bool symmetric) const { return symmetric ? SMT_SymCompCol : SMT_CompCol; }
109 };
110 } // end namespace oofem
111 #endif // imlsolver_h
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
int maxite
Max number of iterations.
Definition: imlsolver.h:87
SparseMtrx::SparseMtrxVersionType lhsVersion
Last mapped matrix version.
Definition: imlsolver.h:72
Class and object Domain.
Definition: domain.h:115
double tol
Tolerance of residual.
Definition: imlsolver.h:85
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
Preconditioner * M
Preconditioner.
Definition: imlsolver.h:74
IMLPrecondType precondType
IML Preconditioner type.
Definition: imlsolver.h:78
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
virtual const char * giveClassName() const
Definition: imlsolver.h:106
Compressed column.
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
Definition: nmstatus.h:44
bool precondInit
Precond. init flag.
Definition: imlsolver.h:80
SparseMtrx * Lhs
Last mapped Lhs matrix.
Definition: imlsolver.h:70
long SparseMtrxVersionType
Definition: sparsemtrx.h:63
Symmetric compressed column.
IMLSolverType
Solver type.
Definition: imlsolver.h:65
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
IMLSolverType solverType
IML Solver type.
Definition: imlsolver.h:76
Class representing vector of real numbers.
Definition: floatarray.h:82
Abstract class for IML++ compatible preconditioner.
Definition: precond.h:53
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual LinSystSolverType giveLinSystSolverType() const
Definition: imlsolver.h:107
Implements the solution of linear system of equation in the form using iterative solvers from IML++ ...
Definition: imlsolver.h:61
Class representing the general Input Record.
Definition: inputrecord.h:101
IMLPrecondType
Preconditioner type.
Definition: imlsolver.h:67
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
virtual SparseMtrxType giveRecommendedMatrix(bool symmetric) const
Returns the recommended sparse matrix type for this solver.
Definition: imlsolver.h:108
the oofem namespace is to define a context or scope in which all oofem names are defined.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011