← Back to team overview

yade-dev team mailing list archive

Re: data members in an EngineUnit

 

Bruno Chareyre said:     (by the date of Mon, 19 Mar 2007 16:03:05 +0100)

> Hello again
> 
> I add a data member (double InteractionDetectionFactor) to 
> InteractingSphere2InteractingSphere4SpheresContactGeometry in the last 
> commit.
> Now I realise that this there is no way to set this parameter to a value 
> since this engine is not instanciated explicitly in the preprocessor...
> Is there a simple way to do that? Make the engine a "standalone" rather 
> than "engine unit"?


Sorry for very late reply . I'm sure that you already figured that
out. The solution is very simple - use REGISTER_ATTRIBUTE in your
engine unit. Make an extra variable in the FileGenerator, and when
creating actors assign 

EngineUnit->yourVariable=extraVariable;

It works just like actionForceDamping (the damping value is a parameter of EnginneUnit):

shared_ptr<CundallNonViscousForceDamping> actionForceDamping(new CundallNonViscousForceDamping);
actionForceDamping->damping = dampingForce;
actionDampingDispatcher->add("Force","RigidBodyParameters","CundallNonViscousForceDamping",actionForceDamping);


Well, better answer late than never.

BTW, Bruno - I am wondering why you did unsubscribe from yade-commits?

-- 
# Janek Kozicki
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



References