Skip to content

Commit

Permalink
Update framework/src/fvbcs/FVFunctionDirichletBC.C Refs idaholab#29145
Browse files Browse the repository at this point in the history
Co-authored-by: Peter German <31662443+grmnptr@users.noreply.github.com>
  • Loading branch information
tanoret and grmnptr authored Nov 26, 2024
1 parent 460817c commit 4b28e93
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion framework/src/fvbcs/FVFunctionDirichletBC.C
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@ FVFunctionDirichletBC::FVFunctionDirichletBC(const InputParameters & parameters)
ADReal
FVFunctionDirichletBC::boundaryValue(const FaceInfo & fi, const Moose::StateArg & /*state*/) const
{
return _function.value(_t, fi.faceCentroid());

if (state.state != 0 && state.iteration_type == Moose::SolutionIterationType::Time)
{
mooseAssert(state.state == 1, "We cannot access values beyond the previous time step.");
_function.value(_t_old, fi.faceCentroid());
}
else
_function.value(_t, fi.faceCentroid());
}

0 comments on commit 4b28e93

Please sign in to comment.