OOFEM 3.0
Loading...
Searching...
No Matches
precond.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 - 2025 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 precond_h
36#define precond_h
37
38#include "oofemenv.h"
39#include "floatarray.h"
40#include "sparsemtrx.h"
41#include "inputrecord.h"
42
43namespace oofem {
54{
55public:
63 Preconditioner(const SparseMtrx & a, InputRecord & attributes);
70 virtual ~Preconditioner(void) { }
71
77 virtual void init(const SparseMtrx &a) { }
78
84 FloatArray solve(const FloatArray &rhs) const {
85 FloatArray y;
86 this->solve(rhs, y);
87 return y;
88 }
89
94 FloatArray trans_solve(const FloatArray &rhs) const {
95 FloatArray y;
96 this->trans_solve(rhs, y);
97 return y;
98 }
99
104 virtual void solve(const FloatArray &rhs, FloatArray &solution) const = 0;
110 virtual void trans_solve(const FloatArray &rhs, FloatArray &solution) const = 0;
111
113 virtual const char *giveClassName() const { return "Preconditioner"; }
115 virtual void initializeFrom(InputRecord &ir) { }
116};
117} // end namespace oofem
118#endif // precond_h
virtual ~Preconditioner(void)
Destructor.
Definition precond.h:70
virtual const char * giveClassName() const
Returns the preconditioner name.
Definition precond.h:113
virtual void trans_solve(const FloatArray &rhs, FloatArray &solution) const =0
virtual void initializeFrom(InputRecord &ir)
Initializes receiver from given record. Empty implementation.
Definition precond.h:115
virtual void solve(const FloatArray &rhs, FloatArray &solution) const =0
Preconditioner(const SparseMtrx &a, InputRecord &attributes)
Definition precond.C:38
FloatArray trans_solve(const FloatArray &rhs) const
Definition precond.h:94
FloatArray solve(const FloatArray &rhs) const
Definition precond.h:84
virtual void init(const SparseMtrx &a)
Definition precond.h:77
#define OOFEM_EXPORT
Definition oofemcfg.h:7

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011