Belos
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
BelosStatusTestResNorm.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Belos: Block Linear Solvers Package
4
//
5
// Copyright 2004-2016 NTESS and the Belos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef BELOS_STATUS_TEST_RESNORM_H
11
#define BELOS_STATUS_TEST_RESNORM_H
12
17
18
#include "
BelosStatusTest.hpp
"
19
#include "
BelosLinearProblem.hpp
"
20
#include "
BelosMultiVecTraits.hpp
"
21
26
27
namespace
Belos
{
28
29
template
<
class
ScalarType,
class
MV,
class
OP>
30
class
StatusTestResNorm
:
public
StatusTest
<ScalarType,MV,OP> {
31
32
public
:
33
34
// Convenience typedefs
35
typedef
Teuchos::ScalarTraits<ScalarType>
SCT
;
36
typedef
typename
SCT::magnitudeType
MagnitudeType
;
37
typedef
MultiVecTraits<ScalarType,MV>
MVT
;
38
40
41
43
46
virtual
int
setTolerance
(
MagnitudeType
tolerance) = 0;
47
50
virtual
int
setQuorum
(
int
quorum) = 0;
51
53
virtual
int
setShowMaxResNormOnly
(
bool
showMaxResNormOnly) = 0;
54
56
virtual
int
defineScaleForm
(
ScaleType
TypeOfScaling,
NormType
TypeOfNorm,
MagnitudeType
ScaleValue = Teuchos::ScalarTraits<MagnitudeType>::one()) = 0;
57
59
61
62
65
virtual
int
getQuorum
()
const
= 0;
66
68
virtual
bool
getShowMaxResNormOnly
() = 0;
69
71
virtual
std::vector<int>
convIndices
() = 0;
72
74
virtual
MagnitudeType
getTolerance
()
const
= 0;
75
77
virtual
const
std::vector<MagnitudeType>*
getTestValue
()
const
= 0;
78
81
virtual
Teuchos::RCP<MV>
getSolution
() = 0;
82
84
virtual
bool
getLOADetected
()
const
= 0;
85
87
88
};
89
90
}
// end namespace Belos
91
92
#endif
/* BELOS_STATUS_TEST_RESNORM_H */
BelosLinearProblem.hpp
Class which describes the linear problem to be solved by the iterative solver.
BelosMultiVecTraits.hpp
Declaration of basic traits for the multivector type.
BelosStatusTest.hpp
Pure virtual base class for defining the status testing capabilities of Belos.
Belos::MultiVecTraits
Traits class which defines basic operations on multivectors.
Definition
BelosMultiVecTraits.hpp:97
Belos::StatusTest::StatusTest
StatusTest()
Constructor.
Definition
BelosStatusTest.hpp:57
Belos::StatusTestResNorm
An abstract class of StatusTest for stopping criteria using residual norms.
Definition
BelosStatusTestResNorm.hpp:30
Belos::StatusTestResNorm::SCT
Teuchos::ScalarTraits< ScalarType > SCT
Definition
BelosStatusTestResNorm.hpp:35
Belos::StatusTestResNorm::getTestValue
virtual const std::vector< MagnitudeType > * getTestValue() const =0
Returns the test value, , computed in most recent call to CheckStatus.
Belos::StatusTestResNorm::MagnitudeType
SCT::magnitudeType MagnitudeType
Definition
BelosStatusTestResNorm.hpp:36
Belos::StatusTestResNorm::defineScaleForm
virtual int defineScaleForm(ScaleType TypeOfScaling, NormType TypeOfNorm, MagnitudeType ScaleValue=Teuchos::ScalarTraits< MagnitudeType >::one())=0
Define the form of the scaling for the residual.
Belos::StatusTestResNorm::getTolerance
virtual MagnitudeType getTolerance() const =0
Returns the value of the tolerance, , set in the constructor.
Belos::StatusTestResNorm::getShowMaxResNormOnly
virtual bool getShowMaxResNormOnly()=0
Returns whether the only maximum residual norm is displayed when the print() method is called.
Belos::StatusTestResNorm::getLOADetected
virtual bool getLOADetected() const =0
Returns a boolean indicating a loss of accuracy has been detected in computing the residual.
Belos::StatusTestResNorm::getQuorum
virtual int getQuorum() const =0
Belos::StatusTestResNorm::setQuorum
virtual int setQuorum(int quorum)=0
Belos::StatusTestResNorm::setShowMaxResNormOnly
virtual int setShowMaxResNormOnly(bool showMaxResNormOnly)=0
Set whether the only maximum residual norm is displayed when the print() method is called.
Belos::StatusTestResNorm::setTolerance
virtual int setTolerance(MagnitudeType tolerance)=0
Set the value of the tolerance.
Belos::StatusTestResNorm::getSolution
virtual Teuchos::RCP< MV > getSolution()=0
Belos::StatusTestResNorm::MVT
MultiVecTraits< ScalarType, MV > MVT
Definition
BelosStatusTestResNorm.hpp:37
Belos::StatusTestResNorm::convIndices
virtual std::vector< int > convIndices()=0
Returns the std::vector containing the indices of the residuals that passed the test.
Belos
Definition
Belos_Details_EBelosSolverType.cpp:13
Belos::NormType
NormType
The type of vector norm to compute.
Definition
BelosTypes.hpp:65
Belos::ScaleType
ScaleType
The type of scaling to use on the residual norm value.
Definition
BelosTypes.hpp:88
Generated for Belos by
1.17.0