Solving diffusion equation on mesh with multiple sub-regions

Its only natural when the mesh ends :slight_smile: 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 :slight_smile:

https://community.freefem.org/t/normal-boundary-condition/341