Skip to content

Commit 0b912df

Browse files
committed
Make sure preStep is executed for time integrators in linear systems
1 parent d1609e3 commit 0b912df

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

framework/src/systems/LinearSystem.C

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,12 @@ LinearSystem::containsTimeKernel()
367367
}
368368

369369
void
370-
LinearSystem::compute(ExecFlagType)
370+
LinearSystem::compute(const ExecFlagType type)
371371
{
372-
// Linear systems have their own time derivative computation machinery
372+
// - Linear system assembly is associated with EXEC_NONLINEAR
373+
// - Avoid division by 0 dt
374+
if (type == EXEC_NONLINEAR && _fe_problem.dt() > 0.)
375+
for (auto & ti : _time_integrators)
376+
// Do things like compute integration weights
377+
ti->preStep();
373378
}

framework/src/systems/SolverSystem.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,11 @@ SolverSystem::compute(const ExecFlagType type)
150150
compute_tds = true;
151151
}
152152

153+
// avoid division by dt which might be zero.
153154
if (compute_tds && _fe_problem.dt() > 0.)
154155
for (auto & ti : _time_integrators)
155156
{
156-
// avoid division by dt which might be zero.
157+
// Do things like compute integration weights
157158
ti->preStep();
158159
ti->computeTimeDerivatives();
159160
}

0 commit comments

Comments
 (0)