Skip to content

Commit

Permalink
Actually will use split methods. Add test. Closes idaholab#7842
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayad committed Nov 30, 2017
1 parent 26b2f76 commit 7390e3c
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 68 deletions.
7 changes: 6 additions & 1 deletion framework/include/base/FEProblemBase.h
Expand Up @@ -825,10 +825,15 @@ class FEProblemBase : public SubProblem, public Restartable
bool execMultiApps(ExecFlagType type, bool auto_advance = true);

/**
* Advance the MultiApps t_step associated with the ExecFlagType
* Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType
*/
void incrementMultiAppTStep(ExecFlagType type);

/**
* Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType
*/
void finishMultiAppStep(ExecFlagType type);

/**
* Backup the MultiApps associated with the ExecFlagType
*/
Expand Down
14 changes: 14 additions & 0 deletions framework/src/base/FEProblemBase.C
Expand Up @@ -3288,6 +3288,20 @@ FEProblemBase::incrementMultiAppTStep(ExecFlagType type)
}
}

void
FEProblemBase::finishMultiAppStep(ExecFlagType type)
{
const auto & multi_apps = _multi_apps[type].getActiveObjects();

if (multi_apps.size())
{
for (const auto & multi_app : multi_apps)
multi_app->finishStep();

MooseUtils::parallelBarrierNotify(_communicator);
}
}

void
FEProblemBase::backupMultiApps(ExecFlagType type)
{
Expand Down
5 changes: 5 additions & 0 deletions framework/src/executioners/Transient.C
Expand Up @@ -369,6 +369,11 @@ Transient::incrementStepOrReject()

_problem.advanceState();

if (_picard_max_its > 1)
{
_problem.finishMultiAppStep(EXEC_TIMESTEP_BEGIN);
_problem.finishMultiAppStep(EXEC_TIMESTEP_END);
}
_problem.incrementMultiAppTStep(EXEC_TIMESTEP_BEGIN);
_problem.incrementMultiAppTStep(EXEC_TIMESTEP_END);
}
Expand Down
7 changes: 3 additions & 4 deletions framework/src/multiapps/TransientMultiApp.C
Expand Up @@ -346,6 +346,9 @@ TransientMultiApp::solveStep(Real dt, Real target_time, bool auto_advance)

if (auto_advance)
{
ex->endStep();
ex->postStep();

if (!ex->lastSolveConverged())
{
mooseWarning(name(), _first_local_app + i, " failed to converge!\n");
Expand Down Expand Up @@ -424,10 +427,7 @@ TransientMultiApp::incrementTStep()
{
for (unsigned int i = 0; i < _my_num_apps; i++)
{
/*FEProblemBase * problem =*/appProblemBase(_first_local_app + i);
Transient * ex = _transient_executioners[i];
ex->endStep();
ex->postStep();
ex->incrementStepOrReject();
}
}
Expand All @@ -440,7 +440,6 @@ TransientMultiApp::finishStep()
{
for (unsigned int i = 0; i < _my_num_apps; i++)
{
/*FEProblemBase * problem =*/appProblemBase(_first_local_app + i);
Transient * ex = _transient_executioners[i];
ex->endStep();
ex->postStep();
Expand Down
Expand Up @@ -56,6 +56,5 @@
[]

[Outputs]
file_base = out
exodus = true
[]
1 change: 1 addition & 0 deletions test/tests/multiapps/loose_couple_time_adapt/gold/begin.e
Binary file not shown.
Binary file not shown.
Expand Up @@ -47,7 +47,7 @@
[./dummy]
type = TransientMultiApp
input_files = adaptiveDT.i
execute_on = timestep_begin
execute_on = timestep_end
[../]
[]

Expand All @@ -57,12 +57,8 @@
end_time = 0.006
dt = 0.006
nl_abs_tol = 1.0e-8
# picard_max_its = 10
# picard_rel_tol = 1e-8
# picard_abs_tol = 1e-8
[]

[Outputs]
file_base = out
exodus = true
[]
14 changes: 14 additions & 0 deletions test/tests/multiapps/loose_couple_time_adapt/tests
@@ -0,0 +1,14 @@
[Tests]
[./begin]
type = 'Exodiff'
input = 'master.i'
exodiff = 'begin.e'
cli_args = 'MultiApps/dummy/execute_on=timestep_begin Outputs/file_base=begin'
[../]
[./end]
type = 'Exodiff'
input = 'master.i'
exodiff = 'end.e master_out_dummy0.e'
cli_args = 'Outputs/file_base=end'
[../]
[]
57 changes: 0 additions & 57 deletions test/tests/multiapps/multiapp_iterative_adaptive/constDT.i

This file was deleted.

0 comments on commit 7390e3c

Please sign in to comment.