diff --git a/src/Tearing/TearingScenarioEngine.inl b/src/Tearing/TearingScenarioEngine.inl index 18fce34..4e157cc 100644 --- a/src/Tearing/TearingScenarioEngine.inl +++ b/src/Tearing/TearingScenarioEngine.inl @@ -116,7 +116,7 @@ void TearingScenarioEngine::computeEndPoints( Real norm_dir = dir.norm(); Pb = Pa + alpha/norm_dir * dir; - Pc = Pa - alpha /norm_dir * dir; + Pc = Pa;// -alpha / norm_dir * dir; } template @@ -129,6 +129,12 @@ void TearingScenarioEngine::algoFracturePath() helper::ReadAccessor< Data > x(this->d_input_positions); m_Pa = x[indexA]; + if (indexA < 0 || indexA >= x.size()) + { + msg_error() << "Invalid Input: startVertexId."; + return; + } + //Coord Pb, Pc; computeEndPoints(m_Pa, dir, m_Pb, m_Pc);