In Version 11.0, it appears that one cannot plot over a mesh. The following code worked in Version 10.2:
$Version
<< NDSolve`FEM`
reg = Rectangle[];
mesh = ToElementMesh[reg];
Plot3D[x^2 + y^2, Element[{x,y}, mesh]]
11.0.1 for Microsoft Windows (64-bit) (September 20, 2016)
Plot3D::idomdim: {x,y} ∈ mesh does not have a valid dimension as a plotting domain.
Of course I could have used Element[{x,y}, reg]
as the plotting domain in this example, but I am working with a complicated mesh built from a BoundaryMesh rather than a region.
Similar behaviour has been observed in (144610) but this was not the question (and it was only an issue for the answerer zhk, who must have been using a different version of Mathematica to the OP).
MeshRegion
andBoundaryMeshRegion
. $\endgroup$ – Henrik Schumacher Aug 6 '18 at 6:33mesh
is anNDSolve`FEM`ElementMesh
a different creature entirely, and wasn't completely supported in viz functions in 11.0. But, it works fine in 11.1. you need to convert to aMeshRegion
viaMeshRegion@mesh
, but the results are "interesting" in 11.0. $\endgroup$ – rcollyer Aug 6 '18 at 15:22