File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -367,7 +367,12 @@ LinearSystem::containsTimeKernel()
367367}
368368
369369void
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}
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments