## [Libmesh-devel] Problem with 3D cubic Hierarchics?

 [Libmesh-devel] Problem with 3D cubic Hierarchics? From: Roy Stogner - 2005-10-05 22:46:00 ```While trying to debug the 3D version of my divergence-free flows code, I wanted to find out why a complicated residual integral was turning out to be significantly non-zero instead of within roundoff error. It occurred to me that on a single hex element the Hierarchic elements span the exact same space as the Hermites. So, I switched element types, reran the code... and suddenly I was getting a non-invertible Jacobian, too. Long story short, even after stripping the Jacobian down to an L2 projection matrix, the PETSc LU solver was still running into zero pivots. Using the same code with 2D cubic or 3D quadratic/linear Hierarchic elements works fine, so I suspect there's something wrong with the 3D Hierarchic shape functions. The HIERARCHIC/HEX27/THIRD specialization of shape() depends on three long arrays of magic numbers. Is the original author out there to help me bughunt? --- Roy ```

 [Libmesh-devel] Problem with 3D cubic Hierarchics? From: Roy Stogner - 2005-10-05 22:46:00 ```While trying to debug the 3D version of my divergence-free flows code, I wanted to find out why a complicated residual integral was turning out to be significantly non-zero instead of within roundoff error. It occurred to me that on a single hex element the Hierarchic elements span the exact same space as the Hermites. So, I switched element types, reran the code... and suddenly I was getting a non-invertible Jacobian, too. Long story short, even after stripping the Jacobian down to an L2 projection matrix, the PETSc LU solver was still running into zero pivots. Using the same code with 2D cubic or 3D quadratic/linear Hierarchic elements works fine, so I suspect there's something wrong with the 3D Hierarchic shape functions. The HIERARCHIC/HEX27/THIRD specialization of shape() depends on three long arrays of magic numbers. Is the original author out there to help me bughunt? --- Roy ```
 Re: [Libmesh-devel] Problem with 3D cubic Hierarchics? From: Roy Stogner - 2005-10-05 23:37:26 ```On Wed, 5 Oct 2005, Roy Stogner wrote: > The HIERARCHIC/HEX27/THIRD specialization of shape() depends on three > long arrays of magic numbers. Is the original author out there to > help me bughunt? This may be a false alarm - after investigating the arrays of magic numbers I'm becoming convinced that the bug is in my code after all. No need to start poring through fe_hierarchic_shape_etc yet. --- Roy ```
 Re: [Libmesh-devel] Problem with 3D cubic Hierarchics? From: Roy Stogner - 2005-10-06 19:02:55 ```On Wed, 5 Oct 2005, Roy Stogner wrote: > On Wed, 5 Oct 2005, Roy Stogner wrote: > >> The HIERARCHIC/HEX27/THIRD specialization of shape() depends on three >> long arrays of magic numbers. Is the original author out there to >> help me bughunt? > > This may be a false alarm - after investigating the arrays of magic > numbers I'm becoming convinced that the bug is in my code after all. > No need to start poring through fe_hierarchic_shape_etc yet. Okay, time to pore through fe_hierarchic_shape_3D. On a simple one-cube mesh, shape functions index 2 and 3 were evaluating identically, and so giving identical rows in a mass matrix. It appears that the edge orientation tests which should have only applied to edge DoFs were being applied to vertex DoFs as well, so I've checked in a 2 line fix that should correct that. It seems to pass my simple tests now, but I'd appreciate others taking a look. --- Roy ```