From ca9774d3a6f1f43acb48680eed253d39ba9213da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Wed, 13 Oct 2021 00:35:26 +0200 Subject: [PATCH] Hide variables only required in parallel mode --- dune/uggrid/gm/refine.cc | 2 +- dune/uggrid/gm/ugm.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dune/uggrid/gm/refine.cc b/dune/uggrid/gm/refine.cc index c20880503..a3dcfd499 100644 --- a/dune/uggrid/gm/refine.cc +++ b/dune/uggrid/gm/refine.cc @@ -5470,8 +5470,8 @@ static int AdaptGrid (GRID *theGrid, INT *nadapted) ELEMENT *NextElement; ELEMENTCONTEXT theContext; GRID *UpGrid; - const int me = theGrid->ppifContext().me(); #ifdef ModelP + const int me = theGrid->ppifContext().me(); auto& dddContext = theGrid->dddContext(); #endif diff --git a/dune/uggrid/gm/ugm.cc b/dune/uggrid/gm/ugm.cc index 5d172c976..38d7aadfa 100644 --- a/dune/uggrid/gm/ugm.cc +++ b/dune/uggrid/gm/ugm.cc @@ -5267,9 +5267,11 @@ INT NS_DIM_PREFIX MultiGridStatus (const MULTIGRID *theMG, INT gridflag, INT gre INT master_elements,hghost_elements,vghost_elements,vhghost_elements; #endif +#ifdef ModelP const auto& ppifContext = theMG->ppifContext(); const int me = ppifContext.me(); const int procs = ppifContext.procs(); +#endif mg_red = mg_green = mg_yellow = mg_sum = 0; mg_sum_div_red = mg_redplusgreen_div_red = 0.0; -- GitLab