diff --git a/src/BeamAdapter/component/BeamInterpolation.inl b/src/BeamAdapter/component/BeamInterpolation.inl index e6328422..396e53a4 100644 --- a/src/BeamAdapter/component/BeamInterpolation.inl +++ b/src/BeamAdapter/component/BeamInterpolation.inl @@ -131,8 +131,12 @@ void BeamInterpolation::init() template void BeamInterpolation::bwdInit() { + this->d_componentState.setValue(ComponentState::Loading); BaseBeamInterpolation::bwdInit(); + if (this->d_componentState.getValue() == ComponentState::Invalid) + return; + Size nbEdges = this->m_topology->getNbEdges(); auto youngModulus = sofa::helper::getWriteOnlyAccessor(d_defaultYoungModulus); if (youngModulus.size() != nbEdges)