ComputationalScienceLaboratory / ODE-Test-Problems

A MATLAB suite of initial value problems
https://computationalsciencelaboratory.github.io/ODE-Test-Problems/
MIT License
9 stars 3 forks source link

Operator overloading on RHS #33

Closed AndreyAPopov closed 2 years ago

AndreyAPopov commented 2 years ago

This is a test as of now.

AndreyAPopov commented 2 years ago

So here is how all this works in matlab:

>> model = otp.brusselator.presets.Canonical;
>> firstCompRHS = model.RHS(1, :);
>> secondCompRHS = model.RHS(2, :);
>> reverseRHS = [secondCompRHS; firstCompRHS];
>> model.RHS.F(0, model.Y0)
ans =
    -6
     5
>> reverseRHS.F(0, model.Y0)
ans =
     5
    -6
Steven-Roberts commented 2 years ago

This should be ready to merge after some testing

AndreyAPopov commented 2 years ago

I feel like what we need now is to setup some pretty serious edge-case tests to exhaustively test every possible scenario

AndreyAPopov commented 2 years ago

As it is now, there is effectively no guarantees that this will work as intended

Steven-Roberts commented 2 years ago

I say we go ahead and merge this. Clearly it needs additional testing, but proper testing for OTP will be a large undertaking in a separate PR.

AndreyAPopov commented 2 years ago

I say we go ahead and merge this. Clearly it needs additional testing, but proper testing for OTP will be a large undertaking in a separate PR.

Fine. It is in a usable state. We will get more mileage out of testing by people actually using it.