jacobian.h
Go to the documentation of this file.
1 #ifndef JACOBIANH
2 #define JACOBIANH
3 
4 #include "variables.h"
5 #include "equations.h"
6 
7 #include <stdio.h>
8 
23 typedef struct {
24  unsigned int neqs;
25  unsigned int nvars;
28 } TJacobian;
29 
40 
49 void CopyJacobian(TJacobian *j_dst,TJacobian *j_src);
50 
60 void GetJacobianSize(unsigned int *nr,unsigned int *nc,TJacobian *j);
61 
73 Tequations *GetJacobianColumn(unsigned int nv,TJacobian *J);
74 
85 Tequation *GetJacobianEquation(unsigned int r,unsigned int c,TJacobian *j);
86 
95 void AllocateJacobianEvaluation(double ***m,TJacobian *j);
96 
106 void EvaluateJacobian(double *v,double **m,TJacobian *j);
107 
121 void EvaluateJacobianInVector(double *v,
122  unsigned int nr,unsigned int nc,double *m,TJacobian *j);
123 
140 void EvaluateJacobianSubSetInVector(double *v,boolean *sr,
141  unsigned int nr,unsigned int nc,double *m,TJacobian *j);
142 
157  unsigned int nr,unsigned int nc,double *m,TJacobian *j);
158 
174 void EvaluateTransposedJacobianSubSetInVector(double *v,boolean *sr,
175  unsigned int nr,unsigned int nc,double *m,TJacobian *j);
176 
186 void PrintJacobianEvaluation(FILE *f,double **m,TJacobian *j);
187 
197 void FreeJacobianEvaluation(double **m,TJacobian *j);
198 
235 void EvaluateJacobianXVectors(double *p,
236  unsigned int n,unsigned int ng,unsigned int *g,double *v,
237  unsigned int *nr,unsigned int *nc,double ***m,
238  TJacobian *j);
239 
249 void PrintJacobian(FILE *f,char **varNames,TJacobian *j);
250 
258 void DeleteJacobian(TJacobian *j);
259 
260 #endif
Set of variables of a cuiksystem.
Definition: variables.h:38
Tequations * GetJacobianColumn(unsigned int nv, TJacobian *J)
Returns one of the Jacobian element.
Definition: jacobian.c:49
void InitJacobian(Tvariables *vs, Tequations *eqs, TJacobian *j)
Constructor.
Definition: jacobian.c:16
Tequations * J
Definition: jacobian.h:26
void EvaluateTransposedJacobianInVector(double *v, unsigned int nr, unsigned int nc, double *m, TJacobian *j)
Evaluates the transposed Jacobian.
Definition: jacobian.c:137
Definition of the Tvariables type and the associated functions.
void EvaluateJacobian(double *v, double **m, TJacobian *j)
Evaluates the Jacobian.
Definition: jacobian.c:79
void DeleteJacobian(TJacobian *j)
Destructor.
Definition: jacobian.c:249
Tequation * GetJacobianEquation(unsigned int r, unsigned int c, TJacobian *j)
Returns one element of the Jacobian.
Definition: jacobian.c:57
void AllocateJacobianEvaluation(double ***m, TJacobian *j)
Allocate space for the Jacobian evaluation.
Definition: jacobian.c:65
void GetJacobianSize(unsigned int *nr, unsigned int *nc, TJacobian *j)
Returns the size of the Jacobian.
Definition: jacobian.c:43
void PrintJacobianEvaluation(FILE *f, double **m, TJacobian *j)
Prints the result of evaluating the Jacobian.
Definition: jacobian.c:177
void EvaluateTransposedJacobianSubSetInVector(double *v, boolean *sr, unsigned int nr, unsigned int nc, double *m, TJacobian *j)
Evaluates a subset of the transposed Jacobian.
Definition: jacobian.c:154
void EvaluateJacobianXVectors(double *p, unsigned int n, unsigned int ng, unsigned int *g, double *v, unsigned int *nr, unsigned int *nc, double ***m, TJacobian *j)
Evaluates the Jacobian multiplied by some given vectors.
Definition: jacobian.c:206
unsigned int neqs
Definition: jacobian.h:24
void EvaluateJacobianInVector(double *v, unsigned int nr, unsigned int nc, double *m, TJacobian *j)
Evaluates the Jacobian.
Definition: jacobian.c:97
Set of equations.
Definition: equations.h:81
An equation.
Definition: equation.h:236
void EvaluateJacobianSubSetInVector(double *v, boolean *sr, unsigned int nr, unsigned int nc, double *m, TJacobian *j)
Evaluates some of the Jacobian equations.
Definition: jacobian.c:114
void PrintJacobian(FILE *f, char **varNames, TJacobian *j)
Prints the symbolic Jacobian.
Definition: jacobian.c:238
unsigned int nvars
Definition: jacobian.h:25
void CopyJacobian(TJacobian *j_dst, TJacobian *j_src)
Constructor.
Definition: jacobian.c:31
The Jacobian of a set of equations.
Definition: jacobian.h:23
void FreeJacobianEvaluation(double **m, TJacobian *j)
Release space for the Jacobian evaluation.
Definition: jacobian.c:194
Definition of the Tequations type and the associated functions.