morpho icon indicating copy to clipboard operation
morpho copied to clipboard

Morehessians

Open softmattertheory opened this issue 10 months ago • 4 comments

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

softmattertheory avatar Apr 12 '24 14:04 softmattertheory

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

joshichaitanya3 avatar Apr 20 '24 15:04 joshichaitanya3

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

softmattertheory avatar Apr 21 '24 13:04 softmattertheory

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

softmattertheory avatar May 21 '24 14:05 softmattertheory

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 avatar May 21 '24 17:05 joshichaitanya3

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 avatar May 22 '24 13:05 joshichaitanya3

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 avatar May 22 '24 13:05 joshichaitanya3

The CI worked, awesome!

joshichaitanya3 avatar May 22 '24 13:05 joshichaitanya3