Thank you so much Christoph !
In fact there are not intersections between the inclusions, about the use of min/max operators, should interpolate the built-in coefficient functions x,y to be able to apply the min() for example ? sorry but is not too clear for me how to implement what you suggest I was thinking in something like:
Code:
f = 0.2;
n = 2;
Vt = 1;
r = sqrt(f/(n*pi));
centers = np.array([[-0.25,0],[0.25,0]])
el = centers.shape
for i in range(el[0]):
levelseti = np.append(levelset, (sqrt((x-centers[i,0])**2+(y-centers[i,1])**2) - r))
levelset = min(levelseti[i] for i in range(len(levelseti)))
but it gives the following error: TypeError: '<' not supported between instances of 'ngsolve.fem.CoefficientFunction' and 'int'
I've tried like below too:
Code:
lsetp1 = GridFunction(H1(mesh,order=1))
for i in range(len(levelseti)):
InterpolateToP1(levelseti[i],lsetp1)
Draw(lsetp1,mesh,"lsetp1")
SetVisualization(min=0,max=0)
Redraw()
but the interpolation is superposed in the GridFunctionn then it gives no error but is drawing just the last levelset.
Thanks by advance for your advise !
best regards
Camilo.