@@ -250,6 +250,8 @@ void AdaptiveBeamMapping< TIn, TOut>::apply(const MechanicalParams* mparams, Dat
250250 auto apply_impl = [&](const auto & range)
251251 {
252252 auto elementID = std::distance (m_pointBeamDistribution.begin (), range.start );
253+ size_t total = m_pointBeamDistribution.size ();
254+
253255 for (auto it = range.start ; it != range.end ; ++it, ++elementID)
254256 {
255257 const auto & pointBeamDistribution = m_pointBeamDistribution[elementID];
@@ -258,6 +260,26 @@ void AdaptiveBeamMapping< TIn, TOut>::apply(const MechanicalParams* mparams, Dat
258260 const Vec3 localPos (0 ., pointBeamDistribution.baryPoint [1 ], pointBeamDistribution.baryPoint [2 ]);
259261 l_adaptativebeamInterpolation->interpolatePointUsingSpline (pointBeamDistribution.beamId , pointBeamDistribution.baryPoint [0 ], localPos, in, pos, false , xtest);
260262
263+
264+
265+ if (elementID >= total - 1 )
266+ {
267+ std::cerr
268+ << " Mapping = "
269+ << l_adaptativebeamInterpolation->getName ()
270+ << " | elementID = "
271+ << elementID
272+ << " | beamId = "
273+ << pointBeamDistribution.beamId
274+ << " | xBary = "
275+ << pointBeamDistribution.baryPoint [0 ]
276+ << " | pos = "
277+ << pos[0 ] << " "
278+ << pos[1 ] << " "
279+ << pos[2 ]
280+ << std::endl;
281+ }
282+
261283 if (m_isSubMapping)
262284 {
263285 if (!m_idPointSubMap.empty ())
@@ -660,6 +682,7 @@ void AdaptiveBeamMapping< TIn, TOut>::computeDistribution()
660682 const unsigned int beamId = (int )floor (points[i][0 ]);
661683 msg_warning_when (beamId > numBeams-1 ) << " Points[" << i << " ][0] = " << beamId << " is defined outside of the beam length" ;
662684 m_pointBeamDistribution.emplace_back ( beamId, Vec3{ points[i][0 ] - floor (points[i][0 ]), points[i][1 ], points[i][2 ]});
685+ std::cerr << " Points[" << i << " ][0] = " << beamId << std::endl;
663686 }
664687 }
665688 }
0 commit comments