Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_GaussSeidelPreconditioner.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_GAUSS_SEIDEL_PRECONDITIONER_HPP
11 #define STOKHOS_GAUSS_SEIDEL_PRECONDITIONER_HPP
12 
13 #include "Stokhos_ConfigDefs.h"
14 
15 #ifdef HAVE_STOKHOS_NOX
16 
17 #include "NOX_Config.h"
18 
19 #ifdef HAVE_NOX_EPETRAEXT
20 
21 #include "Teuchos_RCP.hpp"
22 
24 #include "EpetraExt_MultiComm.h"
27 #include "Epetra_Map.h"
28 #include "Epetra_Export.h"
29 #include "NOX_Epetra_LinearSystem.H"
31 #include "EpetraExt_BlockMultiVector.h"
32 
33 namespace Stokhos {
34 
39  class GaussSeidelPreconditioner : public Stokhos::SGPreconditioner {
40 
41  public:
42 
44  GaussSeidelPreconditioner(
46  const Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >& sg_basis,
48  const Teuchos::RCP<const Epetra_Map>& base_map,
49  const Teuchos::RCP<const Epetra_Map>& sg_map,
52 
54  virtual ~GaussSeidelPreconditioner();
55 
58 
60  virtual void
61  setupPreconditioner(const Teuchos::RCP<Stokhos::SGOperator>& sg_op,
62  const Epetra_Vector& x);
63 
65 
68 
70  virtual int SetUseTranspose(bool UseTranspose);
71 
76  virtual int Apply(const Epetra_MultiVector& Input,
77  Epetra_MultiVector& Result) const;
78 
83  virtual int ApplyInverse(const Epetra_MultiVector& X,
84  Epetra_MultiVector& Y) const;
85 
87  virtual double NormInf() const;
88 
90  virtual const char* Label () const;
91 
93  virtual bool UseTranspose() const;
94 
99  virtual bool HasNormInf() const;
100 
105  virtual const Epetra_Comm & Comm() const;
106 
111  virtual const Epetra_Map& OperatorDomainMap () const;
112 
117  virtual const Epetra_Map& OperatorRangeMap () const;
118 
120 
121  private:
122 
124  GaussSeidelPreconditioner(const GaussSeidelPreconditioner&);
125 
127  GaussSeidelPreconditioner& operator=(const GaussSeidelPreconditioner&);
128 
129  protected:
130 
132  std::string label;
133 
136 
139 
142 
145 
148 
150  bool is_stoch_parallel;
151 
154 
157 
160 
162  bool useTranspose;
163 
166 
169 
172 
175 
177  mutable Teuchos::RCP<EpetraExt::BlockMultiVector> sg_df_block;
178 
181 
184 
186  bool is_parallel;
187 
190 
192  Teuchos::RCP<Epetra_Export> col_exporter;
193 
196 
199 
200 
201  }; // class GaussSeidelPreconditioner
202 
203 } // namespace Stokhos
204 
205 #endif
206 
207 #endif
208 
209 #endif // STOKHOS_GAUSS_SEIDEL_PRECONDITIONER_HPP
Stokhos::Sparse3Tensor< int, double > Cijk_type
An abstract class to represent a generic stochastic Galerkin preconditioner as an Epetra_Operator...