# Gradient-based adaptative sampling in NeuralPDE

**URL:** <https://discourse.julialang.org/t/gradient-based-adaptative-sampling-in-neuralpde/119852>\
**Category:** Performance\
**Created:** [September 25, 2024, 10:00am UTC](https://discourse.julialang.org/t/gradient-based-adaptative-sampling-in-neuralpde/119852 "2024-09-25T10:00:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gradureau](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gradureau](https://discourse.julialang.org/u/gradureau)\
**Post date:** [September 25, 2024, 10:00am UTC](https://discourse.julialang.org/t/gradient-based-adaptative-sampling-in-neuralpde/119852/1 "2024-09-25T10:00:55Z")

</div>

Hey everyone,

I am testing NeuralPDE to simulate hydrodynamic shocks and I would like to try the residual/gradient adaptative sampling of data, as described in the article in the following link : [Physics-informed neural networks with residual/gradient-based adaptive sampling methods for solving partial differential equations with sharp solutions | Applied Mathematics and Mechanics](https://link.springer.com/article/10.1007/s10483-023-2994-7).

Is it possible to do this with the current version of NeuralPDE, or to adapt it to make it work?

Thank you for your answers!

---

<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:** [September 25, 2024, 10:15am UTC](https://discourse.julialang.org/t/gradient-based-adaptative-sampling-in-neuralpde/119852/2 "2024-09-25T10:15:53Z")

</div>

That algorithm isn’t currently in there but it could be added. Open an issue.
