finite element method – Can we construct 3D meshes that respect internal boundaries?

In a recent answer to a question on constructing 2D meshes with internal boundaries @user21 provided an extremely useful answer which can be found here.

I have tried to extend this to 3D by constructing a mesh for a Ball with an internal cube, but the mesh that results appears to be only the mesh for the cube.

Can anyone see what I’m doing wrong?

Needs["NDSolve`FEM`"]
ru = RegionUnion[RegionBoundary[Ball[{0, 0, 0}, 10]], Cube[4]];
mesh = ToElementMesh[DiscretizeRegion[ru]]; mesh["Wireframe"]

enter image description here

Read more here: Source link