Skip to content

Commit

Permalink
Extend non-nested MG to DG.
Browse files Browse the repository at this point in the history
  • Loading branch information
jh66637 committed May 21, 2023
1 parent 89a79f2 commit e2eec85
Show file tree
Hide file tree
Showing 13 changed files with 1,053 additions and 145 deletions.
3 changes: 3 additions & 0 deletions doc/news/changes/major/20230426FederHeinzMunchKronbichler
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
New: Add a two level transfer operator between non-nested multigrid levels for CG and DG.
<br>
(Marco Feder, Johannes Heinz, Peter Munch, Martin Kronbichler, 2023/04/26)
3 changes: 0 additions & 3 deletions doc/news/changes/major/20230426FederMunchKronbichler

This file was deleted.

7 changes: 7 additions & 0 deletions include/deal.II/multigrid/mg_transfer_global_coarsening.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,13 @@ class MGTwoLevelTransferNonNested<dim,
* rank.
*/
std::vector<unsigned int> level_dof_indices_fine;

/**
* CRS like structure which points to DoFs accossiated with the same support
* point. The vector stays empty if only one DoF corresponds to one support
* point.
*/
std::vector<unsigned int> level_dof_indices_fine_ptrs;
};


Expand Down
383 changes: 333 additions & 50 deletions include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions tests/multigrid-global-coarsening/non_nested_transfer_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,20 @@ test(int fe_degree, const Function<dim, Number> &function)
deallog.pop();
}

if (false)
if (fe_degree > 0)
{
deallog.push("DG<2>(" + str_fine + ")<->DG<2>(" + str_coarse + ")");
deallog.push("DG<2>(" + str_fine + ")<->CG<2>(" + str_coarse + ")");
do_test<dim, double>(FE_DGQ<dim>(fe_degree),
FE_DGQ<dim>(fe_degree),
FE_Q<dim>(fe_degree),
function);
deallog.pop();
}

deallog.push("DG<2>(" + str_fine + ")<->DG<2>(" + str_coarse + ")");
do_test<dim, double>(FE_DGQ<dim>(fe_degree),
FE_DGQ<dim>(fe_degree),
function);
deallog.pop();
}

int
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion tests/multigrid-global-coarsening/non_nested_transfer_02.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ test(int fe_degree, const Function<dim, Number> &function)
const auto str_fine = std::to_string(fe_degree);
const auto str_coarse = std::to_string(fe_degree);

if (false && fe_degree > 0)
if (fe_degree > 0)
{
deallog.push("CG<2>(" + str_fine + ")<->CG<2>(" + str_coarse + ")");
do_test<dim, double>(FE_Q<dim>(fe_degree),
Expand All @@ -112,6 +112,14 @@ test(int fe_degree, const Function<dim, Number> &function)
deallog.pop();
}

if (fe_degree > 0)
{
deallog.push("DG<2>(" + str_fine + ")<->CG<2>(" + str_coarse + ")");
do_test<dim, double>(FE_DGQ<dim>(fe_degree),
FE_Q<dim>(fe_degree),
function);
deallog.pop();
}

{
deallog.push("DG<2>(" + str_fine + ")<->DG<2>(" + str_coarse + ")");
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion tests/multigrid-global-coarsening/non_nested_transfer_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test(int fe_degree, const Function<dim, Number> &function)
const auto str_fine = std::to_string(fe_degree);
const auto str_coarse = std::to_string(fe_degree);

if (false && fe_degree > 0)
if (fe_degree > 0)
{
deallog.push("CG<2>(" + str_fine + ")<->CG<2>(" + str_coarse + ")");
do_test<dim, double>(FE_Q<dim>(fe_degree),
Expand All @@ -131,6 +131,16 @@ test(int fe_degree, const Function<dim, Number> &function)
}


if (fe_degree > 0)
{
deallog.push("DG<2>(" + str_fine + ")<->CG<2>(" + str_coarse + ")");
do_test<dim, double>(FE_DGQ<dim>(fe_degree),
FE_Q<dim>(fe_degree),
function);
deallog.pop();
}


{
deallog.push("DG<2>(" + str_fine + ")<->DG<2>(" + str_coarse + ")");
do_test<dim, double>(FE_DGQ<dim>(fe_degree),
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit e2eec85

Please sign in to comment.