There are a few things to be said here. First, it should not crash and a future version will behave better in this scenario. What I am not quite sure abuot is why the call ToElementMesh[DiscretizeRegion[...]]
in the first place. Note that both
mesh = ToElementMesh[\[CapitalOmega]];
and
DiscretizeRegion[\[CapitalOmega]];
work fine. In your example you first make a mesh region and then remesh to make an ElementMesh
. (Since DiscretizeRegion
will return a first odrer mesh ToEM[DR[...]]
will (should) return a first order mesh. You can get that diretly with ToElementMesh[region, "MeshOrder"->1]
. Additionally, the quality of the mesh will not be as good as it could be since ToEM
has no way of knowing what the exact boundary is in ToEM[DR[...]]
)
Now for the real problem: When you do a direct conversion from the mesh region to an element mesh via you get a message:
mr = DiscretizeRegion[\[CapitalOmega]];
mr["MakeRepresentation"["ElementMesh"]]
ElementMesh::femimq: "The element mesh has insufficient quality of -0.0124712. A quality estimate below 0. may be caused by a wrong ordering of element incidents or self-intersecting elements."
So the mesh region has bad elements. This is fixed in the development version. It might be good to have this message also in the ToElementMesh[DiscretizeRegion[...]]
case such that one knows that the returned element mesh is wonky.
Another note, ploting a "Wireframe" should work in many cases - even if the mesh quality is less then zero. The reason for that is that then one can still look at the mesh and possibly find the bad elements. While this may not be possible in this case, it's useful for smaller meshes.
ToElementMesh
completes evaluation with theBall[]
example, theElementMesh
object that it returns is still wonky: if I try and extract any of its properties, it returns:ElementMesh::noinfo: Input expression ElementMesh[{{-0.999955,0.999955},{-1.,1.},{-1.,1.}},{TetrahedronElement[<8343>]}] contains insufficient information to interpret the result. >>
. Is that the same for you? $\endgroup$ – MarcoB Jun 9 '15 at 18:11ElementMesh
which can be displayed usingmesh["Wireframe"]
$\endgroup$ – RunnyKine Jun 9 '15 at 18:13ElementMesh
object returned byToElementMesh
. Apparently one can't do that without assigning it to a variable first. I didn't know that. Now that I do, I've gone back to your own originalOmega
region: even though I still obtain that error I mentioned, I can extract all properties from it just fine. I guess this means that whatever was wrong in v. 10.0.2 has been at least partially fixed in v. 10.1 . Sorry for the confusion! $\endgroup$ – MarcoB Jun 9 '15 at 18:21