Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces
SinCosModel_decl.hpp File Reference
#include "Thyra_ModelEvaluator.hpp"
#include "Thyra_StateFuncModelEvaluatorBase.hpp"
#include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
#include "Teuchos_ParameterList.hpp"

Go to the source code of this file.


class  Tempus_Test::SinCosModel< Scalar >
 Sine-Cosine model problem from Rythmos. This is a canonical Sine-Cosine differential equation

\[ \mathbf{\ddot{x}}=-\mathbf{x} \]

with a few enhancements. We start with the exact solution to the differential equation

\begin{eqnarray*} x_{0}(t) & = & a+b*\sin((f/L)*t+\phi)\\ x_{1}(t) & = & b*(f/L)*\cos((f/L)*t+\phi) \end{eqnarray*}

then the form of the model is

\begin{eqnarray*} \frac{d}{dt}x_{0}(t) & = & x_{1}(t)\\ \frac{d}{dt}x_{1}(t) & = & \left(\frac{f}{L}\right)^{2}(a-x_{0}(t)) \end{eqnarray*}

where the default parameter values are $a=0$, $f=1$, and $L=1$, and the initial conditions

\begin{eqnarray*} x_{0}(t_{0}=0) & = & \gamma_{0}[=0]\\ x_{1}(t_{0}=0) & = & \gamma_{1}[=1] \end{eqnarray*}

determine the remaining coefficients

\begin{eqnarray*} \phi & = & \arctan(((f/L)/\gamma_{1})*(\gamma_{0}-a))-(f/L)*t_{0}[=0]\\ b & = & \gamma_{1}/((f/L)*cos((f/L)*t_{0}+\phi))[=1] \end{eqnarray*}

. More...

class  Tempus_Test::SinCosModelAdjoint< Scalar >
 Non-member constructor. More...