Class SystemState

Class representing the state of a System made up of nGroups groups with nParticles particles in each group, where each particle contains nStateElements numeric values.

Constructors

  • Parameters

    • nGroups: number

      The number of groups in the state where each group shares model parameter values

    • nParticles: number

      The number of particles in each group

    • nStateElements: number

      The number of numeric state values in each particle

    Returns SystemState

Accessors

  • get nGroups(): number

    The number of groups in the system

    Returns number

  • get nParticles(): number

    The number of particles per group in the system

    Returns number

  • get nStateElements(): number

    The number of numeric state values in each particle in the system

    Returns number

Methods

  • Returns a slice of the underlying state which is a view of a particular group and particle

    Parameters

    • iGroup: number

      The group index to get

    • iParticle: number

      The particle index to get

    Returns ParticleState

  • Apply a reordering to the particles in every group according to a reordering parameter which defines a new order for each group.

    Parameters

    • reordering: NdArray

      NdArray whose first dimension defines group index and whose second dimension defines a new order of particles for each group. For example, if this state has three particles per group, a reordering of [2, 0, 1] for any group would imply that its current third particle should be reordered to the first position, its current first particle to the second position, and its current second particle to the third position. Reordering can also perform filtering and duplication i.e. indexes between 0 and nParticles - 1 may be repeated or omitted in the reordering.

    Returns void

  • Updates the underlying state with the given values for a particular particle

    Parameters

    • iGroup: number

      The group index to set values for

    • iParticle: number

      The particle index to set values for

    • values: number[]

      The values to set in the underlying state

    Returns void