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: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_Stepper_ErrorNorm_decl_hpp
10 #define Tempus_Stepper_ErrorNorm_decl_hpp
11 
12 #include "Tempus_config.hpp"
13 
14 #include "Teuchos_RCPDecl.hpp"
15 #include "Thyra_VectorBase.hpp"
16 #include "Thyra_VectorSpaceFactoryBase.hpp"
17 namespace Tempus {
18 
23 template <class Scalar>
25  public:
28 
30  Stepper_ErrorNorm(const Scalar relTol, const Scalar absTol);
31 
34 
51  Scalar computeWRMSNorm(
53  const Teuchos::RCP<const Thyra::VectorBase<Scalar>> &xNext,
54  const Teuchos::RCP<const Thyra::VectorBase<Scalar>> &err);
55 
67  Scalar errorNorm(const Teuchos::RCP<const Thyra::VectorBase<Scalar>> &x);
68 
69  void setRelativeTolerance(const Scalar relTol) { relTol_ = relTol; }
70  void setAbsoluteTolerance(const Scalar absTol) { abssTol_ = absTol; }
71 
72  protected:
73  Scalar relTol_;
74  Scalar abssTol_;
79 };
80 
81 } // namespace Tempus
82 #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_