comparison liboctave/numeric/LSODE.cc @ 30898:51a3d3a69193

maint: Use "fcn" as preferred abbreviation for "function" in liboctave/. * DAEFunc.h, DASPK.cc, DASSL.cc, LSODE.cc, ODEFunc.h, eigs-base.cc, eigs-base.h, oct-norm.cc, mx-inlines.cc: Replace "func", "fun" in documentation and variable names with "fcn".
author Rik <rik@octave.org>
date Tue, 05 Apr 2022 13:20:48 -0700
parents 796f54d4ddbf
children de6fc38c78c6
comparison
equal deleted inserted replaced
30897:260ce8667d96 30898:51a3d3a69193
50 F77_INT&, F77_INT&, F77_INT&, F77_DBLE *, 50 F77_INT&, F77_INT&, F77_INT&, F77_DBLE *,
51 F77_INT&, F77_INT *, F77_INT&, lsode_jac_ptr, 51 F77_INT&, F77_INT *, F77_INT&, lsode_jac_ptr,
52 F77_INT&); 52 F77_INT&);
53 } 53 }
54 54
55 static ODEFunc::ODERHSFunc user_fun; 55 static ODEFunc::ODERHSFunc user_fcn;
56 static ODEFunc::ODEJacFunc user_jac; 56 static ODEFunc::ODEJacFunc user_jac;
57 static ColumnVector *tmp_x; 57 static ColumnVector *tmp_x;
58 58
59 static F77_INT 59 static F77_INT
60 lsode_f (const F77_INT& neq, const double& time, double *, double *deriv, 60 lsode_f (const F77_INT& neq, const double& time, double *, double *deriv,
64 64
65 // NOTE: this won't work if LSODE passes copies of the state vector. 65 // NOTE: this won't work if LSODE passes copies of the state vector.
66 // In that case we have to create a temporary vector object 66 // In that case we have to create a temporary vector object
67 // and copy. 67 // and copy.
68 68
69 tmp_deriv = (*user_fun) (*tmp_x, time); 69 tmp_deriv = (*user_fcn) (*tmp_x, time);
70 70
71 if (tmp_deriv.isempty ()) 71 if (tmp_deriv.isempty ())
72 ierr = -1; 72 ierr = -1;
73 else 73 else
74 { 74 {
190 // In that case we have to create a temporary vector object 190 // In that case we have to create a temporary vector object
191 // and copy. 191 // and copy.
192 192
193 tmp_x = &m_x; 193 tmp_x = &m_x;
194 194
195 user_fun = function (); 195 user_fcn = function ();
196 user_jac = jacobian_function (); 196 user_jac = jacobian_function ();
197 197
198 ColumnVector m_xdot = (*user_fun) (m_x, m_t); 198 ColumnVector m_xdot = (*user_fcn) (m_x, m_t);
199 199
200 if (m_x.numel () != m_xdot.numel ()) 200 if (m_x.numel () != m_xdot.numel ())
201 { 201 {
202 // FIXME: Should this be a warning? 202 // FIXME: Should this be a warning?
203 (*current_liboctave_error_handler) 203 (*current_liboctave_error_handler)