← Back to team overview

yade-dev team mailing list archive

Re: adaptative integration scheme (Burak ER)

 

Dear Bruno, 

Thank you. About your questions, 

-> inheritance from TimeStepper is probably not what you want. TimeStepper is only a class for computing the timestep dt, not to effectively execute the timestepping. Inheriting from it is harmless but it does not make much sense. 
First of all you are right, deriving from TimeStepper makes not much sense, except its name, which, would be a nice name for all kind of time-steppers. Integrator class may be derived from the GlobalEngine directly which will reduce one level of inheritance. 
Also, TimeStepper's name may be changed to "StepSizeEstimator" or something else to prevent confusion. 
-> I am a bit confused by this sentence: "an engine which calls the given list of engines in a sequential order by using the parallel engine functions". Parallel engines are running slaves in parallel but you mention that they are called in a sequential order. Did you really use anything from ParallelEngine? 
Yes, I have used ParallelEngine helper functions in order to create an engine which uses the given list of engines as its slaves, and calls them sequentially. While using the action part of the ParalellEngine, I have removed the nested parallelism , thus, engines in the Integrator are called sequentially, you can see the difference in the system function of the Integrator[1] and the action function of ParallelEngine[2] . 

-> For the consistency of sources formatting in yade, please don't keep blank lines between each lines of codes. 
I will also consider this. 

burak 

[1] https://github.com/yade/trunk/blob/master/pkg/dem/Integrator.cpp#L34-L56 
[2] https://github.com/yade/trunk/blob/master/pkg/common/ParallelEngine.cpp#L14-L29 

----- Original Message -----

From: "Bruno Chareyre" <bruno.chareyre@xxxxxxxxxxx> 
To: yade-dev@xxxxxxxxxxxxxxxxxxx 
Sent: Monday, February 17, 2014 7:05:27 PM 
Subject: Re: [Yade-dev] adaptative integration scheme (Burak ER) 

Dear Burak, 

Nice commit, congrats. 
There are a few things not very clear to me: 
- inheritance from TimeStepper is probably not what you want. TimeStepper is only a class for computing the timestep dt, not to effectively execute the timestepping. Inheriting from it is harmless but it does not make much sense. 
- I am a bit confused by this sentence: "an engine which calls the given list of engines in a sequential order by using the parallel engine functions". Parallel engines are running slaves in parallel but you mention that they are called in a sequential order. Did you really use anything from ParallelEngine? 

For the consistency of sources formatting in yade, please don't keep blank lines between each lines of codes. 

Thanks for the two example scripts and the clear comments. It makes the pull request self consistent. 

Bruno 




On 17/02/14 17:48, Bruno Chareyre wrote: 





forwarding https://github.com/yade/trunk/pull/40 

Bruno 


______ 


Hi Mr. Chareyre/Gladky, 

As we all already discussed at the topic here[1] I have created a general integrator interface for both multistep and single step methods. I think the interface is flexible for the integration purposes. It inherits the TimeStepper class, thus, it is an engine which calls the given list of engines in a sequential order by using the parallel engine functions,. I have also created a sample adaptive integrator using odeint library where the integration is based on Runge Kutta. The class is called RungeKuttaCashKarp45 and can be found at pkg/dem. I have added an example to compare the NewtonIntegrator and RungeKuttaCashKarp45 that is based on the simple-scene example. The result is very good and the computation is fast for this scene with a low number of object. But as I tried on other simulations with many objects in it, the integrator is slow and needs to be improved. 

Here I want you to merge my master branch with the yade master branch. If you find any bugs or want to improve the code you can contact me. 

Thank you in advance. 

Burak ER 

Research Assistant 
Mechanical Engineering Department 
Bursa Technical University 
mail: burak.er@xxxxxxxxxx 
phone:00902243141658 

[1] https://answers.launchpad.net/yade/+question/242646 


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx Unsubscribe : https://launchpad.net/~yade-dev More help   : https://help.launchpad.net/ListHelp 




_______________________________________________ 
Mailing list: https://launchpad.net/~yade-dev 
Post to : yade-dev@xxxxxxxxxxxxxxxxxxx 
Unsubscribe : https://launchpad.net/~yade-dev 
More help : https://help.launchpad.net/ListHelp 



References