Skip to content

Commit

Permalink
Merge pull request #27287 from roystgnr/cast_check
Browse files Browse the repository at this point in the history
Check whether `_eigen_sys` was cast successfully
  • Loading branch information
roystgnr authored Apr 4, 2024
2 parents a747086 + 741e790 commit bfbeaaf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions framework/src/kernels/EigenKernel.C
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ EigenKernel::enabled() const
bool flag = MooseObject::enabled();
if (_eigen)
{
if (!_eigen_sys)
mooseError("Eigen kernel ",
name(),
" requires a MooseEigenSystem and was designed to work with old eigenvalue",
" executioners such as 'NonlinearEigen'. It is suggested to use the new",
" eigenvalue executioner 'Eigenvalue' along with kernel tagging");

if (_is_implicit)
return flag && (!_eigen_sys->activeOnOld());
else
Expand Down

0 comments on commit bfbeaaf

Please sign in to comment.