idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.76k stars 1.05k forks source link

Error with AuxKernel #9257

Open jasondhales opened 7 years ago

jasondhales commented 7 years ago

Description of the enhancement or error report

If you under integrate the elements and use high-order AuxVars, the code will die with

Error! Can only use Cholesky decomposition with symmetric positive definite matrices.

followed by a stack trace. There is a comment in the code that the mass (?) matrix is always SPD, which is not the case. See lines 245-247 in AuxKernel.C.

Rationale for the enhancement or information for reproducing the error

A more helpful error message explaining the restriction, or a different approach, will help users understand what is happening.

Identified impact

Improved user experience.

permcody commented 7 years ago

@YaqiWang originally contributed this code to allow for higher order shape functions several years ago. He may not have thought about the use case you are after now. Perhaps he can shed some light on this?

@jasondhales - Do you know what modifications you'd like to make? Perhaps we can just try them and see if your use case can also be supported.

jasondhales commented 7 years ago

Obviously if the AuxVar can be computed when under integrating, that would be the way to go. If not, a better error message would be helpful. I don't have anything specific in mind.

YaqiWang commented 7 years ago

No I didn't. Is it possible for moose to take over the error handling from libmesh in the function call? Keep in mind that Cholesky decomposition may not be the best option. This could be an optimization spot. For example we may have an inline LU because mass matrix is typically well behaved.

permcody commented 7 years ago

No I didn't. Is it possible for moose to take over the error handling from libmesh in the function call?

In general, no. We'd need libMesh to throw exceptions instead of just calling libMesh error. I believe that Roy would be open to this but perhaps there's something we can do on the MOOSE side before making one of these calls (i.e. checking for SPD, or as @YaqiWang - optimizing specific cases).