Skip to content

Commit

Permalink
Merge commit 'ba11e6d217fbbf9e25ec85bd7f74e5f29b98c3c5'
Browse files Browse the repository at this point in the history
  • Loading branch information
moosetest committed May 10, 2021
2 parents 6006591 + ba11e6d commit 5cda0d3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion framework/include/base/Assembly.h
Original file line number Diff line number Diff line change
Expand Up @@ -2771,11 +2771,19 @@ Assembly::processDerivatives(const std::vector<ADReal> & residuals,
auto current_dofs_set = std::set<dof_id_type>(resid_it->derivatives().nude_indices().begin(),
resid_it->derivatives().nude_indices().end());
mooseAssert(compare_dofs_set == current_dofs_set,
"We're going to see whether the dof sets are the same");
"We're going to see whether the dof sets are the same. IIRC the degree of freedom "
"dependence (as indicated by the dof index set held by the ADReal) has to be the "
"same for every residual passed to this method otherwise constrain_element_matrix "
"will not work.");
}
#endif
auto column_indices = std::vector<dof_id_type>(compare_dofs.begin(), compare_dofs.end());

// If there's no derivatives then there is nothing to do. Moreover, if we pass zero size column
// indices to constrain_element_matrix then we will potentially get errors out of BLAS
if (!column_indices.size())
return;

DenseMatrix<Number> element_matrix(row_indices.size(), column_indices.size());
for (const auto i : index_range(row_indices))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
Executioner/type=Eigenvalue'
expect_err = 'is not supported for an eigenvalue solve.'
allow_test_objects = true
slepc = true
detail = 'when the study is set to execute with residual kernels and an eigenvalue executioner,'
[]
[error_if_tracing]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
type = ADDiffusion
variable = u
[../]
[force]
type = ADBodyForce
variable = u
function = '0'
[]
[]

[BCs]
Expand Down
2 changes: 1 addition & 1 deletion test/tests/kernels/diffusion_with_hanging_node/tests
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
type = PetscJacobianTester
input = 'ad_simple_diffusion.i'
run_sim = True
requirement = 'The system shall compute a perfect Jacobian via automatic differentiation for a hanging-node problem.'
requirement = 'The system shall compute a perfect Jacobian via automatic differentiation for a hanging-node problem and simultaneously handle automatic differentiation objects that do not actually have nonlinear variable dependence.'
issues = 'libmesh#1985 #15732'
[]
[]
1 change: 1 addition & 0 deletions test/tests/problems/eigen_problem/initial_condition/tests
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
csvdiff = 'ne_ic_no_free_out_eigenvalues_0001.csv'
issues = '#17026'
requirement = "The system shall support eigenvalue execution without free power iterations."
slepc = true
[../]

[./inverse_eigenvalue_postprocessor]
Expand Down

0 comments on commit 5cda0d3

Please sign in to comment.