Reaction-diffusion simulation script¶
- class strengths.RDScript(system, t_sample, time_step=0.001, t_max='default', sampling_policy='on_t_sample', sampling_interval=1, rng_seed=None, units_system=<strengths.units.UnitsSystem object>)¶
Class that gather simulation parameters. Each argument sets the property with the same name. Default values are :
time_step : 1e-3,
t_max : “default”,
sampling_policy : “on_t_sample”,
sampling_interval : 1,
rng_seed : None,
units_system : UnitsSystem()
- copy()¶
Returns a deep copy of the object.
- property rng_seed¶
Seed to be used for the engine’s pseudo random number generator, if any.
- property sampling_interval¶
In-simulation time interval at which the system state should be sampled, if the sampling policy is “on_interval”.
- property sampling_policy¶
String specifying how sampling should be handled by the simulation engine. accepted sampling policies are :
“on_t_sample” : (default) sampling is done accorging to t_sample (as close as possible).
“on_iteration” : sampling is done at t=0, then at every iteration.
“on_interval” : sampling is done at t=0, then at the given time interval.
“no_sampling” : no sampling is managed by the engine. the sample() method should be used for manual sampling.
- property system¶
reaction diffusion system of which the time trajectory should be simulated.
- property t_max¶
Time at which the simulation should stop. if set to “default”, t_max will be the last element of t_sample.
- property t_sample¶
Expected sampling times (used if sampling_policy==”on_t_sample”).
- property time_step¶
Time step to be used, if necessary.
- property units_system¶
Default units system to be used for numerical inputs. This is also the units system in which the system trajectory (sampled states and times) will be expressed.
- strengths.rdscript_from_dict(d, base_path=None)¶
Creates a RDScript object from a dictionary.
- strengths.rdscript_to_dict(script)¶
Creates a dictionary from a RDScript object.
- strengths.load_rdscript(path)¶
Loads a RDScript object from a JSON file.
- strengths.save_rdscript(script)¶
Saves a RDScript object as a JSON file.