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

Check during MF::reinit() if AffineConstraints are closed #13506

Merged
merged 1 commit into from Mar 9, 2022

Conversation

peterrum
Copy link
Member

@peterrum peterrum commented Mar 7, 2022

If one does not close, the following MatrixFree object gives different results, depending on fast HN algorithm is enabled or not:

  Triangulation<dim> tria;
  GridGenerator::subdivided_hyper_cube(tria, 2);
  tria.begin()->set_refine_flag();
  tria.execute_coarsening_and_refinement();

  QGauss<dim>    quad(degree + 1);
  FE_Q<dim>      fe(degree);
  MappingQ1<dim> mapping;

  DoFHandler<dim> dof_handler;
  dof_handler.reinit(tria);
  dof_handler.distribute_dofs(fe);

  AffineConstraints<Number> constraints;
  DoFTools::make_zero_boundary_constraints(dof_handler, constraints);
  DoFTools::make_hanging_node_constraints(dof_handler, constraints);
  constraints.close(); // needed!!!

  typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
    additional_data;
  additional_data.mapping_update_flags = update_values | update_gradients |
                                         update_JxW_values |
                                         dealii::update_quadrature_points;

  MatrixFree<dim, Number, VectorizedArrayType> matrix_free;
  matrix_free.reinit(mapping, dof_handler, constraints, quad, additional_data);

depends on #13505

@peterrum
Copy link
Member Author

peterrum commented Mar 7, 2022

/rebuild

@peterrum peterrum force-pushed the mf_ac_is_closed branch 2 times, most recently from ae91568 to 17ef66c Compare March 8, 2022 06:16
@peterrum
Copy link
Member Author

peterrum commented Mar 8, 2022

I have rebased this PR!

@kronbichler kronbichler merged commit 0bd61d6 into dealii:master Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants