I'm trying to figure out how is possible to solve a Poisson equation
$\nabla\cdot[d(x,y)\nabla u]+1=0$
where $d(x,y)$ equals 1 in one region and 2 in another one. Let say I have homogeneous Dirichlet boundary conditions.
The two regions should be physically distinct, I mean do not use just
d[x_,y_]:=If[x<0.5,1,2]
if x=0.5 is the edge between the two regions.
Thanks for the suggestion(s) F

NDSolve. His solution is to useNDSolve`FEMdirectly to gain better control over the mesh, which I guess is what you'd recommend? – Simon Woods Nov 14 '15 at 13:55{x, y} \[Element] ImplicitRegion[0 <= x <= 1 && 0 <= y <= 1, {x, y}]then the automatic feature detection works. With time more and more regions and triggers should work. – user21 Nov 15 '15 at 07:13