This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Elements in overlap region between two different domains

0 votes

Hello
If we define two different domains with two different material properties, there are some elements in which are in both domains as shown below:

Two domains including inside and outside of the circle:

enter image description here

class Omega1(SubDomain):
  def inside(self, x, on_boundary):
   .
   .
   .
class Omega2(SubDomain):
  def inside(self, x, on_boundary):
   .
   .
   .
domains = CellFunction("size_t", mesh)

I want to know how FEniCS deals with this kind of situation because we have some elements with two different material properties that does not make sense. Could you please clarify it?
Thanks!

asked Feb 22, 2016 by jafar FEniCS Novice (670 points)

2 Answers

0 votes
 
Best answer

There are at least three ways:
1. live with the fact that the subdomain cuts elements. This would be default.
The subdomain is then defined in terms of the quadrature points inside and outside the subdomain. It can also be projected onto a polynomial space. But in any case it would be an approximation.
2. construct meshes that respect the subdomains (can be done in masher,
3. use sophisitcated cut-fem techniques that are being developed now (see e.g.
http://arxiv.org/abs/1505.00372)

answered Feb 23, 2016 by Kent-Andre Mardal FEniCS Expert (14,380 points)
selected Feb 23, 2016 by jafar

That was a comprehensive response.
Thank you!

0 votes

Hi,
You could consider re-meshing that respects the material boundary you want. Mshr lib. included in Fenics could help you.

answered Feb 22, 2016 by petrH FEniCS Novice (580 points)
edited Feb 22, 2016 by petrH

Thanks for your response but it was like a very general comment.
I have written a code that works perfectly. So there should be some kind of approximation between the elements in the overlap region. I want to know how FEniCS handles it.
Does anyone have a better explanation by any chance?

...