r2274 trunk is broken

Bug #589516 reported by Anton Gladky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Jérôme Duriez

Bug Description

Hi, Jerome,

please, fix it:

from /home/anton/dem/yade/current/build-current/plugins25.cpp:1:
/usr/include/boost/smart_ptr/shared_ptr.hpp: In constructor 'boost::shared_ptr< <template-parameter-1-1> >::shared_ptr(const boost::shared_ptr<Y>&, boost::detail::static_cast_tag) [with Y = Engine, T = Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity]':
/usr/include/boost/smart_ptr/shared_ptr.hpp:512: instantiated from 'boost::shared_ptr<X> boost::static_pointer_cast(const boost::shared_ptr<U>&) [with T = Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity, U = Engine]'
/home/anton/dem/yade/current/yade/pkg/dem/Engine/PartialEngine/KinemCNSEngine.cpp:137: instantiated from here
/usr/include/boost/smart_ptr/shared_ptr.hpp:249: error: invalid static_cast from type 'Engine* const' to type 'Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity*'
scons: *** [/home/anton/dem/yade/current/build-current/plugins25.os] Error 1
scons: building terminated because of errors.

Thank you

Changed in yade:
assignee: nobody → jduriez (jduriez)
Revision history for this message
Jérôme Duriez (jduriez) wrote :

r2775 fixes the problem normally.
By the way, I wanted first to take the opportunity of this new commit to move the file Law2 in a "Functor", as it is one and no more an Engine. But I saw that many Law2 are still in "GlobalEngine"
So, what's the rule (if there is one ?)

Changed in yade:
status: New → Fix Released
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote : Re: [Yade-dev] [Bug 589516] Re: r2274 trunk is broken

> But I saw that many Law2 are still in "GlobalEngine"
> So, what's the rule (if there is one ?)
>
>
This is mostly for backward compatibility, you don't "have to" do the
same. Looping in global engines is used less and less.
There are a few cases where global engines help a lot though, like using
more than one constitutive laws in parallel (e.g. elastic+capillary).

Bruno

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.