Closed efaulhaber closed 1 year ago
I'm with you. Also, the correction matrix is not only used for the TLSPH but for other schemes as well. This correction matrix is to overcome incomplete kernel support. We didn't need this for fluid, since we have the boundary particles. But for modelling the structure dynamic, the correction matrix is crucial.
It might be reasonable to put this calculation in a separate file.
Update: Factorizing the matrix doesn't make sense here. We work with a small SMatrix
, which makes computations extremely fast. Solving L \ v
takes 2.8ns for a 2x2 SMatrix
L
, whereas v * inverse
takes 2.5ns, where inverse
is the inverse of L
. Using an LU decomposition here needs two multiplications, which take twice as long as a result.
For the total Lagrangian SPH, it might be faster to store the factorization of the correction matrix instead of storing the inverse.