Add bindings for matrix access#260
Conversation
|
Hi @alxbilger, Thanks for the PR. |
|
I don't think so. The returned object of those bindings are copies in all functions |
|
A unit test is required |
|
Thanks for the added tests @alxbilger. To make python scenes it is recommended to use python objects instead of Sofa string for passing parameters. root.addObject('EulerImplicitSolver', rayleighStiffness="0.1", rayleighMass="0.1")
root.addObject('BoxROI', name="box", box="-10 -1 -0.0001 -5 4 0.0001")should become: root.addObject('EulerImplicitSolver', rayleighStiffness=0.1, rayleighMass=0.1)
root.addObject('BoxROI', name="box", box=[-10, -1, -0.0001, -5, 4, 0.0001]) |
damienmarchal
left a comment
There was a problem hiding this comment.
Changes to do:
- use python object instead of string
- have a corrected lifetime management for the root node (or explain how/if it works)
- remove the useless controller (if really useless)
|
@damienmarchal thanks for the review. The last changes should follow your suggestions |
|
I suspect the failing unit test comes from sofa-framework/sofa#3036, highlighted by sofa-framework/sofa#3050. |
Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
|
The generated file BindingsConfig.cmake does not work when used in find_package for an external directory. There is a failure on missing Bindings.SofaBaseLinearSolver. |
| Bindings.SofaGui | ||
| Bindings.SofaRuntime | ||
| Bindings.SofaTypes | ||
| Bindings.SofaLinearSolver |
There was a problem hiding this comment.
Commenting this line allows SoftRobots to compile. Otherwise it fails.
Python bindings for accessing
A,xandbfrom a linear solver solving the systemAx=b.An example is introduced.
In the example, the output after a time step:
Note: I took the same binding names than in Caribou