Evaluate_basis() gives strange results

I think what’s going on here is that you’re supposed to pass an element-local index (so, for a CG1 triangle, in the range 0–2) for the first argument to elements.evaluate_basis, but you’re passing global DoF indices. If I change dof[0] to 0 and print separators between points, you can see that you get multiple colliding elements with basis functions evaluating to 1 or (machine) zero at the first and last point (since they line up with mesh vertices), but, at each of the intermediate points, one colliding element is found, and the 0^\text{th} basis function evaluates to something between zero and one, as expected.

1 Like