- Timestamp:
- 10/10/18 11:49:47 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels/AutoDiffForDynamicalModelsTest/TestCvodes.cs
r16225 r16226 33 33 int numberOfEquations = 1; 34 34 var y = Problem.N_VNew_Serial(numberOfEquations); 35 Problem.N_VConst_Serial(100.0, y); 35 // y must be initialized before calling CVodeInit 36 // Problem.N_VConst_Serial(100.0, y); 37 Problem.NV_Set_Ith_S(y, 0, 100.0); 36 38 37 39 var cvode_mem = Problem.CVodeCreate(Problem.MultistepMethod.CV_ADAMS, Problem.NonlinearSolverIteration.CV_FUNCTIONAL); … … 85 87 IntPtr user_data) { 86 88 87 Problem.N _VScale(-0.1, y, ydot);89 Problem.NV_Set_Ith_S(ydot, 0, -0.1 * Problem.NV_Get_Ith_S(y, 0)); 88 90 return 0; 89 91 ;
Note: See TracChangeset
for help on using the changeset viewer.