Open peanutfun opened 2 years ago
@peanutfun Thanks for your valuable observations. It is correct that GiNaCDE does not return the results in GiNaC expression ex. But, GiNaCDE returns its results through the variables solutionClt
and constraints
. One can use the results collected by the variables solutionClt
and constraints
for further computations within a program.
Please let us know, is this enough?
I'm sorry, I missed these global return variables on my first go through your program. I think they suffice, but it might be worth considering not to have them as global variables, but only local variables that are returned by the desolve
function. This would work well in conjunction with my proposal in #11. With a class encapsulation, you can define all these variables locally. I'll leave the decision up to you, feel free to close this issue!
Description
The main feature of GiNaCDE is the
desolve
function which solves a given differential equation. However, this function does not return the resulting GiNaC expressionex
, but only an integer status. The expression is written to a file and discarded. This severely hampers the usability of the GiNaCDE library, as the result ofdesolve
cannot be used within a program for further computations (e.g., evaluating it, integrating it over an interval, ...).Is there maybe a technical reason why the result is not also returned by the function?
Proposal
Make
desolve
return the solved expression, or throw an exception if there was an error.Related issues
openjournals/joss-reviews#3885