Integration of [Kee et al. 2023]: "An Optimization-Based SPH Solver for Simulation of Hyperelastic Solids"#372
Conversation
…L-BFGS; validating line search
…ion, SVD polar decomposition fix - L-BFGS: runtime window size change with buffer renewal; window=0 for constant Hessian - Line search: backtracking Armijo + flat energy termination (|dE| < 1e-4); convergence check before LS - SVD polar decomposition: flip U.col(2) instead of R.col(2) for correct R under inversion - Non-convergence warning at max iterations - Kugelstadt2021: added neighbor list asymmetry check - Beam.json: updated scene config for validation
There was a problem hiding this comment.
Could you please remove this file from the repo since it is generated by CMake?
There was a problem hiding this comment.
I removed the file as requested.
Thank you.
There was a problem hiding this comment.
Can you please let our original Beam.json example as it is and add a new scene file for your beam?
|
|
||
| // Convergence check on ||dx||_inf before line search | ||
| Real dxNorm = 0; | ||
| #pragma omp parallel for reduction(max:dxNorm) schedule(static) |
There was a problem hiding this comment.
This line does not compile using Visual Studio (Windows). Please note that Visual Studio (unfortunately) only supports OpenMP 2.0.
|
Thanks for sharing your code. I just try to compile and test it. However, if I enable the CMake option "USE_AVX", the code does not compile anymore. And without the option it would probably compile on Linux, but using Visual studio has the limitation that it only supports OpenMP 2.0. |
|
Thank you for catching this. The compile error is due to variable name changes in the non-AVX version that I haven't applied to the AVX version yet. I'll update it to support USE_AVX and test on Windows + Visual Studio as well. |
…uard Newton for AVX build.
…critical instead of reduction(max).
|
I have revised the code as requested. The update contains
Thank you. |
|
Now the code compiles and seems to work fine. Thanks for your revision. There is just one small point. When I create a new scene with fixed particles, the material rotates due to a hard coded rotation in the elasticity step. Could you please remove that? An alternative is to use the embedded Python interface to do the rotational motion. You can find an example in the files AnimatedBody_2D.json and AnimatedBody_2D.py. |
Features:
Performance (beam twisting benchmark, ~9K particles, Poisson's ratio = 0.49):
Bug fix:
Fixed an asymmetry issue in neighbor list handling: when the maximum neighbor count is limited (default 15), particle i may include j as a neighbor while j does not include i, causing unbalanced elastic forces and violating momentum conservation. The beam benchmark requires up to 43 neighbors.