Rythmos::ExplicitTaylorPolynomialStepper< Scalar > Class Template Reference

Implementation of Rythmos::Stepper for explicit Taylor polynomial time integration of ODEs. More...

#include <Rythmos_ExplicitTaylorPolynomialStepper.hpp>

Inheritance diagram for Rythmos::ExplicitTaylorPolynomialStepper< Scalar >:
[legend]

List of all members.

Public Types

typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
ScalarMag
 Typename of magnitude of scalars.

Public Member Functions

 ExplicitTaylorPolynomialStepper ()
 Constructor.
 ~ExplicitTaylorPolynomialStepper ()
 Destructor.
RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_x_space () const
 Return the space for x and x_dot.
void setModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model)
 Set model.
Teuchos::RCP< const
Thyra::ModelEvaluator< Scalar > > 
getModel () const
 
Scalar takeStep (Scalar dt, StepSizeType flag)
 Take a time step of magnitude dt.
const StepStatus< Scalar > getStepStatus () const
 
void setParameterList (Teuchos::RCP< Teuchos::ParameterList > const &paramList)
 Redefined from Teuchos::ParameterListAcceptor.
Teuchos::RCP
< Teuchos::ParameterList
getNonconstParameterList ()
 
Teuchos::RCP
< Teuchos::ParameterList
unsetParameterList ()
 
std::string description () const
 
std::ostream & describe (std::ostream &out, const Teuchos::EVerbosityLevel verbLevel, const std::string leadingIndent, const std::string indentSpacer) const
 
void addPoints (const Array< Scalar > &time_vec, const Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x_vec, const Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &xdot_vec)
void getPoints (const Array< Scalar > &time_vec, Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > *x_vec, Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > *xdot_vec, Array< ScalarMag > *accuracy_vec) const
 Get values from buffer.
void setRange (const TimeRange< Scalar > &range, const InterpolationBufferBase< Scalar > &IB)
 Fill data in from another interpolation buffer.
TimeRange< Scalar > getTimeRange () const
 
void getNodes (Array< Scalar > *time_vec) const
 Get interpolation nodes.
void removeNodes (Array< Scalar > &time_vec)
 Remove interpolation nodes.
int getOrder () const
 Get order of interpolation.

Detailed Description

template<class Scalar>
class Rythmos::ExplicitTaylorPolynomialStepper< Scalar >

Implementation of Rythmos::Stepper for explicit Taylor polynomial time integration of ODEs.

Let

\[ \frac{dx}{dt} = f(x,t), \quad x(t_0) = a \]

be an ODE initial-value problem. This class implements a single time step of an explicit Taylor polynomial time integration method for computing numerical solutions to the IVP. The method consists of computing a local truncated Taylor series solution to the ODE (section Computing the Taylor Polynomial), estimating a step size within the radius of convergence of the Taylor series (section Computing a Step Size) and then summing the polynomial at that step to compute the next point in the numerical integration (section Summing the Polynomial). The algorithmic parameters to the method are controlled through the params argument to the constructor which are described in section Parameters.

Computing the Taylor Polynomial

Let

\[ x(t) = \sum_{k=0}^\infty x_k (t-t_0)^k \]

be a power series solution to the IVP above. Then $f(x(t))$ can be expaned in a power series along the solution curve $x(t)$:

\[ f(x(t),t) = \sum_{k=0}^\infty f_k (t-t_0)^k \]

where

\[ f_k = \left.\frac{1}{k!}\frac{d^k}{dt^k} f(x(t),t)\right|_{t=t_0}. \]

By differentiating the power series for $x(t)$ to compute a power series for $dx/dt$ and then comparing coefficients in the equation $dx/dt=f(x(t),t)$ we find the following recurrence relationship for the Taylor coefficients $\{x_k\}$:

\[ x_{k+1} = \frac{1}{k+1} f_k, \quad k=0,1,\dots \]

where each coefficient $f_k$ is a function only of $x_0,\dots,x_k$ and can be efficiently computed using the Taylor polynomial mode of automatic differentation. This allows the Taylor coefficients to be iteratively computed starting with the initial point $x_0$ up to some fixed degree $d$ to yield a local truncated Taylor polynomial approximating the solution to the IVP.

Computing a Step Size

With the truncated Taylor polynomial solution $\tilde{x}(t) = \sum_{k=0}^d x_k (t-t_0)^k$ in hand, a step size is chosen by estimating the truncation error in the polynomial solution and forcing this error to be less than some prescribed tolerance. Let

\[ \rho = \max_{d/2\leq k\leq d} (1+\|x_k\|_\infty)^{1/k} \]

so $\|x_k\|_\infty\leq\rho^k$ for $d/2\leq k \leq d$. Assume $\|x_k\|\leq\rho^k$ for $k>d$ as well, then for any $h<1/\rho$ it can be shown that the truncation error is bounded by

