-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish support for AD time derivatives of dofs #28857
base: next
Are you sure you want to change the base?
Conversation
1bda2b7
to
f5a8d37
Compare
Add a test material to test those refs idaholab#18178
Job Documentation, step Docs: sync website on e71c341 wanted to post the following: View the site here This comment will be updated on new commits. |
… nonAD version) Add support for nodal AD time derivatives, with errors for unsupported cases closes idaholab#28859 refs idaholab#28867
Job Coverage, step Generate coverage on e71c341 wanted to post the following: Framework coverage
Modules coverageCoverage did not change Full coverage reportsReports
Warnings
This comment will be updated on new commits. |
@@ -428,6 +428,11 @@ class MooseVariableData : public MooseVariableDataBase<OutputType> | |||
*/ | |||
const MooseArray<ADReal> & adDofValues() const; | |||
|
|||
/** | |||
* Return the AD time derivative values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Return the AD time derivative values | |
* Return the AD time derivative values of degrees of freedom |
else | ||
{ | ||
if (_c_nodal) | ||
mooseError("AD neighbor nodal dof dot implemented"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mooseError("AD neighbor nodal dof dot implemented"); | |
mooseError("AD neighbor nodal dof dot not implemented"); |
if (_need_ad_u_dot) | ||
{ | ||
if (_time_integrator && _time_integrator->dt()) | ||
{ | ||
_ad_dofs_dot[i] = _ad_dof_values[i]; | ||
_time_integrator->computeADTimeDerivatives(_ad_dofs_dot[i], | ||
_dof_indices[i], | ||
_need_ad_u_dotdot ? _ad_dofs_dotdot[i] | ||
: _ad_real_dummy); | ||
} | ||
// Executing something with a time derivative at initial should not put a NaN | ||
else if (_time_integrator && !_time_integrator->dt()) | ||
_ad_dofs_dot[i] = 0; | ||
else | ||
mooseError("AD nodal time derivatives not implemented for variables without a time " | ||
"integrator (auxiliary variables)"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
computeNodalValues
is the only caller of fetchADDoFValues
. I've always thought we should sync the names better. As it is, I think it's a bit confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I ll rename!
InputParameters | ||
CoupledAux::validParams() | ||
CoupledAuxTempl<is_ad>::validParams() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like these changes are really only for testing purposes? Is there any reason in production to use an ADCoupledAux
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I see that you are modifying a test material ... so do we really need these aux kernel changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the changes didn't overlap but they might have ended up overlapping. I ll check
No reason to use ADcoupledAux in production. If they don't overlap do you prefer creating a new object in test/ over templating in the framework ?
also includes a bug fix for second order AD dot dots
closes #28859
refs #28867