Table of Contents

StopCriterion

Introduction

The stop criterion allows to stop a computation when a given criterion becomes greater than a given value.

It is useful to avoid consuming CPU time when a computation has no meaning anymore, or to chain operations (remeshing, chained operation based on a criterion, …)

While stopping cleanly the computation, a fac is written at the stop time, the ValuesManager is properly closed and the ascii export is done.

General Commands

For a given criterion (crit) (see below),

The criterion is finally added in the Metafor object :

        crit.setStopValue(value)    # (default : 0.0)        
        crit.setWriteTSC(True)      # (default : True)
        crit.setRunObjFuncSet(True) # (default : True)
        crit.setStopAtNextFac(True) # (default : False)
        crit.setCheckAtFac(True)       # (default : False)
        metafor.setStopCriterion(crit)

TimeStopCriterion

If you want to stop a model at given times :

ValueExtractorStopCriterion

If you want do define a given ValueExtractor (possibly with a Vector2ScalarOperator) to stop the computation

ValueManagerStopCriterion

If you want to use a value, which is already extracted in the ValuesManager :