Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_Stepper_ErrorNorm_decl.hpp
Go to the documentation of this file.
1 //@HEADER
2 // *****************************************************************************
3 // Tempus: Time Integration and Sensitivity Analysis Package
4 //
5 // Copyright 2017 NTESS and the Tempus contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 //@HEADER
9 
10 #ifndef Tempus_Stepper_ErrorNorm_decl_hpp
11 #define Tempus_Stepper_ErrorNorm_decl_hpp
12 
13 #include "Tempus_config.hpp"
14 
15 #include "Teuchos_RCPDecl.hpp"
16 #include "Thyra_VectorBase.hpp"
17 #include "Thyra_VectorSpaceFactoryBase.hpp"
18 namespace Tempus {
19 
24 template <class Scalar>
26  public:
29 
31  Stepper_ErrorNorm(const Scalar relTol, const Scalar absTol);
32 
35 
52  Scalar computeWRMSNorm(
54  const Teuchos::RCP<const Thyra::VectorBase<Scalar>> &xNext,
55  const Teuchos::RCP<const Thyra::VectorBase<Scalar>> &err);
56 
68  Scalar errorNorm(const Teuchos::RCP<const Thyra::VectorBase<Scalar>> &x);
69 
70  void setRelativeTolerance(const Scalar relTol) { relTol_ = relTol; }
71  void setAbsoluteTolerance(const Scalar absTol) { abssTol_ = absTol; }
72 
73  protected:
74  Scalar relTol_;
75  Scalar abssTol_;
80 };
81 
82 } // namespace Tempus
83 #endif // Tempus_Stepper_ErrorNorm_decl_hpp
Teuchos::RCP< Thyra::VectorBase< Scalar > > errorWeightVector_
void setAbsoluteTolerance(const Scalar absTol)
Teuchos::RCP< Thyra::VectorBase< Scalar > > scratchVector_
void setRelativeTolerance(const Scalar relTol)
Scalar computeWRMSNorm(const Teuchos::RCP< const Thyra::VectorBase< Scalar >> &x, const Teuchos::RCP< const Thyra::VectorBase< Scalar >> &xNext, const Teuchos::RCP< const Thyra::VectorBase< Scalar >> &err)
Compute the weigthed root mean square norm.
Teuchos::RCP< Thyra::VectorBase< Scalar > > u_
Stepper_ErrorNorm provides error norm calcualtions for variable time stepping.
Scalar errorNorm(const Teuchos::RCP< const Thyra::VectorBase< Scalar >> &x)
Compute the error Norm.
Teuchos::RCP< Thyra::VectorBase< Scalar > > uNext_