LifeV
Preconditioner.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief Epetra preconditioner
30 
31  @author Simone Deparis <simone.deparis@epfl.ch>
32  @contributor Gwenol Grandperrin <gwenol.grandperrin@epfl.ch>
33  @maintainer Gwenol Grandperrin <gwenol.grandperrin@epfl.ch>
34 
35  @date 09-11-2006
36  */
37 
38 #include <lifev/core/LifeV.hpp>
39 #include "Preconditioner.hpp"
40 
41 namespace LifeV
42 {
43 
44 // ===================================================
45 // Constructors & Destructor
46 // ===================================================
47 Preconditioner::Preconditioner ( const commPtr_Type& comm ) :
48  M_precType ( "Preconditioner" ),
49  M_displayer ( comm ),
50  M_list (),
51  M_preconditionerCreated ( false )
52 {
53 
54 }
55 
56 Preconditioner::Preconditioner ( const Preconditioner& preconditioner, const commPtr_Type& comm ) :
57  M_precType ( preconditioner.M_precType ),
58  M_displayer ( comm ),
59  M_list ( preconditioner.parametersList() ),
61 {
62 
63 }
64 
66 {
67 
68 }
69 
70 // ===================================================
71 // Methods
72 // ===================================================
73 
74 
75 // ===================================================
76 // Epetra Operator Interface Methods
77 // ===================================================
78 Int
79 Preconditioner::SetUseTranspose ( const bool /*useTranspose=false*/ )
80 {
81  assert ( false );
82  return 0;
83 }
84 
85 Int
86 Preconditioner::Apply ( const Epetra_MultiVector& /*vector1*/, Epetra_MultiVector& /*vector2*/ ) const
87 {
88  assert ( false );
89  return 0;
90 }
91 
92 Int
93 Preconditioner::ApplyInverse ( const Epetra_MultiVector& /*vector1*/, Epetra_MultiVector& /*vector2*/ ) const
94 {
95  assert ( false );
96  return 0;
97 }
98 
99 void
100 Preconditioner::showMe ( std::ostream& /*output*/ ) const
101 {
102  assert ( false );
103 }
104 
105 // ===================================================
106 // Set Methods
107 // ===================================================
108 void
110 {
111  M_list = list;
112 }
113 
114 void
116 {
117  //assert( false );
118 }
119 
120 // ===================================================
121 // Get Methods
122 // ===================================================
123 const bool&
125 {
127 }
128 
131 {
132  return M_list;
133 }
134 
137 {
138  return M_list;
139 }
140 
141 bool
143 {
144  assert ( false );
145  return false;
146 }
147 
148 const Epetra_Map&
150 {
151  assert ( false );
152  Epetra_Map* emptyMapPtr ( NULL );
153  return *emptyMapPtr;
154 }
155 
156 const Epetra_Map&
158 {
159  assert ( false );
160  Epetra_Map* emptyMapPtr ( NULL );
161  return *emptyMapPtr;
162 }
163 
164 } // namespace LifeV
virtual Int Apply(const Epetra_MultiVector &vector1, Epetra_MultiVector &vector2) const
Apply the inverse of the preconditioner on vector1 and store the result in vector2.
virtual const Epetra_Map & OperatorRangeMap() const
Return the Range map of the operator.
const bool & preconditionerCreated()
Return true if the preconditioner has been created.
SolverAztecOO - Class to wrap linear solver.
Displayer(const commPtr_Type &comm)
Definition: Displayer.cpp:56
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
virtual void showMe(std::ostream &output=std::cout) const
Show informations about the preconditioner.
virtual void setSolver(SolverAztecOO &)
Set the internal solver.
void updateInverseJacobian(const UInt &iQuadPt)
const list_Type & parametersList() const
Return the parameters list.
virtual Int SetUseTranspose(const bool useTranspose=false)
Set the matrix to be used transposed (or not)
void setParametersList(const list_Type &list)
The the internal list.
Preconditioner(const Preconditioner &preconditioner, const commPtr_Type &comm=commPtr_Type())
Copy constructor.
list_Type & parametersList()
Return the parameters list.
virtual Int ApplyInverse(const Epetra_MultiVector &vector1, Epetra_MultiVector &vector2) const
Apply the inverse of the preconditioner on vector1 and store the result in vector2.
Preconditioner(const commPtr_Type &comm=commPtr_Type())
Constructor.
Teuchos::ParameterList list_Type
Preconditioner - Abstract preconditioner class.
virtual ~Preconditioner()
Destructor.
virtual const Epetra_Map & OperatorDomainMap() const
Return the Domain map of the operator.
virtual bool UseTranspose()
Return true if the preconditioner is transposed.