UserWarning: Taichi matrices/vectors with 4x27 > 32 entries are not suggested. Matrices/vectors will be automatically unrolled at compile-time for performance. So the compilation time could be extremely long if the matrix size is too big. You may use a field to store a large matrix like this, e.g.:
x = ti.field(ti.f32, (4, 27)).
在mls-mpm的实现中,需要用到一个27*4的M矩阵
d_vecs = ti.Vector([0,]*27).cast(float)
diag = ti.Matrix.identity(float, 27)
temp = ti.Vector([0,0,0,0]).cast(float)
Q = ti.Matrix.rows([temp,]*27)
以及后续还要对矩阵进行转置和求逆操作。如果按照提示转换成field,那又要如何对field进行矩阵乘法及求逆等操作呢?
或者说还有其他的解决方法缩短编译时间。