Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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. More...
 
 Stepper_ErrorNorm (const Scalar relTol, const Scalar absTol)
 Constructor. More...
 
 ~Stepper_ErrorNorm ()
 Destructor. More...
 
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. More...
 
Scalar errorNorm (const Teuchos::RCP< const Thyra::VectorBase< Scalar >> &x)
 Compute the error Norm. More...
 
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 24 of file Tempus_Stepper_ErrorNorm_decl.hpp.

Constructor & Destructor Documentation

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

Default Constructor.

Definition at line 23 of file Tempus_Stepper_ErrorNorm_impl.hpp.

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

Constructor.

Definition at line 29 of file Tempus_Stepper_ErrorNorm_impl.hpp.

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

Destructor.

Definition at line 33 of file Tempus_Stepper_ErrorNorm_decl.hpp.

Member Function Documentation

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 36 of file Tempus_Stepper_ErrorNorm_impl.hpp.

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 72 of file Tempus_Stepper_ErrorNorm_impl.hpp.

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

Definition at line 69 of file Tempus_Stepper_ErrorNorm_decl.hpp.

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

Definition at line 70 of file Tempus_Stepper_ErrorNorm_decl.hpp.

Member Data Documentation

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

Definition at line 73 of file Tempus_Stepper_ErrorNorm_decl.hpp.

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

Definition at line 74 of file Tempus_Stepper_ErrorNorm_decl.hpp.

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

Definition at line 75 of file Tempus_Stepper_ErrorNorm_decl.hpp.

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

Definition at line 76 of file Tempus_Stepper_ErrorNorm_decl.hpp.

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

Definition at line 77 of file Tempus_Stepper_ErrorNorm_decl.hpp.

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

Definition at line 78 of file Tempus_Stepper_ErrorNorm_decl.hpp.


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