# Mutation of integrator

**URL:** <https://discourse.julialang.org/t/mutation-of-integrator/60545>\
**Category:** Modelling & Simulations\
**Created:** [May 4, 2021, 8:42pm UTC](https://discourse.julialang.org/t/mutation-of-integrator/60545 "2021-05-04T20:42:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregstrq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregstrq/32/20620_2.png) [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Post date:** [May 4, 2021, 8:42pm UTC](https://discourse.julialang.org/t/mutation-of-integrator/60545/1 "2021-05-04T20:42:58Z")

</div>

Suppose that I use an explicit scheme with fixed time-stepping to integrate an ODE, and I am not interested in interpolations of any sort.

Is it ok to change directly the right-hand-side function `f`, the state `u` and the time `t` in between the steps (provided that I use low-level integrator interface)?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [May 5, 2021, 6:33am UTC](https://discourse.julialang.org/t/mutation-of-integrator/60545/2 "2021-05-05T06:33:19Z")

</div>

> [@Gregstrq](#):
>
> Is it ok to change directly the right-hand-side function `f` , the state `u` and the time `t` in between the steps (provided that I use low-level integrator interface)?

Yup, if you don’t care about the interpolations then this should be good. Set `u_modified!(integrator,true)` when you do so that way it knows the recompute a few things.
