Skip to content
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

Use new deal.II constraints functions. #5395

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions source/simulator/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ namespace aspect
// if the set of constraints has changed. If it did, we need to update the sparsity patterns.
AffineConstraints<double> new_current_constraints;
new_current_constraints.clear ();
new_current_constraints.reinit (introspection.index_sets.system_relevant_set);
new_current_constraints.reinit (dof_handler.locally_owned_dofs(),
introspection.index_sets.system_relevant_set);
Comment on lines -660 to +661
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @tjhei already noted, you'll need a #if around this. Or you go with the old function signature -- it may be marginally less efficient, but it's going to stick around for a couple more versions.

new_current_constraints.merge (constraints);
compute_current_velocity_boundary_constraints(new_current_constraints);

Expand Down Expand Up @@ -792,7 +793,12 @@ namespace aspect
if (any_constrained_dofs_set_changed)
rebuild_sparsity_and_matrices = true;

current_constraints.clear();
current_constraints.reinit(dof_handler.locally_owned_dofs(),
introspection.index_sets.system_relevant_set);

current_constraints.copy_from(new_current_constraints);
current_constraints.close();

// TODO: We should use current_constraints.is_consistent_in_parallel()
// here to assert that our constraints are consistent between
Expand Down Expand Up @@ -1449,7 +1455,8 @@ namespace aspect

// Reconstruct the constraint-matrix:
constraints.clear();
constraints.reinit(introspection.index_sets.system_relevant_set);
constraints.reinit(dof_handler.locally_owned_dofs(),
introspection.index_sets.system_relevant_set);

// Set up the constraints for periodic boundary conditions:

Expand Down
Loading