Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Tempus::Stepper_ErrorNorm< Scalar > Class Template Reference

Stepper_ErrorNorm provides error norm calcualtions for variable time stepping. More...

#include <Tempus_Stepper_ErrorNorm_decl.hpp>

Public Member Functions

 Stepper_ErrorNorm ()
 Default Constructor.
 
 Stepper_ErrorNorm (const Scalar relTol, const Scalar absTol)
 Constructor.
 
 ~Stepper_ErrorNorm ()
 Destructor.
 
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.
 
Scalar errorNorm (const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &x)
 Compute the error Norm.
 
void setRelativeTolerance (const Scalar relTol)
 
void setAbsoluteTolerance (const Scalar absTol)
 

Protected Attributes

Scalar relTol_
 
Scalar abssTol_
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > u_
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > uNext_
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > errorWeightVector_
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > scratchVector_
 

Detailed Description

template<class Scalar>
class Tempus::Stepper_ErrorNorm< Scalar >

Stepper_ErrorNorm provides error norm calcualtions for variable time stepping.

Definition at line 23 of file Tempus_Stepper_ErrorNorm_decl.hpp.

Constructor & Destructor Documentation

◆ Stepper_ErrorNorm() [1/2]

template<class Scalar >
Tempus::Stepper_ErrorNorm< Scalar >::Stepper_ErrorNorm

Default Constructor.

Definition at line 24 of file Tempus_Stepper_ErrorNorm_impl.hpp.

◆ Stepper_ErrorNorm() [2/2]

template<class Scalar >
Tempus::Stepper_ErrorNorm< Scalar >::Stepper_ErrorNorm ( const Scalar  relTol,
const Scalar  absTol 
)

Constructor.

Definition at line 28 of file Tempus_Stepper_ErrorNorm_impl.hpp.

◆ ~Stepper_ErrorNorm()

template<class Scalar >
Tempus::Stepper_ErrorNorm< Scalar >::~Stepper_ErrorNorm ( )
inline

Destructor.

Definition at line 34 of file Tempus_Stepper_ErrorNorm_decl.hpp.

Member Function Documentation

◆ computeWRMSNorm()

template<class Scalar >
Scalar Tempus::Stepper_ErrorNorm< 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.

The WRMS norm is

\[
  e_{wrms} \equiv \sqrt{ \frac{1}{N} \sum_{i=1}^N \left( \frac
     {u^n_i}{A_{tol} + \max (|u^n_i|, |u^{n+1}_i|) R_{tol}} \right) ^2 }
\]

where

  • $A_{tol}$ is the absolute tolerance,
  • $R_{tol}$ is the relative tolerance,
  • $\max$ is the pairwise maximum,
  • $u^n$ is the current solution, and
  • $u^{n+1}$ is the next solution.
  • $ u_i^n$ denotes component $i$ of time step $n$.
  • $ N$ denotes the number of unknowns

Definition at line 33 of file Tempus_Stepper_ErrorNorm_impl.hpp.

◆ errorNorm()

template<class Scalar >
Scalar Tempus::Stepper_ErrorNorm< Scalar >::errorNorm ( const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &  x)

Compute the error Norm.

The error norm is

\[
  e = \max_i ( u_i / ( A_{tol} + |u_i| R_{tol}))
\]

where $A_{tol}$ is the absolute tolerance, $R_{tol}$ is the relative tolerance, and $\max_i$ is the maximum over all elements in $x$.

Definition at line 69 of file Tempus_Stepper_ErrorNorm_impl.hpp.

◆ setRelativeTolerance()

template<class Scalar >
void Tempus::Stepper_ErrorNorm< Scalar >::setRelativeTolerance ( const Scalar  relTol)
inline

Definition at line 70 of file Tempus_Stepper_ErrorNorm_decl.hpp.

◆ setAbsoluteTolerance()

template<class Scalar >
void Tempus::Stepper_ErrorNorm< Scalar >::setAbsoluteTolerance ( const Scalar  absTol)
inline

Definition at line 71 of file Tempus_Stepper_ErrorNorm_decl.hpp.

Member Data Documentation

◆ relTol_

template<class Scalar >
Scalar Tempus::Stepper_ErrorNorm< Scalar >::relTol_
protected

Definition at line 76 of file Tempus_Stepper_ErrorNorm_decl.hpp.

◆ abssTol_

template<class Scalar >
Scalar Tempus::Stepper_ErrorNorm< Scalar >::abssTol_
protected

Definition at line 77 of file Tempus_Stepper_ErrorNorm_decl.hpp.

◆ u_

template<class Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::Stepper_ErrorNorm< Scalar >::u_
protected

Definition at line 78 of file Tempus_Stepper_ErrorNorm_decl.hpp.

◆ uNext_

template<class Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::Stepper_ErrorNorm< Scalar >::uNext_
protected

Definition at line 79 of file Tempus_Stepper_ErrorNorm_decl.hpp.

◆ errorWeightVector_

template<class Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::Stepper_ErrorNorm< Scalar >::errorWeightVector_
protected

Definition at line 80 of file Tempus_Stepper_ErrorNorm_decl.hpp.

◆ scratchVector_

template<class Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::Stepper_ErrorNorm< Scalar >::scratchVector_
protected

Definition at line 81 of file Tempus_Stepper_ErrorNorm_decl.hpp.


The documentation for this class was generated from the following files: