# How to use "delta\_sph" as the density diffusion method

**URL:** <https://gpusph.discourse.group/t/how-to-use-delta-sph-as-the-density-diffusion-method/216>\
**Category:** Uncategorized\
**Created:** [November 8, 2024, 2:00pm UTC](https://gpusph.discourse.group/t/how-to-use-delta-sph-as-the-density-diffusion-method/216 "2024-11-08T14:00:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlirezaZarei](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@AlirezaZarei](https://gpusph.discourse.group/u/AlirezaZarei)\
**Post date:** [November 8, 2024, 2:00pm UTC](https://gpusph.discourse.group/t/how-to-use-delta-sph-as-the-density-diffusion-method/216/1 "2024-11-08T14:00:37Z")

</div>

Hi Giuseppe,  
I hope all is well with you.

I’m trying to use “delta\_sph” as the density diffusion method for a case to compare it with the Colagrossi method. However, when I use `const DensityDiffusionType rhodiff = get_option("density-diffusion", DELTA_SPH);`, I get an error indicating that `DELTA_SPH` is not recognized as a valid density diffusion method.

Do you know how I can resolve this issue?

Best regards,  
Alireza

---

<div class="post-metadata">

**Author:** ![giuseppe.bilotta](https://yyz2.discourse-cdn.com/free1/user_avatar/gpusph.discourse.group/giuseppe.bilotta/32/72_2.png) [@giuseppe.bilotta](https://gpusph.discourse.group/u/giuseppe.bilotta)\
**Post date:** [November 12, 2024, 7:01am UTC](https://gpusph.discourse.group/t/how-to-use-delta-sph-as-the-density-diffusion-method/216/2 "2024-11-12T07:01:30Z")

</div>

Hi @AlirezaZarei, I can’t reproduce the issue here.

(The test I’ve made is to replace `ANTUONO` with `DELTA_SPH` in the `SlidingWedge` test-case, it still compiles.)

Are you perhaps on an older branch?

---

<div class="post-metadata">

**Author:** ![AlirezaZarei](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@AlirezaZarei](https://gpusph.discourse.group/u/AlirezaZarei)\
**Post date:** [December 20, 2024, 6:16am UTC](https://gpusph.discourse.group/t/how-to-use-delta-sph-as-the-density-diffusion-method/216/3 "2024-12-20T06:16:07Z")

</div>

Thank You!  
I tried changing the density diffusion option through the `.slurm` file without modifying the `.cu` file, but it didn’t work. However, when I updated the density diffusion option directly in the `.cu` file to “DELTA\_SPH,” it worked, and I didn’t encounter the issue.

Best,  
Alireza
