Closed clarkpede closed 6 years ago
As for the question I raised, Dr. Alonso mentioned the problem in an email he sent me. He said, "We used [grid adaptation] successfully in tetrahedral meshes, but I do not believe the hexahedral adaptation was ever fully functional."
That matches my experience with a few tests I ran. After playing around a little, it seems like adaptivity for hexahedra was only partially finished. Many sections of the are implemented, but there seem to be both bugs and unfinished implementation.
I've encountered a bug where SU2 will get stuck in an infinite loop. I've been trying out the grid adaptation code recently. Tets, rectangles, and triangles all worked fine, but hexahedra threw the code into an infinite loop. Basically, the code is missing the proper code for hexahedra in the
CGridAdaptation::SetSensorElem
function.I've attached the offending lines 3640-3653 of
Common/src/grid_adaptation_structure.cpp
below:As you can see, if all of the elements are hexahedral, the threshold will keep decreasing but
nElem_real
will never increase, and the loop will never end.This is an easy fix, and I've already fixed it on a local branch. But I'm also wondering why grid adaptation doesn't work for hexahedra. It's not just this section of code that doesn't work. There's other sections too. One of the biggest ones is at lines 2369-2386 of
Common/src/grid_adaptation_structure.cpp
. In that section, all hexahedra are explicitly removed from the grid adaptivity process.This is rather confusing, because there is a lot of code in the CGridAdaptation class that is set up for adaptation of hexahedra. The AIAA paper from 2013 even dedicates a whole paragraph to explaining the hexahedral grid adaptation. I understand that a pure hex grid can be a poor case for adaptive grid refinement, but I would like to try the grid adaptivity on a hybrid mesh (with hexes and tets).
Is there some reason that grid adaptivity for hexahedra is "turned off"?