Omu_IntGRK4 Class Reference

#include <Omu_IntGRK4.h>

Inheritance diagram for Omu_IntGRK4:

Inheritance graph
base refererrect $classOmu__Integrator.html 7,7 121,34
[legend]
Collaboration diagram for Omu_IntGRK4:

Collaboration graph
base refererrect $classOmu__Integrator.html 445,655 560,681rect $classOmu__SVec.html 792,497 883,524rect $classOmu__StateVec.html 781,228 893,255rect $classOmu__Vec.html 401,95 481,121rect $classOmu__DependentVec.html 208,228 355,255rect $classOmu__VariableVec.html 479,228 607,255rect $classMesch_1_1VECP.html 389,7 493,33rect $classMesch_1_1MATP.html 897,95 1001,121rect $classOmu__DepVec.html 300,497 404,524rect $classOmu__Program.html 567,497 676,524
[legend]

List of all members.


Detailed Description

Integrator for (stiff) ordinary differential equations (ODEs).

The solver is employed internally to numerically integrate continuous-time model equations over sample periods and discrete-time stages. The linear-implicit RK method is derived from FORTRAN code ros4.f described by Hairer/Wanner.

Public Member Functions

 Omu_IntGRK4 ()
 constructor
 ~Omu_IntGRK4 ()
 destructor
char * name ()
 Name of a specific integrator.
virtual void init (int k, const Omu_StateVec &xc, const Omu_Vec &q, const Omu_DependentVec &Fc, bool sa)
 Initialize integrator, like adaptation of array dimensions and test of pre-conditions, like explicit ODE.
virtual void solve (int kk, double tstart, double tend, Omu_StateVec &xc, Omu_StateVec &dxc, Omu_Vec &q, Omu_DependentVec &Fc)
 Solve differential equations over one sample period.


Member Function Documentation

char* Omu_IntGRK4::name (  )  [inline, virtual]

Name of a specific integrator.

Implements Omu_Integrator.

virtual void Omu_IntGRK4::init ( int  k,
const Omu_StateVec xc,
const Omu_Vec q,
const Omu_DependentVec Fc,
bool  sa 
) [virtual]

Initialize integrator, like adaptation of array dimensions and test of pre-conditions, like explicit ODE.

An explicit ODE is present if Fc.Jdx.is_scalar() and Fc.Jdx[0][0] != 0.0. An algebraic state j, 0<=j<_n can be identified with Fc.Jdx.is_zero_column[j]. Note that the init method should not find consistent initial conditions of a DAE as parameters may jump between sample periods kk afterwards.

Parameters:
k stage
xc continuous-time states, dim(xc)=_n
q sensitivity parameters, dim(q)=_nq
Fc pre-initialized data structures for evaluating residuals, dim(Fc)=_n, including structurally analyzed Jacobians, dim(Fc.Jx)=_n._n, dim(Fc.Jxp)=_n._n, dim(Fc.Jq)=_n._nq
sa indicates if sensitivity analysis is required

Reimplemented from Omu_Integrator.

virtual void Omu_IntGRK4::solve ( int  kk,
double  tstart,
double  tend,
Omu_StateVec xc,
Omu_StateVec dxc,
Omu_Vec q,
Omu_DependentVec Fc 
) [virtual]

Solve differential equations over one sample period.

Additionally solve sensitivity equations if _sa is true. The default implementation calls the depreciated solve method.

Parameters:
kk sample period
tstart start time for integration
tend end time for integration
xc continuous-time states at tstart, dim(xc)=_n; sensitivities xc.Sq at tstart, dim(xc.Sq)=_n._nq, if _sa is true
dxc pre-allocated time derivatives of continuous-time states, dim(dxc)=_n
q sensitivity parameters, dim(q)=_nq
Fc pre-allocated argument for residual calls, dim(Fc)=_n, including structurally analyzed Jacobians Fc.Jx, Fc.Jdx, Fc.Jq
Return values:
xc continuous-time states at tend; sensitivities xc.Sq at tend if _sa is true
Exceptions:
E_CONV indicate that the integrator failed to converge; may be caught during optimization step length test

Reimplemented from Omu_Integrator.


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

HQP is hosted at SourceForge. Documentation generated on Sat Nov 8 14:21:33 2008 using doxygen.