Skip to content

Commit

Permalink
fix the broken backward euler test;
Browse files Browse the repository at this point in the history
relax the tolerance for the cuda rosenbrock integration test
  • Loading branch information
sjsprecious committed Sep 12, 2024
1 parent 17024a4 commit f708ae5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions include/micm/solver/backward_euler.inl
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ namespace micm
bool converged = false;
std::size_t iterations = 0;

Yn1 = Yn;

if (result.stats_.number_of_steps_ == 0)
{
Yn.Copy(Yn1);
}
else
{
Yn1.Copy(Yn);
}

do
{
result.stats_.number_of_steps_++;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/cuda/test_cuda_analytical_rosenbrock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ TEST(AnalyticalExamplesCudaRosenbrock, HIRES)
test_analytical_hires<builderType1Cell, stateType1Cell>(solver, 1e-3, copy_to_device, copy_to_host);

solver = rosenbrock_solver(micm::RosenbrockSolverParameters::FourStageDifferentialAlgebraicRosenbrockParameters());
test_analytical_hires<builderType1Cell, stateType1Cell>(solver, 1e-3, copy_to_device, copy_to_host);
test_analytical_hires<builderType1Cell, stateType1Cell>(solver, 5e-3, copy_to_device, copy_to_host);

solver = rosenbrock_solver(micm::RosenbrockSolverParameters::SixStageDifferentialAlgebraicRosenbrockParameters());
test_analytical_hires<builderType1Cell, stateType1Cell>(solver, 1e-3, copy_to_device, copy_to_host);
Expand Down

0 comments on commit f708ae5

Please sign in to comment.