IQN algorithm + non-matching meshes interpolator fails
Created by: acrovato
Context
The IQN algorithm will result in a python fault (corrupted size vs previous size) if used with a non-matching meshes interpolator (such as RBF).
Issue`
@mlucio89and
@tobadavid` were able to track down the issue.
Some data (of type FlexInterfaceData) in the IQN algorithm need to be defined with a size equals to the number of structural nodes at the interface (ns = self.interfaceInterpolator.getNs()
):
res = FlexInterfaceData(ns, 3, self.mpiComm)
solidInterfaceResidual0 = FlexInterfaceData(ns, 3, self.mpiComm)
solidInterfaceDisplacement_tilde = FlexInterfaceData(ns, 3, self.mpiComm)
solidInterfaceDisplacement_tilde1 = FlexInterfaceData(ns, 3, self.mpiComm)
delta_ds = FlexInterfaceData(ns, 3, self.mpiComm)
However, when a non-matching interpolator is used, these data should be defined with an augmented size ns+d
where d
is 3 in 2D and 4 in 3D:
res = FlexInterfaceData(ns+d, 3, self.mpiComm)
solidInterfaceResidual0 = FlexInterfaceData(ns+d, 3, self.mpiComm)
solidInterfaceDisplacement_tilde = FlexInterfaceData(ns+d, 3, self.mpiComm)
solidInterfaceDisplacement_tilde1 = FlexInterfaceData(ns+d, 3, self.mpiComm)
delta_ds = FlexInterfaceData(ns+d, 3, self.mpiComm)
Proposed workaround`
@tobadavid` suggested a simple workaround (but not efficient) as a first step before implementing a more sophisticated solution. The workaround would consist in copying the data vectors and augmenting their size before passing them to the interpolator. A vector would then be used by the IQN algorithm and its copy would be used by the interpolator. This solution is obviously not efficient as it involves copying vectors of large size. However, it should be effective for the time being.