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

Function _eval_step_func

python/simulation.py:5049–5058  ·  view source on GitHub ↗
(sim, func, todo)

Source from the content-addressed store, hash-verified

5047
5048
5049def _eval_step_func(sim, func, todo):
5050 num_args = get_num_args(func)
5051
5052 if num_args != 1 and num_args != 2:
5053 raise ValueError(f"Step function '{func.__name__}'' requires 1 or 2 arguments")
5054 elif num_args == 1:
5055 if todo == "step":
5056 func(sim)
5057 elif num_args == 2:
5058 func(sim, todo)
5059
5060
5061def _when_true_funcs(cond, *step_funcs):

Callers 15

_run_untilMethod · 0.85
_combineFunction · 0.85
_trueFunction · 0.85
_after_sourcesFunction · 0.85
_after_s_and_tFunction · 0.85
_begFunction · 0.85
_endFunction · 0.85
_everyFunction · 0.85
_at_timeFunction · 0.85
_during_sourcesFunction · 0.85
_in_volumeFunction · 0.85
_to_appendedFunction · 0.85

Calls 1

get_num_argsFunction · 0.85

Tested by

no test coverage detected