# Updating the solution array on fly

**URL:** <https://pyfr.discourse.group/t/updating-the-solution-array-on-fly/1255>\
**Category:** Development\
**Created:** [28 April 2025 13:45 UTC](https://pyfr.discourse.group/t/updating-the-solution-array-on-fly/1255 "2025-04-28T13:45:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhenyang](https://avatars.discourse-cdn.com/v4/letter/z/ec9cab/32.png) [@Zhenyang](https://pyfr.discourse.group/u/Zhenyang)\
**Post date:** [28 April 2025 13:45 UTC](https://pyfr.discourse.group/t/updating-the-solution-array-on-fly/1255/1 "2025-04-28T13:45:25Z")

</div>

Hi,

I want to update my solution array scal\_upt while running. My scal\_upts in copied to host to do some operations, and then I want to send it back to device to replace the array scal\_upt on the device end. Is there any existing way to do that? Or I need to treat this updated array as an external array and update scal\_upts pointwisely?

Regards,  
Zhenyang

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [28 April 2025 16:06 UTC](https://pyfr.discourse.group/t/updating-the-solution-array-on-fly/1255/2 "2025-04-28T16:06:50Z")

</div>

You should just need to call the `.set()` method on the array which is marked as containing the current solution (`self._idxcurr`).

Regards, Freddie.
