Skip to content

Forcing solver to stay in given region #200

Description

@grfrederic

I'm solving a system of ODEs that simulates concentrations of some substances. I know that the concentrations have to be real numbers in the range [0, 1]. Normally, after each step, I would simply clamp the values to be in that region (since values outside of that range can mess with the simulation). Is there a way to achieve this nicely with diffrax?

I'm trying out a pretty wide range of parameters (since I'm using the simulations for MCMC), so ramping up the accuracy and step sizes to handle the outliers seems wasteful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions