Что такое SimPack?

Это библиотека С-функций, предназначенная для разнообразных вычислений, связанных с исследованием решений детерминированных динамических систем. Использование этих функций позволяет легко и быстро писать программы, осуществляющие численное интегрирование системы дифференциальных уравнений, строить таблицы решений, находить точки сечения Пуанкаре, вычислять спектр ляпуновских характеристических показателей, локализовать периодические решения и вычислять их мультипликаторы и т.д.

Текст SimPack написан программистами Датского технического университета.
/******************************************************
* SimPack ver. 3.0.                                   *
* First release December 15 1989                      *
* Latest revision 24 September 1992                   *
*                                                     *
* Carsten Knudsen, Rasmus Feldberg, and               *
* Jesper Skovhus Thomsen                              *
* System Dynamics Group                               *
* Physics Laboratory III                              *
* The Technical University of Denmark                 *
* DK-2800 Lyngby, Denmark                             *
******************************************************/
Как использовать SimPack?

В заголовке файла нужно указать использование файла описаний для SimPack с соответствующим путем. Например,

#include "sp.h"

если этот файл лежит у вас в текущей директории.

На стадии компиллирования необходимо подключить обьектный файл sp.o Пример строки компилляции:

gcc -o my_program my_program.c sp.o -lm

В самой программе SimPack необходимо инициализировать специальной функцией и задать необходимые параметры, в том числе имя функции с правыми частями системы уравнений динамической системы и имя функции, задающей сечение Пуанкаре.
Ниже помещен пример программы с комментариями, где относящиеся к SimPack строки выделены цветом:
#include 
#include 
#include 
#include "sp.h"

 FILE *output;

double par[NO_PAR];  			    // это массив параметров
void derivs(double ,double [],double []); // это функция с правыми частями
double cut_derivs(double , double []);   // здесь условия для сечения Пуанкаре 


//  Здесь подключается файл с уравнениями иссл. системы,
// он содержит функции derivs и cut_derivs

#include "system.c"


//************** начало главной программы *************
int main(int sw){

int i, j, jk, k;

// определяем различные переменные, которые будут использованы при обращении 
// к функциям SimPack

 long int gsr_before=1, 
               gsr_clc=2500;

 double t=1.0,
          tmax,
             *y,
             *dydt,
                 eps,
                   step_size,
                         *expon;
// определение указателя на библиотеку

       SimPack *sp;


// Таким образом отводится память под массивы SimPack-а
// SYS_DIM - размерность исследуемой системы (число переменных состояния)


// массив фазовых переменных 
      y = (double *)calloc(SYS_DIM,sizeof(double));
  
// массив производных (правых частей)

      dydt  = (double *)calloc(SYS_DIM,sizeof(double));

// массив под вычисление ляпуновских экспонент

      expon = (double *)calloc (SYS_DIM,sizeof(double));


// Можно было и просто описать эти массивы, не обязательно 
// явно выделять под них память



/***** Инициализация самого пакета и функции сечения Пуанкаре */

// model - имя функции с правыми частями, PREC -  точность, 
// 0.01 - начальный шаг интегрирования (Подробней)
 
  sp = SPOpenSimPack(model, SYS_DIM, PREC,.001 );


// Задание сечения Пуанкаре, PEPS - точность его вычисления 
//(Подробней)
  
SPSetCut(sp, cutfun,PEPS);



/** Интегрировать в течение времени установления PTRANSI **/
// Начальные и конечные значения переменных состояния - в y
//(Подробней)

  SPIntegrate(sp,&t,t+PTRANSI,y);

/**  Интегрирование на интервал t=0.1**/
      SPIntegrate(sp,&t,t+.1,y);


/** освобождение памяти и закрытие SimPack **/
  free(y); free(dydt); free(expon);
    SPCloseSimPack(sp);
}


Какими фунциями SimPack можно воспользоваться?

Ниже приведен список основных функций SimPack из файла sp.h
1) Инициализация

SPOpenSimPack 
SPVarOpenSimPack

2) Закрытие 

SPCloseSimPack
SPVarCloseSimPack

3) Задание параметров работы

