# Domain dependent parameter

**URL:** <https://community.freefem.org/t/domain-dependent-parameter/3817>\
**Category:** General Discussion\
**Created:** [March 21, 2025, 4:59pm UTC](https://community.freefem.org/t/domain-dependent-parameter/3817 "2025-03-21T16:59:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hemanta822](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/hemanta822/32/2596_2.png) [@Hemanta822](https://community.freefem.org/u/Hemanta822)\
**Post date:** [March 21, 2025, 4:59pm UTC](https://community.freefem.org/t/domain-dependent-parameter/3817/1 "2025-03-21T16:59:15Z")

</div>

Hi All,

I was trying to impose domain dependent parameter. I have domain [0,2]\times[0,2] and a subdomain [0,1]\times[0,1]. I want to use `nu = 20` in my subdomain (INCLUDING BOUNDARY WHERE x = 1 or y = 1) and use `nu = 10` in the complement part of the subdomain. I am using:

```auto
real nup1 = 20;
real nus1 = 10;
func nus = (x >= 0 && x <= 1 && y >= 0 && y <= 1) ? nup1 : nus1;

```

But interestingly, some of the part of the boundary of the subdomain have values I expect to see in the complement domain. Please see the following mesh diagram.

 ![nus](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/4/4f56f4c1f8a5f29b06bfdbe8da83b322b1ff0d40.png)

This becomes more clear for another larger value parameter  
lambda (see the following figure).

 ![lambdas](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/5/51745475b4f3eeefab0b268ff6f7c718dd2dfb5c.png)

I thought this was interesting to share. I would greatly appreciate any feedback. Thank you.

Best,  
Hemanta

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [March 21, 2025, 5:06pm UTC](https://community.freefem.org/t/domain-dependent-parameter/3817/2 "2025-03-21T17:06:19Z")

</div>

Just use `func nus = (x >= 0 && x <= 1+eps && y >= 0 && y <= 1+eps) ? nup1 : nus1;`

---

<div class="post-metadata">

**Author:** ![Hemanta822](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/hemanta822/32/2596_2.png) [@Hemanta822](https://community.freefem.org/u/Hemanta822)\
**Post date:** [March 21, 2025, 5:19pm UTC](https://community.freefem.org/t/domain-dependent-parameter/3817/3 "2025-03-21T17:19:14Z")

</div>

That helps! Thank you! 🙂
