CliMA / ClimaTimeSteppers.jl

A CPU- and GPU-friendly package for solving ordinary differential equations
Apache License 2.0
50 stars 5 forks source link

Reformulate `post_explicit!` / `post_implicit!` hooks #322

Open charleskawczynski opened 5 days ago

charleskawczynski commented 5 days ago

There are two fundamental issues with our post_explicit! and post_implicit! hooks:

This is very unfortunate because while the implementation is correct when post_explicit! and post_explicit! point to the same function that precompute all variables, and the change to this implementation allowed us to reduce the number of total precompute calls by 1, it also resulted in us not being able to split these calls, which could have a more significant impact, especially for implicit simulations with multiple newton iterations.

charleskawczynski commented 5 days ago

What I propose we do is: