Skip to content

Amortized Heun history & coupling #558

@maedoc

Description

@maedoc

Describe the new feature or enhancement

Large-scale connectivity currently only applies once per time step even in case of Heun or RK4 methods. This is done out of efficiency but is counterproductive because the resulting simulation is less efficient in critical regimes (i.e. much smaller dt is required to produce the correct result). Instead, in the case of Heun or RK4, the coupling scheme should be applied as many times as required for the scheme, i.e. 2x for Heun and 4x for RK4.

Describe your proposed implementation

Much of the cost in computing the time delays is due to random access into history buffer. For higher order schemes, we need at least two time points from history, so both can be fetched at once, such that the afferent coupling term is computed for all steps of the scheme at once in a vectorized fashion.

In terms of functions calls, the coupling call can be moved to the dfun, so that it happens in the same place as the local coupling, but the first call should cache the result for all steps of the scheme and return the relevant one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions