OOFEM 3.0
Loading...
Searching...
No Matches
ilucomprowprecond.C
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#include "dyncomprow.h"
36#include "ilucomprowprecond.h"
37#include "verbose.h"
38
39namespace oofem {
40CompRow_ILUPreconditioner ::
41CompRow_ILUPreconditioner(const SparseMtrx &A, InputRecord &attributes) : Preconditioner(A, attributes)
42{ }
43
44void
45CompRow_ILUPreconditioner :: initializeFrom(InputRecord &ir)
46{
47 Preconditioner :: initializeFrom(ir);
48 this->drop_tol = 1.e-8;
50
51 part_fill = 5;
53}
54
55
56void
57CompRow_ILUPreconditioner :: init(const SparseMtrx &A)
58{
59 if ( dynamic_cast< const DynCompRow *>(& A) ) {
60 this->A = static_cast< const DynCompRow &>(A);
61 this->A.ILUPYourself(part_fill, drop_tol);
62 } else {
63 OOFEM_ERROR("unsupported sparse matrix type");
64 }
65}
66
67
68void
69CompRow_ILUPreconditioner :: solve(const FloatArray &x, FloatArray &y) const
70{
71 A.ILUPsolve(x, y);
72}
73
74
75void
76CompRow_ILUPreconditioner :: trans_solve(const FloatArray &x, FloatArray &y) const
77{
78 A.ILUPtrans_solve(x, y);
79}
80} // end namespace oofem
Preconditioner(const SparseMtrx &a, InputRecord &attributes)
Definition precond.C:38
#define OOFEM_ERROR(...)
Definition error.h:79
#define _IFT_CompRow_ILUPrecond_partfill
#define _IFT_CompRow_ILUPrecond_droptol
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75

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