# Solving diffusion equation on mesh with multiple sub-regions

**URL:** <https://community.freefem.org/t/solving-diffusion-equation-on-mesh-with-multiple-sub-regions/2954>\
**Category:** General Discussion\
**Created:** [February 9, 2024, 11:24pm UTC](https://community.freefem.org/t/solving-diffusion-equation-on-mesh-with-multiple-sub-regions/2954 "2024-02-09T23:24:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [February 10, 2024, 11:36am UTC](https://community.freefem.org/t/solving-diffusion-equation-on-mesh-with-multiple-sub-regions/2954/3 "2024-02-10T11:36:05Z")

</div>

Its only natural when the mesh ends 🙂 As you are trying to get J.N to zero you  
could also set D to zero [edit lol] there. Preventing flow across the border just applies to  
normal component.  
See if this helps, I was going to test it first but apparently my FF doesn’t support  
mmg2d and I didn’t have time to change it 🙂

[https://community.freefem.org/t/normal-boundary-condition/341](https://community.freefem.org/t/normal-boundary-condition/341)

---

_[View the full topic](https://community.freefem.org/t/solving-diffusion-equation-on-mesh-with-multiple-sub-regions/2954)._
