Tempus
Version of the Day
Time Integration
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
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>
25
class
Stepper_ErrorNorm
{
26
public
:
28
Stepper_ErrorNorm
();
29
31
Stepper_ErrorNorm
(
const
Scalar relTol,
const
Scalar absTol);
32
34
~Stepper_ErrorNorm
(){};
35
52
Scalar
computeWRMSNorm
(
53
const
Teuchos::RCP
<
const
Thyra::VectorBase<Scalar>
> &x,
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_
;
76
Teuchos::RCP<Thyra::VectorBase<Scalar>
>
u_
;
77
Teuchos::RCP<Thyra::VectorBase<Scalar>
>
uNext_
;
78
Teuchos::RCP<Thyra::VectorBase<Scalar>
>
errorWeightVector_
;
79
Teuchos::RCP<Thyra::VectorBase<Scalar>
>
scratchVector_
;
80
};
81
82
}
// namespace Tempus
83
#endif // Tempus_Stepper_ErrorNorm_decl_hpp
Tempus::Stepper_ErrorNorm::errorWeightVector_
Teuchos::RCP< Thyra::VectorBase< Scalar > > errorWeightVector_
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:78
Tempus::Stepper_ErrorNorm::relTol_
Scalar relTol_
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:74
Tempus::Stepper_ErrorNorm::setAbsoluteTolerance
void setAbsoluteTolerance(const Scalar absTol)
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:71
Tempus::Stepper_ErrorNorm::Stepper_ErrorNorm
Stepper_ErrorNorm()
Default Constructor.
Definition:
Tempus_Stepper_ErrorNorm_impl.hpp:24
Tempus::Stepper_ErrorNorm::~Stepper_ErrorNorm
~Stepper_ErrorNorm()
Destructor.
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:34
Tempus::Stepper_ErrorNorm::scratchVector_
Teuchos::RCP< Thyra::VectorBase< Scalar > > scratchVector_
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:79
Tempus::Stepper_ErrorNorm::abssTol_
Scalar abssTol_
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:75
Tempus::Stepper_ErrorNorm::setRelativeTolerance
void setRelativeTolerance(const Scalar relTol)
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:70
Thyra::VectorBase
Tempus::Stepper_ErrorNorm::computeWRMSNorm
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.
Definition:
Tempus_Stepper_ErrorNorm_impl.hpp:37
Tempus::Stepper_ErrorNorm::u_
Teuchos::RCP< Thyra::VectorBase< Scalar > > u_
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:76
Tempus::Stepper_ErrorNorm
Stepper_ErrorNorm provides error norm calcualtions for variable time stepping.
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:25
Tempus::Stepper_ErrorNorm::errorNorm
Scalar errorNorm(const Teuchos::RCP< const Thyra::VectorBase< Scalar >> &x)
Compute the error Norm.
Definition:
Tempus_Stepper_ErrorNorm_impl.hpp:73
Teuchos_RCPDecl.hpp
Teuchos::RCP
Tempus::Stepper_ErrorNorm::uNext_
Teuchos::RCP< Thyra::VectorBase< Scalar > > uNext_
Definition:
Tempus_Stepper_ErrorNorm_decl.hpp:77
Generated on Fri Nov 22 2024 09:23:25 for Tempus by
1.8.5