@@ -35,7 +35,7 @@ BarrierEnergy<T, dim>::BarrierEnergy(const BarrierEnergy<T, dim> &rhs)
3535 : pimpl_{std::make_unique<Impl>(*rhs.pimpl_ )} {}
3636
3737template <typename T, int dim>
38- BarrierEnergy<T, dim>::BarrierEnergy(const std::vector<T> &x, const std::vector<T> &n, const std::vector<T> &o, const std::vector<int > &be , const std::vector<int > &bp , const std::vector<T> &contact_area) : pimpl_{std::make_unique<Impl>()}
38+ BarrierEnergy<T, dim>::BarrierEnergy(const std::vector<T> &x, const std::vector<T> &n, const std::vector<T> &o, const std::vector<int > &bp , const std::vector<int > &be , const std::vector<T> &contact_area) : pimpl_{std::make_unique<Impl>()}
3939{
4040 pimpl_->N = x.size () / dim;
4141 pimpl_->device_x .copy_from (x);
@@ -377,11 +377,13 @@ T BarrierEnergy<T, dim>::init_step_size(const DeviceBuffer<T> &p)
377377 e1 <<device_x (eI1*dim),device_x (eI1*dim+1 );
378378 dp<<P (xI*dim),P (xI*dim+1 );
379379 de0<<P (eI0*dim),P (eI0*dim+1 );
380- de1<<P (eI1*dim),P (eI1*dim+1 );
381- if (bbox_overlap (p,e0 ,e1 ,dp,de0,de1,current_alpha)){
382- T toc=narrow_phase_CCD (p,e0 ,e1 ,dp,de0,de1,current_alpha);
383- device_alpha1 (i)=min (device_alpha1 (i),toc);
384- }} })
380+ de1<<P (eI1*dim),P (eI1*dim+1 );
381+ if (bbox_overlap (p, e0 , e1 , dp, de0, de1, current_alpha))
382+ {
383+ T toc = narrow_phase_CCD (p, e0 , e1 , dp, de0, de1, current_alpha);
384+ device_alpha1 (i) = min (device_alpha1 (i), toc);
385+ }
386+ } })
385387 .wait ();
386388 return min (min_vector (device_alpha1), current_alpha);
387389}
0 commit comments