OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
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 
39 namespace oofem {
44 class OOFEM_EXPORT CompCol_ICPreconditioner : public Preconditioner
45 {
46 private:
50  int nz_;
51  int dim_ [ 2 ];
52 
53 public:
55  CompCol_ICPreconditioner(const SparseMtrx & A, InputRecord & attributes);
59  virtual ~CompCol_ICPreconditioner(void) { }
60 
61  virtual void init(const SparseMtrx &a);
62 
63  void initialize(const CompCol &A);
64 
65  void solve(const FloatArray &rhs, FloatArray &solution) const;
66  void trans_solve(const FloatArray &rhs, FloatArray &solution) const;
67 
68  virtual const char *giveClassName() const { return "ICP"; }
69  virtual IRResultType initializeFrom(InputRecord *ir);
70 
71 protected:
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
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
Class implementing an array of integers.
Definition: intarray.h:61
Incomplete Cholesky IC(0) (no fill - up) preconditioner for symmetric, positive definite matrices...
Definition: icprecond.h:44
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 const char * giveClassName() const
Returns the preconditioner name.
Definition: icprecond.h:68
Class representing the general Input Record.
Definition: inputrecord.h:101
the oofem namespace is to define a context or scope in which all oofem names are defined.
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

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