Question #153589 on Yade changed: https://answers.launchpad.net/yade/+question/153589
Status: Answered => Open Kneib François is still having a problem: Ok thanks, I'm looking at that and I've done this : I created the Law2_CylScGeom6D_CohFrictPhys_CohesionMoment class, child of LawFunctor. I have done that in the CohesiveFrictionalContactLaw.hpp/cpp files to avoid adding things at the big Cylinder.cpp file. The new class is the same as Law2_CylScGeom_FrictPhys_CundallStrack, I just changed the names and the beginning by that : CylScGeom6D* geom = static_cast<CylScGeom6D*>(ig.get()); CohFrictPhys* phys = static_cast<CohFrictPhys*>(ip.get()); And the hpp declaration is like the CohesiveFrictionalContactLaw one (just changing the names). Unfortunately scons gave this error : /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::dynamic_cast_tag) [with Y = IGeom, T = CylScGeom6D]': /usr/include/boost/smart_ptr/shared_ptr.hpp:522: instantiated from 'boost::shared_ptr<X> boost::dynamic_pointer_cast(const boost::shared_ptr<U>&) [with T = CylScGeom6D, U = IGeom]' /home/francoisk/build-trunk/include/yade/pkg/dem/CohesiveFrictionalContactLaw.hpp:81: instantiated from here /usr/include/boost/smart_ptr/shared_ptr.hpp:259: error: cannot dynamic_cast 'r->boost::shared_ptr<IGeom>::px' (of type 'class IGeom* const') to type 'struct CylScGeom6D*' (target is not pointer or reference to complete type) Where CohesiveFrictionalContactLaw.hpp:81 is : FUNCTOR2D(CylScGeom6D,CohFrictPhys); I checked the YADE_PLUGIN, FUNCTOR2D, YADE_CLASS_BASE_DOC_ATTRS and REGISTER_SERIALIZABLE stuffs. Do you know why I have this error, and maybe how can I solve it ? Tx -- You received this question notification because you are a member of yade-users, which is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp