Morpho-lang / morpho

The Morpho language 🦋. Morpho is a small embeddable language for scientific computing applications.
MIT License
33 stars 11 forks source link

Morehessians #250

Closed softmattertheory closed 6 months ago

softmattertheory commented 7 months ago

Calculation of hessians is now parallelized, and properly supports dependencies. Implementations for LineCurvatureSq and LineTorsionSq with testing.

joshichaitanya3 commented 7 months ago

This should be super useful!

The hessian tests (and a few others, attaching FailedTests.txt here), are failing if I run test.py with

command = 'morpho6 -w4’

on my laptop. Tried it individually too with morpho6 -w4 length_hessian.morpho for example. Could you check if that’s true on your end too? It looks like a.hessian(m) returns a Sparse object, but is empty when run with -wX flag (thus giving the MtrxInvldInit errors for the checks). Debugging this on my end too.

FailedTests.txt

softmattertheory commented 7 months ago

Awesome, thanks @joshichaitanya3, I'll investigate this!

softmattertheory commented 6 months ago

@joshichaitanya3 I fixed this and updated the PR. There was an issue in how the sparse matrix addition was being performed.

joshichaitanya3 commented 6 months ago

Thanks, @softmattertheory! I rechecked the tests, and most of the old tests are now passing, but new ones are failing.

I am attaching the FailedTests.txt file here too.

FailedTests.txt

The new error is SprsOpFld.

I also realized that one of the failing tests fails also on the main branch when run with -w4. I will make a separate issue for it.

Let me know if you need more information.

joshichaitanya3 commented 6 months ago

All tests are passing with -w4 now!

One last thing before closing, could you please make an Issue documenting the exact reason why the previous gradvector test was failing, so that we don’t forget about it? I would have made it, but the explanation you gave yesterday sounded much more precise haha :)

joshichaitanya3 commented 6 months ago

We can remove my old Issue #259, which doesn’t point at the core problem. Also, the file would now change, so that Issue would become inconsistent.

joshichaitanya3 commented 6 months ago

The CI worked, awesome!