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 199 forks source link

Fix index error in `ShellContactDensity` #239

Closed FabienPean-Virtonomy closed 1 year ago

Xiangyu-Hu commented 1 year ago

@DongWuTUM Hi, Dong. Could you check whether this bug fix is ok? It failed a case in Mc OS.

DongWuTUM commented 1 year ago

@DongWuTUM Hi, Dong. Could you check whether this bug fix is ok? It failed a case in Mc OS.

OK, I will check it.

FabienPean-Virtonomy commented 1 year ago

@DongWuTUM The regression data were generated with the bug present at https://github.com/Xiangyu-Hu/SPHinXsys/commit/ae66a376fc9807033dd63836fbb46bfe35143339

Xiangyu-Hu commented 1 year ago

Thanks for the revision.

FabienPean-Virtonomy commented 1 year ago

I don't know why macOS is hanging. If you have one feel free to fix. It seems partly random since it worked earlier with just windows specific changes. Might be because of macOS github runner changed architecture or some Undefined Behavior in the code.

DongWuTUM commented 1 year ago

@FabienPean-Virtonomy Hi Fabien. Thank you very much for your revision. Seems like the problem is not located in the regression data. I will further check it.

Xiangyu-Hu commented 1 year ago

@ncsalis could you have a look on the branch at mcos?

DongWuTUM commented 1 year ago

The simulation sometimes crashed (the time step decreases to very small). This should be the problem. I will correct it.

BenceVirtonomy commented 1 year ago

The simulation sometimes crashed (the time step decreases to very small). This should be the problem. I will correct it.

@DongWuTUM we always check for time step decrease on our side, and stop the simulation if that happens. It's easier to debug, I would recommend adding it to all simulations in general.

DongWuTUM commented 1 year ago

The simulation sometimes crashed (the time step decreases to very small). This should be the problem. I will correct it.

@DongWuTUM we always check for time step decrease on our side, and stop the simulation if that happens. It's easier to debug, I would recommend adding it to all simulations in general.

@BenceVirtonomy Good idea! It should be so.

ncsalis commented 1 year ago

The simulation sometimes crashed (the time step decreases to very small). This should be the problem. I will correct it.

Same thing happens to me. Sometimes crashes with very low dt and sometimes is fine

DongWuTUM commented 1 year ago

The simulation sometimes crashed (the time step decreases to very small). This should be the problem. I will correct it.

Same thing happens to me. Sometimes crashes with very low dt and sometimes is fine

Thank you for testing!

DongWuTUM commented 1 year ago

With adjusted limiter, all are Okay now.