Skip to content

Commit

Permalink
Add other error checks to see if that works.
Browse files Browse the repository at this point in the history
  • Loading branch information
ttruster committed Jan 11, 2023
1 parent 309881a commit 54f3d3a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions framework/src/kernels/ADKernelScalarBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ ADKernelScalarBase::computeJacobian()
{
ADKernel::computeJacobian();

#ifndef MOOSE_SPARSE_AD
mooseError("ADKernelScalarBase assembly only supported for non-sparse AD");
#else
if (_use_scalar)
{
computeScalarResidualsForJacobian();
Expand All @@ -86,6 +89,7 @@ ADKernelScalarBase::computeJacobian()
_matrix_tags,
_kappa_var_ptr->scalingFactor());
}
#endif
}

void
Expand All @@ -106,6 +110,9 @@ ADKernelScalarBase::computeResidualAndJacobian()
{
ADKernel::computeResidualAndJacobian();

#ifndef MOOSE_SPARSE_AD
mooseError("ADKernelScalarBase assembly only supported for non-sparse AD");
#else
if (_use_scalar)
{
computeScalarResidualsForJacobian();
Expand All @@ -115,6 +122,7 @@ ADKernelScalarBase::computeResidualAndJacobian()
_matrix_tags,
_kappa_var_ptr->scalingFactor());
}
#endif
}

void
Expand Down

0 comments on commit 54f3d3a

Please sign in to comment.