← Back to team overview

yade-users team mailing list archive

Re: [Question #153589]: Adding an IGeomFunctor subclass

 

Question #153589 on Yade changed:
https://answers.launchpad.net/yade/+question/153589

Kneib François gave more information on the question:
Hi

I'm now creating the new Law2 : Law2_CylScGeom6D_CohFrictPhys_CohesionMoment.
For the moment I just copied the Law2_CylScGeom_FrictPhys_CundallStrack one, just changing the 2 lines in the go method :

CylScGeom6D* geom= static_cast<CylScGeom6D*>(ig.get());
CohFrictPhys* phys = static_cast<CohFrictPhys*>(ip.get());

I declared this class and method just like
Law2_CylScGeom_FrictPhys_CundallStrack in the Cylinder.hpp, cpp (and I
didn't forgot the FUNCTOR2D(CylScGeom6D,CohFrictPhys)).

I added some cout<<"test"<<endl; lines to see if the go method is used,
and it appears that even if the contact is a CylScgeom6D - CohFrictPhys
one, it's the Law2_CylScGeom_FrictPhys_CundallStrack::go method who is
used. (I turned the setCohesionOnNewContacts option to True.)

Isn't it weird ?

Here you can see my simple python script and the Cylinder.cpp/hpp files
: http://download.grenoble.cemagref.fr/a3ina

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.