OOFEM 3.0
Loading...
Searching...
No Matches
icprecond.h
Go to the documentation of this file.
1/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
2/* ******** *** SparseLib++ */
3/* ******* ** *** *** *** v. 1.5c */
4/* ***** *** ******** ******** */
5/* ***** *** ******** ******** R. Pozo */
6/* ** ******* *** ** *** *** K. Remington */
7/* ******** ******** A. Lumsdaine */
8/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
9/* */
10/* */
11/* SparseLib++ : Sparse Matrix Library */
12/* */
13/* National Institute of Standards and Technology */
14/* University of Notre Dame */
15/* Authors: R. Pozo, K. Remington, A. Lumsdaine */
16/* */
17/* NOTICE */
18/* */
19/* Permission to use, copy, modify, and distribute this software and */
20/* its documentation for any purpose and without fee is hereby granted */
21/* provided that the above notice appear in all copies and supporting */
22/* documentation. */
23/* */
24/* Neither the Institutions (National Institute of Standards and Technology, */
25/* University of Notre Dame) nor the Authors make any representations about */
26/* the suitability of this software for any purpose. This software is */
27/* provided ``as is'' without expressed or implied warranty. */
28/* */
29/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
30
31#ifndef icprecond_h
32#define icprecond_h
33
34#include "floatarray.h"
35#include "intarray.h"
36#include "symcompcol.h"
37#include "precond.h"
38
39namespace oofem {
45{
46private:
50 int nz;
51 int dim [ 2 ];
52
53public:
55 CompCol_ICPreconditioner(const SparseMtrx & A, InputRecord & attributes);
59 virtual ~CompCol_ICPreconditioner(void) { }
60
61 void init(const SparseMtrx &a) override;
62
63 void initialize(const CompCol &A);
64
65 void solve(const FloatArray &rhs, FloatArray &solution) const override;
66 void trans_solve(const FloatArray &rhs, FloatArray &solution) const override;
67
68 const char *giveClassName() const override { return "ICP"; }
69 void initializeFrom(InputRecord &ir) override;
70
71protected:
72 void qsortRow(IntArray &, FloatArray &, int l, int r);
73 int qsortRowPartition(IntArray &, FloatArray &, int l, int r);
74
75 void ICSolve(FloatArray &dest) const;
76 void ICFactor();
77};
78} // end namespace oofem
79#endif // icprecond_h
virtual ~CompCol_ICPreconditioner(void)
Destructor.
Definition icprecond.h:59
CompCol_ICPreconditioner()
Constructor. The user should call initializeFrom and init services in this given order to ensure cons...
Definition icprecond.h:57
const char * giveClassName() const override
Returns the preconditioner name.
Definition icprecond.h:68
CompCol_ICPreconditioner(const SparseMtrx &A, InputRecord &attributes)
Constructor. Initializes the the receiver (constructs the precontioning matrix M) of given matrix.
Definition icprecond.C:38
Preconditioner(const SparseMtrx &a, InputRecord &attributes)
Definition precond.C:38
FloatArrayF< N > solve(FloatMatrixF< N, N > mtrx, const FloatArrayF< N > &b, double zeropiv=1e-20)
#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