Dear all,
So I have been looking at the tutorial about using subdomains and there must be something I do not understand because I have always been doing as follows:
def isInRegion1(x):
return x[1]<0.5e-2
class MyCrossSection(Expression):
def eval(self, value, x):
if isInRegion1(x):
value[0] = sigma_t_1
else:
value[0] = sigma_t_2
def value_shape(self):
return (1,)
Sigma_t = MyCrossSection()
...
a += (Sigma_t[0]+1/(c*dt))*psi*v*dx # some component of the bilinear form
Which seems easier to me to use than subdomains.
So I probably don't get the full potential of using subdomains. Are there cases in which subdomains could help do something that the method above could not?
Thanks a lot!
Vincent