Closed SergeyNovak777 closed 1 year ago
That's not how you are supposed to change @SMatrix
to SMatrix
....
The SMatrix
constructor expects individual entries of elements, separated by comma, and expects them in column order first, instead of row order first.
Doing SMatrtix[a b c]
would try to make a vector of SMatrices...
Please try to test your PR before submission.
How can i right test this? Sorry for SMatrix
To test it try to make a TangentDynamicalSystem with the jacobian and the system.
Can i replace SVector on SA?
i don't even understand your question
I was thinking is it possible to replace the SVector with SA in the return of function. I checked it and it turned out that it leads to errors when calling other functions
I also noticed that not all functions are optimized. For example, some models have default parameters a = 1, b = 2.0. Different data types can slow down the execution time. Can I rewrite all the functions in the following form?
function TM(u, p, t)
U(y) = p[8] + p[9] / ( 1.0 + exp( -50.0 * (y - p[7]) ) )
σ(x) = 1.0 / ( 1.0 + exp( -20.0 * (x-p[6]) ) )
du1 = (-u[1] + p[1] * log( 1.0 + exp( (p[5] * U(u[3]) * u[2] * u[1] + p[11] ) / (p[1]) ) ) ) / p[2]
du2 = (1.0 - u[2])/p[3] - U(u[3])*u[2]*u[1]
du3 = (-u[3])/p[4] + p[10] * σ(u[2])
return SVector(du1, du2, du3)
end
I did next
In one of the commits I saw that you moved @inbounds to the function declaration and did the same. I also corrected the documentation for the
hindmarshrose_two_couppled
system that I once added