SPSetMaxStep
SPSetMaxPoincareSteps
SPSetRelTol
SPSetAbsTol
SPSetNewtTol
SPSetMaxPeriodSteps
SPSetMaxNewtSteps
SPErrorSimPack
SPOrder


4) Интегрирование

SPIntegrate
SPStep
SPInterpolate
SPftablef
SPftableg
SPftablea
   
5) Задание сечения Пуанкаре
   
SPSetCut
SPAutoCut
SPSetAutoCut


6) Вычисление сечения Пуанкаре

SPPoincareStep
SPCutSurface


7) Вычисление ляпуновских показателей

SPLyapCalc
SPLyapCalcFile

8) Нахождение периодической орбиты, вычисление якобиана,
расчет мультипликаторов и пр.

SPNonAutoCont
SPAutoCont
SPEquiCont
SPAutoOrbit
SPNonAutoOrbit
SPEquiPoint
SPEigen
SPEigenVector
SPNumJac
SPNumParamJac
SPNumCutJac
SPLinZero
SimPackBif 



SimPack *SPOpenSimPack(void (*fcn)(double t, double *y, double *f), int order, double RelTol, double h); /*------------------------------------------------------------ | Open and initialize SimPack. | NOTE Allocates space for SimPack structure. This memory | can be free'ed again by calling SPCloseSimPack. |------------------------------------------------------------- | Input: | fcn Right hand side of ODE to be solved | order Number of state variables | RelTol Maximal relative error | h Initial time step estimate | Return: | A pointer to a SimPack structure to be used | in all function involving SimPack. | Example: | sp = SPOpenSimPack( fcn, 3, 1E-8, 0.1 ); -------------------------------------------------------------*/ int SPCloseSimPack( SimPack *sp ); /************************************************************** * Close SimPack (gracefully) freeing memory used by SimPack * and VarSimPack. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * Return: * SP_OK SimPack succesfully closed. * SP_NOT_OK Error. * Example: * result = SPCloseSimPack( sp ); **************************************************************/ int SPIntegrate(SimPack *sp,double *t0, double t1, double *y); /************************************************************** * Integration of the function fcn using a 5-6. order Runge-Kutta * pair with variable time step and error control. *------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * t0 Pointer to the current time * t1 Time at witch the solution is desired * y Initial condition * Output: * t0 Time at which solution is generated (t1) * y Solution at time t1 (y(t1)) * Example: * SPIntegrate( sp, &t, t+dt, y ); **************************************************************/ int SPStep(SimPack *sp,double *t0, double *y); /************************************************************** * Integrates one timestep. *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * t0 Pointer to current time * y Initial condition * Output: * t0 Time at which solution is generated * y Solution at time t0 (y(t0)) * Example: * SPStep( sp, &t, y ); **************************************************************/ int SPSetMaxStep( SimPack *sp, double hmax ); /************************************************************** * Sets the maximum timestep for step integration (step) *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure. * hmax Maximum stepsize. 0 = no limit. * Return: * SP_OK Succes. * SP_NOT_OK Error. * Example: * result = SPSetMaxStep( sp, 0.01 ); **************************************************************/ int SPSetMaxPoincareSteps( SimPack *sp, int n ); /************************************************************** * Set maximum number of iteration to find root in poincare_step * Default: 100 steps. *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure. * n Maximum number of iterations. * Return: * SP_OK Succes. * SP_NOT_OK Error. * Example: * result = SPSetMaxPoincareSteps( sp, 200 ); **************************************************************/ int SPSetRelTol( SimPack *sp, double RelTol ); /************************************************************** * Set relative tolerance for integration with SPIntegrate *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * RelTol maximum relativ error allowed * Return: * SP_OK Succes. * SP_NOT_OK Error. * Example: * result = SPSetRelTol( sp, 1E-6 ); **************************************************************/ int SPSetAbsTol( SimPack *sp, double AbsTol ); /************************************************************** * Set absolute tolerance for integration with SPIntegrate. * Default is abstol=0. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * AbsTol maximum absolute error allowed * Return: * SP_OK Succes. * SP_NOT_OK Error. * Example: * result = SPSetAbsTol( sp, 1E-2 ); **************************************************************/ int SPInterpolate( SimPack *sp, double t, double *y ); int SPVarInterpolate( SimPack *gsp, double t, double *y, double **Phi ); /************************************************************** * Interpolates y at time t, returns the interpolant in y *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure. * t Time at which the solution is desired. * y Initial condition. * Output: * y Solution at time t (y(t)) * Return: * SP_OK If the requested time is within the limits of the * last integration step. * SP_NOT_OK Error! **************************************************************/ int SPSetNewtTol( SimPack *sp, double NewtRelTol ); /************************************************************** * Set relative tolerance for newton iteration *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure. * NewtRelTol Maximum relative error allowed. * Return: * SP_OK Succes. * SP_NOT_OK Error. **************************************************************/ int SPSetMaxPeriodSteps( SimPack *sp, int n ); /************************************************************** * Set maximum number of steps (per period) in search for * periodic orbits. *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure. * n Maximum number of steps. * Return: * SP_OK Succes. * SP_NOT_OK Error. **************************************************************/ int SPSetMaxNewtSteps( SimPack *sp, int n ); /************************************************************** * Set maximum number of newton iterations *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure. * n Maximum number of iterations. * Return: * SP_OK Succes. * SP_NOT_OK Error. **************************************************************/ int SPftablef( SimPack *sp, char *filename, char *format, double *t, double t1, long int n, double *y ); /************************************************************** * Makes a tabel of solution y in the specified file. * NB! opens and resets the file (compare with ftablea). *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * filename Name of output file in which the table is put * format Format of output (see example) * t Pointer to initial time * t1 Requested end time * n Number of data sets to output * y Initial condition * Output: * t Pointer to end time (t=t1) * y Solution at time t1 (y(t1)) * Example: * SPftablef( sp, "test.dat", "4067", &t, t+10, 30, y ) * The file "test.dat" will contain 30 rows of data with the * time in the first row with 4 digits, y[1] in the 2. row * with 6 digits, y[2] in the 3. row with 7 digits. * NOTE y[0] is not in the outputed in this example * because of the "0" in the format "4067" **************************************************************/ int SPftableg( SimPack *sp, double *t, double t1, long int n, double *y, void (*g)(double t, double *y)); /************************************************************** * Call the function g n times in the time interval [t,t1] * This could be used to output graphics, where the graphics * handling is taken care of in g(t,y). *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * t Pointer to initial time. * t1 Requested end time. * n Number of times g should be called. * y Initial condition. * g Pointer to a C function to handle t and y. * Output: * t Pointer to end time (t=t1). * y Solution at time t1 (y(t1)). **************************************************************/ int SPftablea( SimPack *sp, FILE *file, char *format, double *t, double t1, long int n, double *y ); /************************************************************** * Makes an tabel of solution y in the specifyed file. * NB! appends so the file MUST be opened before * use of ftablea (compare with ftablef). *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * file Name of output file in which the table is put * format Format of output (see example in ftablef) * t Pointer to initial time * t1 Requested end time * n Number of data sets to output * y Initial condition * Output: * t Pointer to end time (t=t1). * y Solution at time t1 (y(t1)). **************************************************************/ int SPPoincareStep(SimPack *sp,double *t, double *y); int SPVarPoincareStep(SimPack *sp,double *t, double *y,double **Phi); /************************************************************** * *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * t pointer to initial time. * y initial condition. * fcn right hand side of y'=fcn(t,y). * cutfcn function defining the cut-surface. * eps maximum error in finding the intersection. * Output: * t time at which the intersection takes place * y the solution at the intersection. * Return: * 1 a intersection has taken place. * 0 no intersection was detected. **************************************************************/ int SPCutSurface(SimPack *sp,double *state, double *normal); /************************************************************** * *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * Output: * state Pointer to a point at the surface * normal Pointer to a normal-vector to the surface * Return: * 1 Succes. * 0 A cutsurface was not defined prior to invocation. * Remarks: * Only valid if a cutsurface has been defined with * SPSetAutoCut! **************************************************************/ int SPSetCut(SimPack *sp,double (*cutfcn)(double t,double *y), double eps); /************************************************************** * *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * cutfcn Function which returns some distance between * y and the surface. * eps Acceptable distance from the cutsurface. * Output: * * Return: * 1 Succes. * 0 If eps<=0.0. **************************************************************/ double SPAutoCut(SimPack *sp,double t, double *y); /************************************************************** * *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * Output: * * Return: * The distance between y and the cutsurface defined with * SPSetAutoCut. * Remarks: * Only valid if a cutsurface has been defined with * SPSetAutoCut! **************************************************************/ int SPSetAutoCut(SimPack *sp,double t, double *y); /************************************************************** * *-------------------------------------------------------------- * Input: * sp Pointer to SimPack structure * y A point on the surface to define * Output: * * Return: * 1 A cutsurface has been succesfully defined. * 0 A cutsuface was already defined. **************************************************************/ int SPErrorSimPack(SimPack *sp); char *SPStrErrorSimPack(SimPack *sp); /************************************************************** * Returns the latest non fatal error that had occured * The Str version returns a pointer to a string contaning * the error message. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * Return: * errorcode. * (str) pointer to errormessage **************************************************************/ int SPLyapCalc(SimPack *sp,double *t, double *y, double eps, double lyap_dt, long int trans_steps, long int lyap_steps, double *exponents, int nn); /************************************************************** * Calculates the nn largest lyapunov exponents in bits/units. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * t pointer to initial time. * y initial state. * eps size of pertubation. * lyap_dt size of the steps between each GSR * trans_steps number of GSR 'before' Lyapunov calculation. * lyap_steps number of GSR under Lyapunov calculation. * fcn right hand side of y'=f(t,y). * exponents pointer to an array to contain the exponents. * nn number of Lyapunov exponents to calculate. * Output: * t pointer to end time. * y end state. * exponents the nn largest Lyapunov exponents. **************************************************************/ int SPLyapCalcFile(SimPack *sp,char *filename, double *t, double *y, double eps, double lyap_dt, long int trans_steps, long int lyap_steps, double *exponents, int nn, int samp); /************************************************************** * Calculation of the nn largest Lyapunov exponents with * output of the estimate under the calculation to file. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * filename name of file to place Lyapunov estimate. * t pointer to initial time. * y initial state. * eps size of pertubation. * lyap_dt size of the steps between each GSR * trans_steps number of GSR 'before' Lyapunov calculation. * lyap_steps number of GSR under Lyapunov calculation. * fcn right hand side of y'=f(t,y). * exponents pointer to an array to contain the exponents. * nn number of Lyapunov exponents to calculate. * samp number of lyap_step between each time the * Lyapunov estimate are written to the file. * Output: * t pointer to end time. * y end state. * exponents the nn largest Lyapunov exponents. **************************************************************/ int SPOrder(SimPack *sp); /************************************************************** * Return the order of the considered dynamical system. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * Return: * number of state variables (the order) of the system. **************************************************************/ int SPNonAutoCont(SimPack *sp,double t,double *y,double T, double *c,double *dc,int nrbif,int mode, ...); /*------------------------------------------------------------ | One dimensional non autonomus continuation |------------------------------------------------------------- | Input: | sp pointer to SimPack structure | t time | y initial state | T desired period time of solution | c pointer to parameter to be varied | dc initial (also max) step to be taken | nrbif number of bifurcations to be located if nonzero | if zero continue until maxnumber of steps has | been reached | mode mode to select output (see below) | ... if mode is nonzero the "next arguments" | must indicate where to put the output | NOTE the order of the arguments are crucial | NOTE: legal values for mode are: | modes "next argument" | SP_STATE_OUTPUT a file pointer | SP_PATH_OUTPUT a file pointer | SP_USER_OUTPUT a function pointer of type output_t | Example: | SPNonAutoCont(sp,t,y,T,&c,&dc,1,SP_STATE_OUTPUT | SP_PATH_OUTPUT, | stdout, pathfile); -------------------------------------------------------------*/ int SPAutoCont(SimPack *sp,double t,double *y,int p,double *T, double *c,double *dc,int nrbif,int mode, ...); /*------------------------------------------------------------ | One dimensional autonomus continuation. | Uses the Poincare surface set by SPSetCut to determine | the period of the orbit |------------------------------------------------------------- | Input: | sp pointer to SimPack structure | t time | y initial state | p desired number of Poincare intersections | =the desired period of orbit | c pointer to parameter to be varied | dc initial (also max) step to be taken | nrbif number of bifurcations to be located if nonzero | if zero continue until maxnumber of steps has | been reached | mode mode to select output (see below) | ... if mode is nonzero the "next arguments" | must indicate where to put the output | NOTE the order of the arguments are crucial | Output: | T pointer to actual periodtime of solution | NOTE: legal values for mode are: | modes "next argument" | SP_STATE_OUTPUT a file pointer | SP_PATH_OUTPUT a file pointer | SP_USER_OUTPUT a function pointer of type output_t | Example: | SPAutoCont(sp,t,y,1,&T,&c,&dc,1,SP_STATE_OUTPUT | SP_PATH_OUTPUT, | stdout, pathfile); -------------------------------------------------------------*/ int SPEquiCont(SimPack *sp,double *y, double *c,double *dc,int nrbif,int mode, ...); /*------------------------------------------------------------ | One dimensional autonomus continuation for equilibrium points. |------------------------------------------------------------- | Input: | sp pointer to SimPack structure | y initial state | c pointer to parameter to be varied | dc initial (also max) step to be taken | nrbif number of bifurcations to be located if nonzero | if zero continue until maxnumber of steps has | been reached | mode mode to select output (see below) | ... if mode is nonzero the "next arguments" | must indicate where to put the output | NOTE the order of the arguments are crucial | Output: | T pointer to actual periodtime of solution | NOTE: legal values for mode are: | modes "next argument" | SP_STATE_OUTPUT a file pointer | SP_PATH_OUTPUT a file pointer | SP_USER_OUTPUT a function pointer of type output_t | Example: | SPEquiCont(sp,t,y,&c,&dc,1,SP_STATE_OUTPUT | SP_PATH_OUTPUT, | stdout, pathfile); -------------------------------------------------------------*/ int SPNonAuto2DCont(SimPack *sp, double *c1,double *c2,double *dc,int mode, ...); int SPAuto2DCont(SimPack *sp, double *c1,double *c2,double *dc,int mode, ...); int SPEqui2DCont(SimPack *sp, double *c1,double *c2,double *dc,int mode, ...); int SPLocateBif(SimPack *sp, SimPackBif *spb, double *c,int mode,FILE *state); int SPLocateEquiBif(SimPack *sp, SimPackBif *spb, double *c,FILE *state); int SPCheckBif(SimPack *sp, SimPackBif *spb, double *c,double thedc,int mode, FILE *state); int SPCheckEquiBif(SimPack *sp,SimPackBif *spb, double *c,double thedc,FILE *state); int SPAutoOrbit(SimPack *sp, double t,double *y,double **Phi,int p,double *T); /************************************************************** * Find a p-periodic orbit for autonomus systems. * SPSetCut should be used to define the Poincare surface in * a way, that the orbit intersects the surface 2*p times * (p times in each direction). * NOTE, SPVarOpenSimPack should be called before SPAutoOrbit. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * t pointer to initial time * y pointer to initial state guess * p period of orbit * Return: * y pointer to state on orbit * t pointer to corresponding time * Phi variational matrix for the orbit * T period time of orbit (may not be minimum period !) **************************************************************/ int SPNonAutoOrbit(SimPack *sp,double t,double *y,double **Phi,double T); /************************************************************** * Find a periodic orbit with period time T for non-autonomus * systems. * NOTE, SPVarOpenSimPack should be called before SPAutoOrbit. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * t initial time * y pointer to initial state guess * T period time of orbit * Return: * y pointer to state on orbit * Phi variational matrix for the orbit **************************************************************/ int SPEquiPoint(SimPack *sp,double *y); /************************************************************** * Find a equilibrium point for autonomus * systems. * NOTE, SPVarOpenSimPack should be called before SPEquiPoint. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * t initial time * y pointer to initial state guess * Return: * y pointer to equilibrium state **************************************************************/ int SPEigen(SimPack *sp,int n,double **A,double *er,double *ei); /************************************************************** * Find eigenvalues of the n x n matrix A. * NOTE A is NOT preserved. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * n size of matrix * A n x n matrix * Return: * A (A is corrupted by the search for eigenvalues) * er pointer to real part of eigenvalues * ei pointer to imaginary part of eigenvalues **************************************************************/ int SPEigenVector(SimPack *sp,int n, double **A,double r,double *ev,double *ws); /************************************************************** * Find eigenvector for real eigenvalue r of the n x n matrix A. * NOTE A is NOT preserved. *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * n size of matrix * A n x n matrix * r eigenvalue * Return: * A (A is corrupted by the calculation) * ev pointer to real eigenvector **************************************************************/ int SPNumJac(SimPack *sp,double t,double *y,double **j); /************************************************************** * Calculates Jacobian estimate numerically by pertubation * NOTE SPVarOpenSimPack should be called before SPNumJac. * NOTE pertubation size is sp->jaceps *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * t time * y pointer to state * Return: * j double pointer to resulting jacobian matrix **************************************************************/ int SPNumParamJac(SimPack *sp,double t,double *y,double **j); /************************************************************** * Calculates Jacobian estimate numerically by pertubation * NOTE SPVarOpenSimPack should be called before SPNumJac. * NOTE pertubation size is sp->jaceps *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * t time * y pointer to state * Return: * j double pointer to resulting parameter-jacobian matrix **************************************************************/ int SPNumCutJac(SimPack *sp, double t,double *y,double *c1,double *c2,double *j); int SPLinZero(SimPack *sp,int n,double **A,double *b,double *work); /************************************************************** * Solves the linear equation system A*x = b, where A is n x n. * NOTE A is NOT preserved. * Workspace with size at least n*(sizeof(double)+sizeof(int)) * must be provided by the user *-------------------------------------------------------------- * Input: * sp pointer to SimPack structure * n size of matrix * A n x n matrix * b right hand side vector * work workspace * Return: * A (A is corrupted by the process) * b solution (x) **************************************************************/ SimPackBif *SPCreateBif(SimPack *sp); int SPDestroyBif(SimPack *sp,SimPackBif *spb); int SPVarIntegrate(SimPack *sp,double *t0, double t1, double *y,double **Phi); int SPVarStep(SimPack *sp,double *t0, double *y,double **Phi); /*************************************************************/ int openSimPack(int order, double tol, double h); int closeSimPack(); int integrate(double *t0, double t1, double *y, void (*fcn)(double t, double *y, double *f)); int step(double *t0, double *y, void (*fcn)(double t, double *y, double *f)); int set_max_step(double hmax); int set_max_poincare_steps(int n); int set_tol(double tol); int set_abs_tol(double abstol); int interpolate(double t, double *y, void (*fcn)(double t, double *y, double *f)); int ftablef(char *filename, char *format, double *t, double t1, long int n, double *y, void (*fcn)(double t, double *y, double *f)); int ftableg(double *t, double t1, long int n, double *y, void (*fcn)(double t, double *y, double *f), void (*g)(double t, double *y)); int ftablea(FILE *file, char *format, double *t, double t1, long int n, double *y, void (*fcn)(double t, double *y, double *f)); int poincare_step(double *t, double *y, void (*fcn)(double t, double *y,double *f), double (*cutfcn)(double t,double *y), double eps); int cut_surface(double *state, double *normal); double auto_cut(double t, double *y); int set_auto_cut(double t, double *y, void (*fcn)(double t, double *y, double *f)); int errorSimPack(); int lyap_calc(double *t, double *y, double eps, double lyap_dt, void (*fcn)(double t, double *y, double *f), long int trans_steps, long int lyap_steps, double *exponents, int nn); int lyap_calc_file(char *filename, double *t, double *y, double eps, double lyap_dt, long int trans_steps, long int lyap_steps, void (*fcn)(double t, double *y, double *f), double *exponents, int nn, int samp); int order(); #endif