MCPcopy Create free account
hub / github.com/NanoComp/meep / before_time

Function before_time

python/simulation.py:5179–5188  ·  view source on GitHub ↗

Given zero or more step functions, evaluates them only for times before a $T$ time units have elapsed from the start of the run.

(t, *step_funcs)

Source from the content-addressed store, hash-verified

5177
5178
5179def before_time(t, *step_funcs):
5180 """
5181 Given zero or more step functions, evaluates them only for times before a $T$ time
5182 units have elapsed from the start of the run.
5183 """
5184
5185 def _before_t(sim):
5186 return sim.round_time() < t
5187
5188 return _when_true_funcs(_before_t, *step_funcs)
5189
5190
5191def during_sources(*step_funcs):

Callers

nothing calls this directly

Calls 1

_when_true_funcsFunction · 0.85

Tested by

no test coverage detected