9#ifndef Tempus_Stepper_ErrorNorm_impl_hpp
10#define Tempus_Stepper_ErrorNorm_impl_hpp
12#include "Teuchos_ScalarTraitsDecl.hpp"
13#include "Thyra_DefaultSerialDenseLinearOpWithSolve_decl.hpp"
14#include "Thyra_MultiVectorStdOps_decl.hpp"
15#include "Thyra_VectorSpaceBase_decl.hpp"
16#include "Thyra_VectorStdOps_decl.hpp"
41 if (
u_ == Teuchos::null)
42 u_ = Thyra::createMember(x->space());
44 if (
uNext_ == Teuchos::null)
45 uNext_ = Thyra::createMember(x->space());
48 Thyra::abs(*x,
u_.ptr());
49 Thyra::abs(*xNext,
uNext_.ptr());
56 Thyra::add_scalar(absTol,
uNext_.ptr());
62 const auto space_dim = err->space()->dim();
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 > > errorWeightVector_
Teuchos::RCP< Thyra::VectorBase< Scalar > > u_
Teuchos::RCP< Thyra::VectorBase< Scalar > > uNext_
Scalar errorNorm(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &x)
Compute the error Norm.
Stepper_ErrorNorm()
Default Constructor.
Teuchos::RCP< Thyra::VectorBase< Scalar > > scratchVector_
bool approxZero(Scalar value, Scalar tol=Teuchos::ScalarTraits< Scalar >::sfmin())
Test if value is approximately zero within tolerance.
const Scalar numericalTol()
Numerical Tolerance (approx. max. significant digits minus two)