Skip to content

Commit

Permalink
Adapt modules to new time integrator APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayad committed Oct 25, 2024
1 parent efe1248 commit 8722f8b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions modules/fsi/src/kernels/AcousticInertia.C
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ AcousticInertia::AcousticInertia(const InputParameters & parameters)
_u_dot_old(_var.uDotOld()),
_du_dot_du(_var.duDotDu()),
_du_dotdot_du(_var.duDotDotDu()),
_u_dot_factor(_var.vectorTagValue(_sys.getTimeIntegrator()->uDotFactorTag())),
_u_dotdot_factor(_var.vectorTagValue(_sys.getTimeIntegrator()->uDotDotFactorTag()))
_u_dot_factor(_var.vectorTagValue(_sys.getTimeIntegrator(_var.number()).uDotFactorTag())),
_u_dotdot_factor(_var.vectorTagValue(_sys.getTimeIntegrator(_var.number()).uDotDotFactorTag()))
{
addFEVariableCoupleableVectorTag(_sys.getTimeIntegrator()->uDotFactorTag());
addFEVariableCoupleableVectorTag(_sys.getTimeIntegrator()->uDotDotFactorTag());
addFEVariableCoupleableVectorTag(_sys.getTimeIntegrator(_var.number()).uDotFactorTag());
addFEVariableCoupleableVectorTag(_sys.getTimeIntegrator(_var.number()).uDotDotFactorTag());
}

Real
Expand Down
2 changes: 1 addition & 1 deletion modules/solid_mechanics/include/kernels/InertialForce.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class InertialForceTempl : public InertialForceParent<is_ad>
const VariableValue * _du_dotdot_du;

/// The TimeIntegrator
TimeIntegrator & _time_integrator;
const TimeIntegrator & _time_integrator;

using InertialForceParent<is_ad>::_dt;
using InertialForceParent<is_ad>::_i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,5 @@ class NodalRotationalInertia : public TimeNodalKernel
const VariableValue * _du_dotdot_du;

/// The TimeIntegrator
TimeIntegrator & _time_integrator;
const TimeIntegrator & _time_integrator;
};
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ class NodalTranslationalInertia : public TimeNodalKernel
const VariableValue * _du_dotdot_du;

/// The TimeIntegrator
TimeIntegrator & _time_integrator;
const TimeIntegrator & _time_integrator;
};
2 changes: 1 addition & 1 deletion modules/solid_mechanics/src/kernels/InertialForce.C
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ InertialForceTempl<is_ad>::InertialForceTempl(const InputParameters & parameters
_eta(this->template getGenericMaterialProperty<Real, is_ad>("eta")),
_density_scaling(this->template getMaterialProperty<Real>("density_scaling")),
_alpha(this->template getParam<Real>("alpha")),
_time_integrator(*_sys.getTimeIntegrator())
_time_integrator(_sys.getTimeIntegrator(this->_var.number()))
{
if (_has_beta && _has_gamma && _has_velocity && _has_acceleration)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ NodalRotationalInertia::NodalRotationalInertia(const InputParameters & parameter
_rot_dot_residual(_nrot),
_rot_vel_old_value(_nrot),
_rot_dotdot_residual(_nrot),
_time_integrator(*_sys.getTimeIntegrator())
_time_integrator(_sys.getTimeIntegrator(_var.number()))
{
if (_has_beta && _has_gamma && _has_rot_velocities && _has_rot_accelerations)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ NodalTranslationalInertia::NodalTranslationalInertia(const InputParameters & par
_gamma(_has_gamma ? getParam<Real>("gamma") : 0.1),
_eta(getParam<Real>("eta")),
_alpha(getParam<Real>("alpha")),
_time_integrator(*_sys.getTimeIntegrator())
_time_integrator(_sys.getTimeIntegrator(_var.number()))
{
if (_has_beta && _has_gamma && _has_velocity && _has_acceleration)
{
Expand Down
2 changes: 1 addition & 1 deletion modules/thermal_hydraulics/src/base/Simulation.C
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ Simulation::couplingMatrixIntegrityCheck() const
return;

const TimeIntegrator * ti =
_fe_problem.getNonlinearSystemBase(/*nl_sys_num=*/0).getTimeIntegrator();
_fe_problem.getNonlinearSystemBase(/*nl_sys_num=*/0).getTimeIntegrators()[0].get();
// Yes, this is horrible. Don't ask why...
if ((dynamic_cast<const ExplicitTimeIntegrator *>(ti) != nullptr) ||
(dynamic_cast<const ExplicitEuler *>(ti) != nullptr) ||
Expand Down

0 comments on commit 8722f8b

Please sign in to comment.