projectchrono / chrono

High-performance C++ library for multiphysics and multibody dynamics simulations
http://projectchrono.org
BSD 3-Clause "New" or "Revised" License
2.2k stars 461 forks source link

Support for ChMatrix66D and access to the content of a ChVectorDynamicD in PyChrono #480

Closed pfisterj closed 7 months ago

pfisterj commented 7 months ago

Small modifications of PyChrono SWIG wrapper associated to forum posts https://groups.google.com/g/projectchrono/c/mLS_hVd8eps/m/CRFH636VAgAJ and https://groups.google.com/g/projectchrono/c/eNmmY5MnuHY/m/N3yulX4xCAAJ ; thanks to Nicolas C. for the actual implementation.

rserban commented 7 months ago

@pfisterj - thanks for the contribution, but I will have to close this PR for several reasons:

  1. It seems to me that you have started from the Chrono code for release 8.0
  2. Yet, you request merging into main a commit that you have cherry picked from the main branch! What would be the point of that? The fixes to the DOF counts for the ANCF nodes are obviously already in main!
  3. We have already fixed the issues with accessing Eigen vectors from Python (this will be merged into main when we complete an ongoing refactoring job)
  4. We will look into exposing ChMatrix66 to Python users, but I prefer to do this in a slightly different way to maintain as much as possible the correspondence between C++ and Python.
rserban commented 7 months ago

@pfisterj - I will reach out to you when we are done with the ongoing refactoring job at which point we can talk about adding ChMatrix66 and the extensions you have for ChSparseMatrix for PyChrono .

Best, Radu

pfisterj commented 7 months ago

Hi,

1./2. Got it, sorry. I'm starting with this, not so brilliantly :-) 3./4. Thanks for the details.

Cheers

rserban commented 7 months ago

@pfisterj - could you please email me at serban@wisc.edu? I'd like to suggest a PR you could do if you're interested.