Belos  Version of the Day
BelosSolverManager.hpp
Go to the documentation of this file.
1 
2 //@HEADER
3 // ************************************************************************
4 //
5 // Belos: Block Linear Solvers Package
6 // Copyright 2004 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 
43 #ifndef BELOS_SOLVERMANAGER_HPP
44 #define BELOS_SOLVERMANAGER_HPP
45 
50 #include "BelosConfigDefs.hpp"
51 #include "BelosTypes.hpp"
52 #include "BelosLinearProblem.hpp"
53 #include "BelosStatusTestCombo.hpp"
54 
55 #include "Teuchos_ParameterList.hpp"
56 #include "Teuchos_RCP.hpp"
57 #include "Teuchos_Describable.hpp"
58 
64 namespace Belos {
65 
66 
67 template <class ScalarType, class MV, class OP>
68 class StatusTest;
69 
70 
71 template<class ScalarType, class MV, class OP>
72 class SolverManager : virtual public Teuchos::Describable {
73 
74  public:
75 
77 
78 
81 
83  virtual ~SolverManager() {};
84 
88  virtual Teuchos::RCP<SolverManager<ScalarType, MV, OP> > clone () const = 0;
90 
92 
93 
95  virtual const LinearProblem<ScalarType,MV,OP>& getProblem() const = 0;
96 
98  virtual Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const = 0;
99 
101  virtual Teuchos::RCP<const Teuchos::ParameterList> getCurrentParameters() const = 0;
102 
114  virtual typename Teuchos::ScalarTraits<ScalarType>::magnitudeType achievedTol() const {
115  TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "achievedTol() not implemented");
116  }
117 
119  virtual int getNumIters() const = 0;
120 
124  virtual bool isLOADetected() const = 0;
125 
127 
129 
130 
132  virtual void setProblem( const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem ) = 0;
133 
144  virtual void setParameters( const Teuchos::RCP<Teuchos::ParameterList> &params ) = 0;
145 
147  virtual void setUserConvStatusTest(
148  const Teuchos::RCP<StatusTest<ScalarType,MV,OP> > &userConvStatusTest,
149  const typename StatusTestCombo<ScalarType,MV,OP>::ComboType &comboType =
151  )
152  {
153  TEUCHOS_TEST_FOR_EXCEPT_MSG(true, "Error, the function setUserConvStatusTest() has not been"
154  << " overridden for the class" << this->description() << " yet!");
155  }
156 
158  virtual void setDebugStatusTest(
159  const Teuchos::RCP<StatusTest<ScalarType,MV,OP> > &debugStatusTest
160  )
161  {
162  TEUCHOS_TEST_FOR_EXCEPT_MSG(true, "Error, the function setDebugStatusTest() has not been"
163  << " overridden for the class" << this->description() << " yet!");
164  }
165 
167 
169 
170 
177  virtual void reset( const ResetType type ) = 0;
179 
181 
182 
184  //
195  virtual ReturnType solve() = 0;
197 
198 };
199 
200 
201 namespace Details {
202 
220  template<class ScalarType,
221  class MV,
222  class OP,
223  const bool isComplex = Teuchos::ScalarTraits<ScalarType>::isComplex>
225 
226  // Specialization for isComplex = true adds nothing to SolverManager.
227  template<class ScalarType, class MV, class OP>
228  class RealSolverManager<ScalarType, MV, OP, false> :
229  public SolverManager<ScalarType, MV, OP> {
230  public:
232  virtual ~RealSolverManager () {}
233  };
234 
235  // Specialization for isComplex = true (ScalarType is complex) adds
236  // a constructor that always throws std::logic_error. Subclasses
237  // must always call the base class constructor.
238  //
239  // The complex version (isComplex = true) needs to implement all the
240  // pure virtual methods in SolverManager, even though they can never
241  // actually be called, since the constructor throws.
242  template<class ScalarType, class MV, class OP>
243  class RealSolverManager<ScalarType, MV, OP, true> :
244  public SolverManager<ScalarType, MV, OP> {
245  public:
247  // Do not throw on constructor. The DII system registers all class types
248  // and must construct even if the class will not be usable.
249  }
250  virtual ~RealSolverManager () {}
251 
253  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
254  "This solver is not implemented for complex ScalarType." );
255  }
256  virtual Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const {
257  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
258  "This solver is not implemented for complex ScalarType." );
259  }
260  virtual Teuchos::RCP<const Teuchos::ParameterList> getCurrentParameters() const {
261  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
262  "This solver is not implemented for complex ScalarType." );
263  }
264  virtual int getNumIters() const {
265  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
266  "This solver is not implemented for complex ScalarType." );
267  }
268  virtual bool isLOADetected() const {
269  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
270  "This solver is not implemented for complex ScalarType." );
271  }
272  virtual void setProblem (const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem) {
273  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
274  "This solver is not implemented for complex ScalarType." );
275  }
276  virtual void setParameters (const Teuchos::RCP<Teuchos::ParameterList>& params) {
277  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
278  "This solver is not implemented for complex ScalarType." );
279  }
280  virtual void reset (const ResetType type) {
281  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
282  "This solver is not implemented for complex ScalarType." );
283  }
284  virtual ReturnType solve () {
285  TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error,
286  "This solver is not implemented for complex ScalarType." );
287  }
288  };
289 
290 
294  template<class ScalarType>
296  public:
297  const static bool value = false;
298  };
299 
300  template<>
301  class LapackSupportsScalar<float> {
302  public:
303  const static bool value = true;
304  };
305 
306  template<>
307  class LapackSupportsScalar<double> {
308  public:
309  const static bool value = true;
310  };
311 
312 #ifdef HAVE_TEUCHOS_COMPLEX
313  template<>
314  class LapackSupportsScalar<std::complex<float> > {
315  public:
316  const static bool value = true;
317  };
318 
319  template<>
320  class LapackSupportsScalar<std::complex<double> > {
321  public:
322  const static bool value = true;
323  };
324 #endif // HAVE_TEUCHOS_COMPLEX
325 
330  template<class ScalarType,
331  class MV,
332  class OP,
333  const bool lapackSupportsScalarType =
336 
341  template<class ScalarType, class MV, class OP>
342  class SolverManagerRequiresLapack<ScalarType, MV, OP, true> :
343  public SolverManager<ScalarType, MV, OP> {
344  public:
347  };
348 
355  template<class ScalarType, class MV, class OP>
356  class SolverManagerRequiresLapack<ScalarType, MV, OP, false> :
357  public SolverManager<ScalarType, MV, OP> {
358  public:
360  TEUCHOS_TEST_FOR_EXCEPTION
361  (true, std::logic_error, "This solver is not implemented for ScalarType"
362  " types for which Teuchos::LAPACK does not have a valid implementation. "
363  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
364  }
366 
368  TEUCHOS_TEST_FOR_EXCEPTION
369  (true, std::logic_error, "This solver is not implemented for ScalarType"
370  " types for which Teuchos::LAPACK does not have a valid implementation. "
371  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
372  }
373  virtual Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const {
374  TEUCHOS_TEST_FOR_EXCEPTION
375  (true, std::logic_error, "This solver is not implemented for ScalarType"
376  " types for which Teuchos::LAPACK does not have a valid implementation. "
377  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
378  }
379  virtual Teuchos::RCP<const Teuchos::ParameterList> getCurrentParameters() const {
380  TEUCHOS_TEST_FOR_EXCEPTION
381  (true, std::logic_error, "This solver is not implemented for ScalarType"
382  " types for which Teuchos::LAPACK does not have a valid implementation. "
383  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
384  }
385  virtual int getNumIters() const {
386  TEUCHOS_TEST_FOR_EXCEPTION
387  (true, std::logic_error, "This solver is not implemented for ScalarType"
388  " types for which Teuchos::LAPACK does not have a valid implementation. "
389  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
390  }
391  virtual bool isLOADetected() const {
392  TEUCHOS_TEST_FOR_EXCEPTION
393  (true, std::logic_error, "This solver is not implemented for ScalarType"
394  " types for which Teuchos::LAPACK does not have a valid implementation. "
395  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
396  }
397  virtual void setProblem (const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem) {
398  TEUCHOS_TEST_FOR_EXCEPTION
399  (true, std::logic_error, "This solver is not implemented for ScalarType"
400  " types for which Teuchos::LAPACK does not have a valid implementation. "
401  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
402  }
403  virtual void setParameters (const Teuchos::RCP<Teuchos::ParameterList>& params) {
404  TEUCHOS_TEST_FOR_EXCEPTION
405  (true, std::logic_error, "This solver is not implemented for ScalarType"
406  " types for which Teuchos::LAPACK does not have a valid implementation. "
407  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
408  }
409  virtual void reset (const ResetType type) {
410  TEUCHOS_TEST_FOR_EXCEPTION
411  (true, std::logic_error, "This solver is not implemented for ScalarType"
412  " types for which Teuchos::LAPACK does not have a valid implementation. "
413  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
414  }
415  virtual ReturnType solve () {
416  TEUCHOS_TEST_FOR_EXCEPTION
417  (true, std::logic_error, "This solver is not implemented for ScalarType"
418  " types for which Teuchos::LAPACK does not have a valid implementation. "
419  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
420  }
421  };
422 
427  template<class ScalarType,
428  class MV,
429  class OP,
430  const bool supportsScalarType =
432  ! Teuchos::ScalarTraits<ScalarType>::isComplex>
434 
442  template<class ScalarType, class MV, class OP>
443  class SolverManagerRequiresRealLapack<ScalarType, MV, OP, true> :
444  public SolverManager<ScalarType, MV, OP> {
445  public:
448  };
449 
457  template<class ScalarType, class MV, class OP>
458  class SolverManagerRequiresRealLapack<ScalarType, MV, OP, false> :
459  public SolverManager<ScalarType, MV, OP> {
460  public:
462  // Do not throw on constructor. The DII system registers all class types
463  // and must construct even if the class will not be usable.
464  }
466 
468  TEUCHOS_TEST_FOR_EXCEPTION
469  (true, std::logic_error, "This solver is not implemented for complex "
470  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
471  "does not have a valid implementation."
472  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
473  }
474  virtual Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const {
475  TEUCHOS_TEST_FOR_EXCEPTION
476  (true, std::logic_error, "This solver is not implemented for complex "
477  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
478  "does not have a valid implementation."
479  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
480  }
481  virtual Teuchos::RCP<const Teuchos::ParameterList> getCurrentParameters() const {
482  TEUCHOS_TEST_FOR_EXCEPTION
483  (true, std::logic_error, "This solver is not implemented for complex "
484  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
485  "does not have a valid implementation."
486  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
487  }
488  virtual int getNumIters() const {
489  TEUCHOS_TEST_FOR_EXCEPTION
490  (true, std::logic_error, "This solver is not implemented for complex "
491  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
492  "does not have a valid implementation."
493  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
494  }
495  virtual bool isLOADetected() const {
496  TEUCHOS_TEST_FOR_EXCEPTION
497  (true, std::logic_error, "This solver is not implemented for complex "
498  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
499  "does not have a valid implementation."
500  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
501  }
502  virtual void
503  setProblem (const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> >& /* problem */) {
504  TEUCHOS_TEST_FOR_EXCEPTION
505  (true, std::logic_error, "This solver is not implemented for complex "
506  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
507  "does not have a valid implementation."
508  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
509  }
510  virtual void setParameters (const Teuchos::RCP<Teuchos::ParameterList>& params) {
511  TEUCHOS_TEST_FOR_EXCEPTION
512  (true, std::logic_error, "This solver is not implemented for complex "
513  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
514  "does not have a valid implementation."
515  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
516  }
517  virtual void reset (const ResetType type) {
518  TEUCHOS_TEST_FOR_EXCEPTION
519  (true, std::logic_error, "This solver is not implemented for complex "
520  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
521  "does not have a valid implementation."
522  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
523  }
524  virtual ReturnType solve () {
525  TEUCHOS_TEST_FOR_EXCEPTION
526  (true, std::logic_error, "This solver is not implemented for complex "
527  "ScalarType types, or for ScalarType types for which Teuchos::LAPACK "
528  "does not have a valid implementation."
529  "ScalarType = " << Teuchos::TypeNameTraits<ScalarType>::name () << ".");
530  }
531  };
532 
533 } // namespace Details
534 } // namespace Belos
535 
536 #endif /* BELOS_SOLVERMANAGER_HPP */
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::isLOADetected
virtual bool isLOADetected() const
Returns whether a loss of accuracy was detected in the solver.
Definition: BelosSolverManager.hpp:391
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::getNumIters
virtual int getNumIters() const
Get the iteration count for the most recent call to solve().
Definition: BelosSolverManager.hpp:488
Belos::SolverManager::clone
virtual Teuchos::RCP< SolverManager< ScalarType, MV, OP > > clone() const =0
clone the solver manager.
Belos::SolverManager::isLOADetected
virtual bool isLOADetected() const =0
Returns whether a loss of accuracy was detected in the solver.
Belos::Details::SolverManagerRequiresLapack
Base class for Belos::SolverManager subclasses which normally can only compile with ScalarType types ...
Definition: BelosSolverManager.hpp:335
BelosConfigDefs.hpp
Belos header file which uses auto-configuration information to include necessary C++ headers.
Belos::Details::RealSolverManager< ScalarType, MV, OP, false >::~RealSolverManager
virtual ~RealSolverManager()
Definition: BelosSolverManager.hpp:232
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::setParameters
virtual void setParameters(const Teuchos::RCP< Teuchos::ParameterList > &params)
Set the parameters to use when solving the linear problem.
Definition: BelosSolverManager.hpp:276
Belos::SolverManager::getValidParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const =0
Return the valid parameters for this solver manager.
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::solve
virtual ReturnType solve()
Iterate until the status test tells us to stop.
Definition: BelosSolverManager.hpp:415
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::reset
virtual void reset(const ResetType type)
Reset the solver manager.
Definition: BelosSolverManager.hpp:280
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::getCurrentParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const
Return the current parameters being used for this solver manager.
Definition: BelosSolverManager.hpp:260
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::setProblem
virtual void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem)
Set the linear problem that needs to be solved.
Definition: BelosSolverManager.hpp:272
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, true >::~SolverManagerRequiresRealLapack
virtual ~SolverManagerRequiresRealLapack()
Definition: BelosSolverManager.hpp:447
BelosLinearProblem.hpp
Class which describes the linear problem to be solved by the iterative solver.
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::solve
virtual ReturnType solve()
Iterate until the status test tells us to stop.
Definition: BelosSolverManager.hpp:284
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::RealSolverManager
RealSolverManager()
Definition: BelosSolverManager.hpp:246
Belos::Details::LapackSupportsScalar::value
const static bool value
Definition: BelosSolverManager.hpp:297
Belos::Details::RealSolverManager
Base class for Belos::SolverManager subclasses which normally can only compile for real ScalarType.
Definition: BelosSolverManager.hpp:224
Belos::SolverManager::setUserConvStatusTest
virtual void setUserConvStatusTest(const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &userConvStatusTest, const typename StatusTestCombo< ScalarType, MV, OP >::ComboType &comboType=StatusTestCombo< ScalarType, MV, OP >::SEQ)
Set user-defined convergence status test.
Definition: BelosSolverManager.hpp:147
Belos::StatusTestCombo::ComboType
ComboType
The test can be either the AND of all the component tests, or the OR of all the component tests,...
Definition: BelosStatusTestCombo.hpp:109
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::getNumIters
virtual int getNumIters() const
Get the iteration count for the most recent call to solve().
Definition: BelosSolverManager.hpp:264
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::setParameters
virtual void setParameters(const Teuchos::RCP< Teuchos::ParameterList > &params)
Set the parameters to use when solving the linear problem.
Definition: BelosSolverManager.hpp:510
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::setParameters
virtual void setParameters(const Teuchos::RCP< Teuchos::ParameterList > &params)
Set the parameters to use when solving the linear problem.
Definition: BelosSolverManager.hpp:403
Belos::LinearProblem
A linear system to solve, and its associated information.
Definition: BelosIteration.hpp:61
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::SolverManagerRequiresRealLapack
SolverManagerRequiresRealLapack()
Definition: BelosSolverManager.hpp:461
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::getNumIters
virtual int getNumIters() const
Get the iteration count for the most recent call to solve().
Definition: BelosSolverManager.hpp:385
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::reset
virtual void reset(const ResetType type)
Reset the solver manager.
Definition: BelosSolverManager.hpp:409
Belos::SolverManager::setProblem
virtual void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem)=0
Set the linear problem that needs to be solved.
Belos::Details::RealSolverManager< ScalarType, MV, OP, false >::RealSolverManager
RealSolverManager()
Definition: BelosSolverManager.hpp:231
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::getValidParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Return the valid parameters for this solver manager.
Definition: BelosSolverManager.hpp:373
Belos
Definition: Belos_Details_EBelosSolverType.cpp:45
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::isLOADetected
virtual bool isLOADetected() const
Returns whether a loss of accuracy was detected in the solver.
Definition: BelosSolverManager.hpp:268
Belos::SolverManager::getNumIters
virtual int getNumIters() const =0
Get the iteration count for the most recent call to solve().
Belos::SolverManager::setParameters
virtual void setParameters(const Teuchos::RCP< Teuchos::ParameterList > &params)=0
Set the parameters to use when solving the linear problem.
Belos::Details::LapackSupportsScalar
Type traits class that says whether Teuchos::LAPACK has a valid implementation for the given ScalarTy...
Definition: BelosSolverManager.hpp:295
Belos::SolverManager::solve
virtual ReturnType solve()=0
Iterate until the status test tells us to stop.
Belos::Details::SolverManagerRequiresRealLapack
Base class for Belos::SolverManager subclasses which normally can only compile with real ScalarType t...
Definition: BelosSolverManager.hpp:433
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, true >::SolverManagerRequiresRealLapack
SolverManagerRequiresRealLapack()
Definition: BelosSolverManager.hpp:446
Belos::SolverManager::SolverManager
SolverManager()
Empty constructor.
Definition: BelosSolverManager.hpp:80
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::reset
virtual void reset(const ResetType type)
Reset the solver manager.
Definition: BelosSolverManager.hpp:517
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::~SolverManagerRequiresLapack
virtual ~SolverManagerRequiresLapack()
Definition: BelosSolverManager.hpp:365
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::~SolverManagerRequiresRealLapack
virtual ~SolverManagerRequiresRealLapack()
Definition: BelosSolverManager.hpp:465
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::setProblem
virtual void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem)
Set the linear problem that needs to be solved.
Definition: BelosSolverManager.hpp:397
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::getValidParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Return the valid parameters for this solver manager.
Definition: BelosSolverManager.hpp:474
Belos::SolverManager::setDebugStatusTest
virtual void setDebugStatusTest(const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &debugStatusTest)
Set user-defined debug status test.
Definition: BelosSolverManager.hpp:158
Belos::ReturnType
ReturnType
Whether the Belos solve converged for all linear systems.
Definition: BelosTypes.hpp:154
Belos::SolverManager::~SolverManager
virtual ~SolverManager()
Destructor.
Definition: BelosSolverManager.hpp:83
Belos::ResetType
ResetType
How to reset the solver.
Definition: BelosTypes.hpp:205
Belos::StatusTest
A pure virtual class for defining the status tests for the Belos iterative solvers.
Definition: BelosIteration.hpp:67
Belos::SolverManager::getProblem
virtual const LinearProblem< ScalarType, MV, OP > & getProblem() const =0
Return a reference to the linear problem being solved by this solver manager.
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::getProblem
virtual const LinearProblem< ScalarType, MV, OP > & getProblem() const
Return a reference to the linear problem being solved by this solver manager.
Definition: BelosSolverManager.hpp:367
Belos::StatusTestCombo
A class for extending the status testing capabilities of Belos via logical combinations.
Definition: BelosStatusTestCombo.hpp:91
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::getProblem
virtual const LinearProblem< ScalarType, MV, OP > & getProblem() const
Return a reference to the linear problem being solved by this solver manager.
Definition: BelosSolverManager.hpp:252
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::setProblem
virtual void setProblem(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &)
Set the linear problem that needs to be solved.
Definition: BelosSolverManager.hpp:503
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, true >::~SolverManagerRequiresLapack
virtual ~SolverManagerRequiresLapack()
Definition: BelosSolverManager.hpp:346
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, true >::SolverManagerRequiresLapack
SolverManagerRequiresLapack()
Definition: BelosSolverManager.hpp:345
BelosTypes.hpp
Collection of types and exceptions used within the Belos solvers.
Belos::SolverManager::achievedTol
virtual Teuchos::ScalarTraits< ScalarType >::magnitudeType achievedTol() const
Tolerance achieved by the last solve() invocation.
Definition: BelosSolverManager.hpp:114
Belos::SolverManager::getCurrentParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const =0
Return the current parameters being used for this solver manager.
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::~RealSolverManager
virtual ~RealSolverManager()
Definition: BelosSolverManager.hpp:250
Belos::Details::RealSolverManager< ScalarType, MV, OP, true >::getValidParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Return the valid parameters for this solver manager.
Definition: BelosSolverManager.hpp:256
Belos::SolverManager
The Belos::SolverManager is a templated virtual base class that defines the basic interface that any ...
Definition: BelosSolverManager.hpp:72
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::getCurrentParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const
Return the current parameters being used for this solver manager.
Definition: BelosSolverManager.hpp:379
Belos::Details::SolverManagerRequiresLapack< ScalarType, MV, OP, false >::SolverManagerRequiresLapack
SolverManagerRequiresLapack()
Definition: BelosSolverManager.hpp:359
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::getProblem
virtual const LinearProblem< ScalarType, MV, OP > & getProblem() const
Return a reference to the linear problem being solved by this solver manager.
Definition: BelosSolverManager.hpp:467
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::isLOADetected
virtual bool isLOADetected() const
Returns whether a loss of accuracy was detected in the solver.
Definition: BelosSolverManager.hpp:495
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::solve
virtual ReturnType solve()
Iterate until the status test tells us to stop.
Definition: BelosSolverManager.hpp:524
Belos::SolverManager::reset
virtual void reset(const ResetType type)=0
Reset the solver manager.
BelosStatusTestCombo.hpp
Belos::StatusTest for logically combining several status tests.
Belos::Details::SolverManagerRequiresRealLapack< ScalarType, MV, OP, false >::getCurrentParameters
virtual Teuchos::RCP< const Teuchos::ParameterList > getCurrentParameters() const
Return the current parameters being used for this solver manager.
Definition: BelosSolverManager.hpp:481

Generated on Thu Feb 27 2020 16:06:46 for Belos by doxygen 1.8.16