Skip to contents

Simulate a system over a series of times, returning an array of output. This output can be quite large, so you may filter states according to some index.

Usage

dust_system_simulate(sys, times, index_state = NULL)

Arguments

sys

A dust_system object

times

A vector of times. They must be increasing, and the first time must be no less than the current system time (as reported by dust_system_time). If your system is discrete, then times must align to the dt used when creating the system.

index_state

An optional index of states to extract. If given, then we subset the system state on return. You can use this to return fewer system states than the system ran with, to reorder states, or to name them on exit (names present on the index will be copied into the rownames of the returned array).

Value

An array with 3 dimensions (state x particle x time) or 4 dimensions (state x particle x group x time) for a grouped system.