Hello
I want to define a domain that I want to call "domain of interest". This domain includes multiple subdomains. In my case the geometry is kind of complicated. For example please take a look at below image (it is just an example):
The red area is the domain of interest and the white, blue, black and green areas are the subdomains. I can simply define the subdomains (Omega1,Omega2,Omega3,Omega4)
For example:
#Domain 1
class Omega1(SubDomain):
def inside(self, x, on_boundary):
return True if b<x[0]<=(b+d) and 0<=x[1]<=b else False
#Domain 2
class Omega2(SubDomain):
def inside(self, x, on_boundary):
return True if b<x[0]<=(b+d) and b<x[1]<=(b+d) else False
#Domain 3
class Omega3(SubDomain):
def inside(self, x, on_boundary):
return True if 0<=x[0]<=b and b<x[1]<=(b+d) else False
#Domain 4
class Omega4(SubDomain):
def inside(self, x, on_boundary):
return True if b<x[0]<=(b+d) and b<x[1]<=(b+d) else False
I want to define the red area as another subdomain (omega 5) in a way that if the rest of the geometry does not include the Omega1,Omega2,Omega3,Omega4 it is equal to omega5 which is the red area. In other words I do not want to define the geometry mathematically for the red area because it is not that easy.
Does anybody know how I can do that in FEniCS?
Thanks!