Resolve "(LearnerND) allow any convex hull as domain"
Closes #114 (closed)
Works especially well when combined with !124 (merged)
usage:
import scipy
import adaptive
adaptive.notebook_extension()
def f(xyz):
x, y, z = xyz
return x**4 + y**4 + z**4 - (x**2+y**2+z**2)**2
b = [(-1, -1, -1),
(-1, 1, -1),
(-1, -1, 1),
(-1, 1, 1),
( 1, 1, -1),
( 1, -1, -1)]
bounds = scipy.spatial.ConvexHull(b)
learner = adaptive.LearnerND(f, bounds)
runner = adaptive.Runner(learner, goal=lambda l:l.npoints>1000)
runner.live_info()
Now, if you indeed also have !124 (merged) at your disposal, you are able to run something like this:
learner.plot_isosurface(-0.5)
in order to get this:
otherwise you could run:
learner.plot_slice({1:0})
to get this:
Edited by Jorn Hoofwijk