Skip to content

Commit

Permalink
Address review comments (idaholab#21009)
Browse files Browse the repository at this point in the history
  • Loading branch information
cticenhour committed May 13, 2022
1 parent 0f0b4e4 commit 1db14d7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions framework/doc/content/source/kernels/CoupledForce.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Description

`CoupledForce` (and the AD version, `ADCoupledForce`) implements a source term within the domain $\Omega$ proportional to a coupled
variable:
`CoupledForce` (and the AD version, `ADCoupledForce`) implements a source term
within the domain $\Omega$ proportional to a coupled variable:
\begin{equation}
\underbrace{-\sigma v}_{\textrm{CoupledForce}} + \sum_{i=1}^n \beta_i = 0 \in \Omega,
\end{equation}
Expand Down
1 change: 0 additions & 1 deletion framework/include/kernels/Reaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
/**
* Implements a simple consuming reaction term with weak form $(\\psi_i, \\lambda u_h)$.
*/

template <bool is_ad>
class ReactionTempl : public GenericKernel<is_ad>
{
Expand Down
3 changes: 2 additions & 1 deletion framework/src/kernels/CoefReaction.C
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ CoefReactionTempl<is_ad>::computeQpJacobian()
{
// This function will never be called for the AD version. But because C++ does
// not support an optional function declaration based on a template parameter,
// we must keep this this template for all cases.
// we must keep this template for all cases.
mooseAssert(!is_ad, "In ADCoefReaction, computeQpJacobian should not be called. Check computeJacobian implementation.");
return _coef * ReactionTempl<is_ad>::computeQpJacobian();
}

Expand Down
3 changes: 2 additions & 1 deletion framework/src/kernels/CoupledForce.C
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ CoupledForceTempl<is_ad>::computeQpOffDiagJacobian(unsigned int jvar)
{
// This function will never be called for the AD version. But because C++ does
// not support an optional function declaration based on a template parameter,
// we must keep this this template for all cases.
// we must keep this template for all cases.
mooseAssert(!is_ad, "In ADCoupledForce, computeQpJacobian should not be called. Check computeJacobian implementation.");
if (jvar == _v_var)
return -_coef * _phi[_j][_qp] * _test[_i][_qp];
return 0.0;
Expand Down
3 changes: 2 additions & 1 deletion framework/src/kernels/Reaction.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ ReactionTempl<is_ad>::computeQpJacobian()
{
// This function will never be called for the AD version. But because C++ does
// not support an optional function declaration based on a template parameter,
// we must keep this this template for all cases.
// we must keep this template for all cases.
mooseAssert(!is_ad, "In ADReaction, computeQpJacobian should not be called. Check computeJacobian implementation.");
return _test[_i][_qp] * _rate * _phi[_j][_qp];
}

Expand Down

0 comments on commit 1db14d7

Please sign in to comment.