\[ \frac{(\rho h)^{d+1}}{1-\rho h}. \]

A step size $h$ is then given by

\[ h = \exp\left(\frac{1}{d+1}\log\varepsilon-\log\rho\right) \]

for some error tolerance $\varepsilon$ given an error of approximatly $\varepsilon$.

Summing the Polynomial

With a step size $h$ computed,

\[ x^\ast = \sum_{k=0}^d x_k h^k \]

is used as the next integration point where a new Taylor series is calculated. Local error per step can also be controlled by computing $\|dx^\ast/dt - f(x^\ast)\|_\infty$. If this error is too large, the step size can be reduced to an appropriate size.

Parameters

This method recognizes the following algorithmic parameters that can be set in the params argument to the constructor:

Definition at line 160 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.


Member Typedef Documentation

template<class Scalar>
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::ScalarMag

Typename of magnitude of scalars.

Reimplemented from Rythmos::InterpolationBufferBase< Scalar >.

Definition at line 165 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.


Constructor & Destructor Documentation

template<class Scalar >
Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::ExplicitTaylorPolynomialStepper (  )  [inline]

Constructor.

Definition at line 320 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar >
Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::~ExplicitTaylorPolynomialStepper (  )  [inline]

Destructor.

Definition at line 325 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.


Member Function Documentation

template<class Scalar >
RCP< const Thyra::VectorSpaceBase< Scalar > > Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::get_x_space (  )  const [inline, virtual]

Return the space for x and x_dot.

Implements Rythmos::InterpolationBufferBase< Scalar >.

Definition at line 657 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar>
void Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::setModel ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  model  )  [inline, virtual]

Set model.

Implements Rythmos::StepperBase< Scalar >.

Definition at line 330 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::getModel (  )  const [inline, virtual]
template<class Scalar>
Scalar Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::takeStep ( Scalar  dt,
StepSizeType  flag 
) [inline, virtual]

Take a time step of magnitude dt.

Implements Rythmos::StepperBase< Scalar >.

Definition at line 352 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar >
const StepStatus< Scalar > Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::getStepStatus (  )  const [inline, virtual]
template<class Scalar >
void Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::setParameterList ( Teuchos::RCP< Teuchos::ParameterList > const &  paramList  )  [inline, virtual]
template<class Scalar >
Teuchos::RCP< Teuchos::ParameterList > Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::getNonconstParameterList (  )  [inline, virtual]
template<class Scalar >
Teuchos::RCP< Teuchos::ParameterList > Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::unsetParameterList (  )  [inline, virtual]
template<class Scalar >
std::string Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::description (  )  const [inline, virtual]

Reimplemented from Teuchos::Describable.

Definition at line 522 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar >
std::ostream & Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::describe ( std::ostream &  out,
const Teuchos::EVerbosityLevel  verbLevel,
const std::string  leadingIndent,
const std::string  indentSpacer 
) const [inline]

Definition at line 529 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar>
void Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::addPoints ( const Array< Scalar > &  time_vec,
const Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &  x_vec,
const Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &  xdot_vec 
) [inline, virtual]

Redefined from InterpolationBufferBase Add points to buffer

Implements Rythmos::InterpolationBufferBase< Scalar >.

Definition at line 564 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar>
void Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::getPoints ( const Array< Scalar > &  time_vec,
Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > *  x_vec,
Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > *  xdot_vec,
Array< ScalarMag > *  accuracy_vec 
) const [inline, virtual]

Get values from buffer.

Implements Rythmos::InterpolationBufferBase< Scalar >.

Definition at line 574 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar>
void Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::setRange ( const TimeRange< Scalar > &  range,
const InterpolationBufferBase< Scalar > &  IB 
)

Fill data in from another interpolation buffer.

template<class Scalar >
TimeRange< Scalar > Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::getTimeRange (  )  const [inline, virtual]
template<class Scalar>
void Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::getNodes ( Array< Scalar > *  time_vec  )  const [inline, virtual]

Get interpolation nodes.

Implements Rythmos::InterpolationBufferBase< Scalar >.

Definition at line 590 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar>
void Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::removeNodes ( Array< Scalar > &  time_vec  )  [inline, virtual]

Remove interpolation nodes.

Implements Rythmos::InterpolationBufferBase< Scalar >.

Definition at line 596 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.

template<class Scalar >
int Rythmos::ExplicitTaylorPolynomialStepper< Scalar >::getOrder (  )  const [inline, virtual]

Get order of interpolation.

Implements Rythmos::InterpolationBufferBase< Scalar >.

Definition at line 603 of file Rythmos_ExplicitTaylorPolynomialStepper.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends

Generated on Tue Oct 20 10:24:09 2009 for Rythmos - Transient Integration for Differential Equations by  doxygen 1.6.1