Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amortized Heun history & coupling #558

Open
maedoc opened this issue Apr 29, 2022 · 0 comments
Open

Amortized Heun history & coupling #558

maedoc opened this issue Apr 29, 2022 · 0 comments
Labels
area/scilib enhancement New feature or request

Comments

@maedoc
Copy link
Member

maedoc commented Apr 29, 2022

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.

@maedoc maedoc added enhancement New feature or request area/scilib labels Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scilib enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant