D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/hydro_source/return_mex_arguments.cpp File Reference

#include <vector>
#include "Datas.h"
#include "return_mex_arguments.h"
#include "../CVODEincludes.h"

Include dependency graph for return_mex_arguments.cpp:

Go to the source code of this file.

Namespaces

namespace  std

Defines

#define pi   3.141592653589793
#define PI   3.141592653589793
#define Ith(v, i)   NV_Ith_S(v,i)

Functions

void store_state (double time, N_Vector state_at_t)
 Store state vector $ \vec{q}_i $ and time $ t_i $ at each integration step.
void return_args (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[], ODE_data *f_dat)
 Return arguments to MATLAB.

Variables

vector< double > sout00
vector< double > sout01
vector< double > sout02
vector< double > sout03
vector< double > sout04
vector< double > sout05
vector< double > sout06
vector< double > sout07
vector< double > sout08
vector< double > sout09
vector< double > sout10
vector< double > sout11
vector< double > timev


Detailed Description

Author:
basile.graf@epfl.ch
This file contains functions for returning parameters to MATLAB

Definition in file return_mex_arguments.cpp.


Define Documentation

#define Ith v,
 )     NV_Ith_S(v,i)
 

Definition at line 24 of file return_mex_arguments.cpp.

#define PI   3.141592653589793
 

Definition at line 21 of file return_mex_arguments.cpp.

#define pi   3.141592653589793
 

Definition at line 20 of file return_mex_arguments.cpp.


Function Documentation

void return_args int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[],
ODE_data f_dat
 

Return arguments to MATLAB.

Return the simulation results and simulation times (if asked for, see get_time()) and the cumulative number of integration steps performed (generally bigger than number of output points)

Parameters:
nlhs Number of left hand side arguments in the MATLAB prompt
*plhs[] Array of pointers to the left hand side arguments from MATLAB prompt
nrhs Number of right hand side arguments in the MATLAB prompt
*prhs[] Array of pointers to the right hand side arguments from MATLAB prompt
*f_dat ODE solver data struct

Definition at line 60 of file return_mex_arguments.cpp.

References sout00, sout01, sout02, sout03, sout04, sout05, sout06, sout07, sout08, sout09, sout10, and sout11.

Referenced by mexFunction().

void store_state double  time,
N_Vector  state_at_t
 

Store state vector $ \vec{q}_i $ and time $ t_i $ at each integration step.

If the programm has to return simulation results to MATLAB (see get_time()), the state vector $ \vec{q}_i $ and the time $ t_i $ has to be stored at each integration step. They are stored in dynamic C++ vectors of type vector.

Parameters:
time $ t_i $
state_at_t $ \vec{q}_i $ in the data format used by the SUNDIALS ODE solver CVODE

Definition at line 43 of file return_mex_arguments.cpp.

References Ith, sout00, sout01, sout02, sout03, sout04, sout05, sout06, sout07, sout08, sout09, sout10, sout11, and timev.

Referenced by solve_ODE().


Variable Documentation

vector<double> sout00
 

Definition at line 29 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout01
 

Definition at line 30 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout02
 

Definition at line 31 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout03
 

Definition at line 32 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout04
 

Definition at line 33 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout05
 

Definition at line 34 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout06
 

Definition at line 35 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout07
 

Definition at line 36 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout08
 

Definition at line 37 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout09
 

Definition at line 38 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout10
 

Definition at line 39 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> sout11
 

Definition at line 40 of file return_mex_arguments.cpp.

Referenced by return_args(), and store_state().

vector<double> timev
 

Definition at line 41 of file return_mex_arguments.cpp.

Referenced by store_state().


Generated on Fri Jun 9 19:10:31 2006 for hydroMex3 by  doxygen 1.4.6-NO