Skip to content

Commit

Permalink
Reinit EquationSystems after adding new Systems
Browse files Browse the repository at this point in the history
This is one step towards getting idaholab#1913 working
  • Loading branch information
roystgnr committed Feb 26, 2015
1 parent c609ef9 commit 6068f9f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions framework/src/transfers/MultiAppProjectionTransfer.C
Expand Up @@ -65,6 +65,11 @@ MultiAppProjectionTransfer::MultiAppProjectionTransfer(const std::string & name,
{
unsigned int n_apps = _multi_app->numGlobalApps();
_proj_sys.resize(n_apps, NULL);

// Keep track of which EquationSystems just had new Systems
// added to them
std::set<EquationSystems *> augmented_es;

for (unsigned int app = 0; app < n_apps; app++)
{
if (_multi_app->hasLocalApp(app))
Expand All @@ -84,11 +89,24 @@ MultiAppProjectionTransfer::MultiAppProjectionTransfer(const std::string & name,

_proj_sys[app] = &proj_sys;

// We'll defer to_es.reinit() so we don't do it multiple
// times even if we add multiple new systems
augmented_es.insert(&to_es);

//to_problem.hideVariableFromOutput("var"); // hide the auxiliary projection variable

Moose::swapLibMeshComm(swapped);
}
}

// Make sure all new systems are initialized.
for (std::set<EquationSystems *>::iterator es_iter =
augmented_es.begin();
es_iter != augmented_es.end(); ++es_iter)
{
EquationSystems *es = *es_iter;
es->reinit();
}
}
break;

Expand Down

0 comments on commit 6068f9f

Please sign in to comment.