← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 2314: making TriaxialStressController more python friendly.

 

Janek, I think it is a bad idea to put an example usage into the commit
message.
Who can find it then?

This commit message should contain a short description of done changes, but
not examples.

Thanks for contribution.


2010/7/4 <noreply@xxxxxxxxxxxxx>

> ------------------------------------------------------------
> revno: 2314
> committer: Janek Kozicki <cosurgi@xxxxxxxxxx>
> branch nick: trunk
> timestamp: Sun 2010-07-04 20:18:21 +0200
> message:
>  making TriaxialStressController more python friendly.
>
>  Following is the example of what was my intention::
>
>
>  #!/usr/local/bin/yade-trunk -x
>
>  TriaxialTest(numberOfGrains=200).load()
>  O.engines += [PeriodicPythonRunner(iterPeriod=10,command='plot1()')]
>
>
>  triaxialStressController=O.engines[5]
>
>  def sigma_1():
>        return triaxialStressController.wall_stress[1]
>
>  def epsilon_1():
>        return triaxialStressController.strain[1]
>
>
>  from yade import qt
>  qt.View()
>  qt.Controller()
>
>
>  # plot some results
>  from math import *
>  from yade import plot
>  plot.plots={'epsilon_1':'sigma_1'}
>  def plot1():
>        plot.addData(sigma_1=sigma_1(),
>                     epsilon_1=epsilon_1())
>  O.run(10000,True)
>  plot.plot()
> modified:
>  pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp
>  pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp
>
>

Follow ups

References