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

Integrate DG into non-nested MG #15209

Merged
merged 1 commit into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 associated 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
421 changes: 371 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.