<div>What is stiff matrix? Is there any reference? I googled and check wikipedia. I am not sure if the implementation in the deformableMesh3D is correct. </div>
<div>In ComputeDT(), the following code appears to calculate the internal force on each node in a triangular element through deformation, and sum them up, and check the external force and subtract the internal force, if there is remaining force left, that will drive the node further. Appear to make sense. However,
</div>
<div>first of all, why the stiffness matrix is applied in this way??? deformation from node 1 is simply scaled by m_K[i][0][0]??? I know there are m_K[i][1][0] used, but those code also don't make sense to me. </div>
<div>I am wondering if we can just assume linear elastic model so that each node is associated with a scalar k, then the internal deformation force will be the displacement relative to the other two node then multiply with that k.
</div>
<div>It just my experience that the current filter relies heavly on the external force, the stiffness never behaved correctly. Often, I saw sharp spikes rise out from my mesh surface, that should never happen.</div>
<div> </div>
<div>Another improvement suggestion: the SetDefaultStiffnessMatrix() only set the component for m_StiffnessMatrix[0]. I suggest to set the same value for all 10 components. The code can allow people to apply different stiffness matrix on different nodes depending on their cell value. However, people may mistakenly set their cell value other than 0. Then they will find that the stiffness setting never have effect. I met that situation before. I use a "
MeshUtilNew.h" file shared by someone in this maillist. Its PolyDataToMesh function set the cell value to 3 in the code. I am sure other people may also encountered this issue. And it is hard to notice because it will just set my stiffness to 0 and it still works.
</div>
<div>Also, in the current design SetMeshStiffness function allocates the stiffness mesh for each cell, not sure that is a good approach, since you only can have 10 different stiffness mesh. Why can't we put the check of celldata value in ComputeDT? And what if the cell value is greater than 10? Maybe need to use % or some warning to make sure it doesn't cause crash.
</div>
<div> </div>
<div> </div>
<div>code in the ComputeDT():</div>
<div> </div>
<div>.....</div>
<div> </div>
<div> m_Displacements->GetPoint (tp[0], v1_pt); <br> m_Displacements->GetPoint (tp[1], v2_pt); <br> m_Displacements->GetPoint (tp[2], v3_pt); </div>
<div> v1[0] *= m_K[i]->get(0, 0)*p; <br> v1[1] *= m_K[i]->get(0, 0)*p; <br> v1[2] *= m_K[i]->get(0, 0)*p; <br> v2[0] *= m_K[i]->get(0, 1)*p; <br> v2[1] *= m_K[i]->get(0, 1)*p; <br> v2[2] *= m_K[i]->get(0, 1)*p;
<br> v3[0] *= m_K[i]->get(0, 2)*p; <br> v3[1] *= m_K[i]->get(0, 2)*p; <br> v3[2] *= m_K[i]->get(0, 2)*p; <br> v1[0] += v2[0]+v3[0]; <br> v1[1] += v2[1]+v3[1]; <br> v1[2] += v2[2]+v3[2]; <br> m_Forces->GetPoint (tp[0], v2_pt);
</div>
<div> v2[0] -= v1[0]; <br> v2[1] -= v1[1]; <br> v2[2] -= v1[2];</div>
<div> m_Forces->SetPoint (tp[0], v2); </div>
<div> </div>
<div> </div>