← Back to team overview

yade-users team mailing list archive

Re: Storing variables with python

 

> Exactly! Thanks for suggestions! I will do as you say. Chiara 
I though of a simpler way now:

O.engines=[
	PeriodicPythonRunner(command='addPlotData',label='myRecorder') # do not specify any periods, the engine will be therefore inactive
]

def addPlotData:
	if myRecorder.iterPeriod==0:          # this is the default initial value
		if chiaraCondition: myRecorder.iterPeriod=100 # or other number
		else: return
	plot.addData(...)

HTH, Vaclav






Follow ups

References