Enable Quadratic Elements in NetGenMeshInterface - #4506
Conversation
roystgnr
left a comment
There was a problem hiding this comment.
Are we supporting TET14 here? There's clearly some partial support (which I'd say leave in even if we don't get to total support yet), but it looks to me like we're only handling mid-edge node movement, not mid-face nodes.
If the answer is "yes", could we add a unit test?
If "no", could we take it out of the if() before that libmesh_not_implemented()?
Otherwise this looks great.
|
Ah, yes. I missed the face centroid of TRI7 for TET14, will add it. |
|
Added full TET14 support |
| // NetGen (and volume_to_surface_mesh) can leave gaps in rank 0's | ||
| // element and node id spaces, while broadcast() compacts them on the | ||
| // other ranks. Renumber here -- on every rank, in lockstep -- so all |
There was a problem hiding this comment.
Come again? I'm fine with merging this as-is, since you're just working around this problem, not creating it, but I'd love to know what's happening exactly and get a reproducer. If there's some conditions under which broadcast() does not result in an identical mesh on all ranks, that's a bug, and I want to get that replicated and fixed, not just worked around!
There was a problem hiding this comment.
Thanks, I think we can merge this for now. Here are more details about the issue (testNetGenQuadratic can be a good reproducer at np=2)
- On rank 0,
triangulate()deletes the input surface elements (the octahedron's 8 boundary TRIs) and adds the 4 new TETs.delete_elem()on a ReplicatedMesh leaves null holes in the_elementsstorage vector and does not shrink it, so rank 0 ends up with 4 live elements occupying an id space of size 8 (max_elem_id()=8). broadcast()on the receivers doesmesh.clear()and then unpacks only the live entities, preserving their ids. So rank 1 gets a freshly-rebuilt, compact mesh (max_elem_id()=4).broadcast()'s own postcondition assertsverify(n_elem())/verify(n_nodes()), which hold on both ranks. It does not assertmax_elem_id(), which is why the id-space-size difference slips through.
So the assertion that trips is all_increased_order_range's comm().verify(mesh.max_elem_id())
closes #4505