Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://www.sphinxsys.org/
Apache License 2.0
259 stars 197 forks source link

use the matrix.block() feature in Eigen to adjust matrix size #521

Closed Shuaihao-Zhang closed 2 months ago

Shuaihao-Zhang commented 2 months ago

Refer to #519, I used the matrix.block() feature in Eigen to adjust matrix size instead of self-defined increaseTensor and reduceTensor.

DrChiZhang commented 2 months ago

Thx for the refactoring.

Shuaihao-Zhang commented 2 months ago

We should used these functions.

https://github.com/Xiangyu-Hu/SPHinXsys/blob/cd6be2421408c97b2788bf3baa23b3abe331c5af/src/shared/common/vector_functions.h#L37-L46

@Xiangyu-Hu This is done. Please check again.