yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #00986
How to communicate between two independent Engines
Hi, all:
I am recently having such kind of problem, I have two costomized engines, one is called "ConvergenceEstimator", which is used to evaluate some maximumUnBalanceForce over the contactForce ratio (this will return a CCValue to evaluate whether the whole particle system is close to equilibrium), then I have another engine "DampingAdjustment" designed to change the initial simulation parameter, in my case, the damping coefficient, for example, from 0.3 to 0.4.
I have one piece of code in the preprocessor (similar to SDECSpheresPlane) which looks like this:
///--------------------
...
rootBody->engines.push_back(ConvergenceEstimator);
rootBody->engines.push_back(DampingAdjustment);
///--------------------
This means my DampingAdjustment Engine needs the return values of the previous engine, I need to have something in DampingAdjustment like(I think should be in DampingAdjustment::applyCondition(Body* body)):
if (convergenceEstimator->getCCVaue() <=eps)
dampingCoefficient = 0.3;
else
dampingCoefficient =0.5;
I think this is purely a programming problem, how to access the ConvergenceEstimator which is the other engine?
I hope I have made my problem clear. Thank you very much!
Feng Chen
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users
Follow ups
References