SiReNe Simulation Software  1.0
NumericalMethods.c File Reference

Numerical methods used to compute the network evolution at each time-step. More...

#include <stdlib.h>
#include <stdio.h>
#include "Sirene.h"
Include dependency graph for NumericalMethods.c:

Functions

void Euler (Simul *Simulation, void(*Update)(Simul *Simulation, double tPrev, double t, double *Var, double *Der), double *TmpVar, double *TmpDer)
 Resolution of the ODE system by explicit Euler method. More...
 
void RungeKutta2 (Simul *Simulation, void(*Update)(Simul *Simulation, double tPrev, double t, double *Var, double *Der), double *TmpVar, double *TmpDer)
 Resolution of the ODE system by the explicit Runge-Kutta 2 method. More...
 

Function Documentation

◆ Euler()

void Euler ( Simul Simulation,
void(*)(Simul *Simulation, double tPrev, double t, double *Var, double *Der)  Update,
double *  TmpVar,
double *  TmpDer 
)

Parameters
SimulationStructure where all simulation information is stored
UpdateUpdate function of each neuron in the models
TmpVarNot used
TmpDerNot used

References Simul::Chrono_NumericalMethod, Simul::CrtNum, Simul::DVar, INPUT_CALL, Simul::NumberOfVariables, Simul::PrvNum, RETURN_CALL, Simul::Start, Simul::t, Simul::TimeStep, and Simul::Variables.

Referenced by InitSimu().

◆ RungeKutta2()

void RungeKutta2 ( Simul Simulation,
void(*)(Simul *Simulation, double tPrev, double t, double *Var, double *Der)  Update,
double *  TmpVar,
double *  TmpDer 
)

Parameters
SimulationStructure where all simulation information is stored
UpdateUpdate function of each neuron in the models
TmpVarVariables array for intermediate time-steps
TmpDerDerivatives array for intermediate time-steps

References Simul::Chrono_NumericalMethod, INPUT_CALL, Simul::NumberOfVariables, Simul::PrvNum, RETURN_CALL, Simul::Start, Simul::t, Simul::TimeStep, and Simul::Variables.

Referenced by main().