102 double t = data.initial_time;
103 double h = data.initial_step_size;
104 unsigned int step_number = 0;
109 reset(data.initial_time, data.initial_step_size, solution,
solution_dot);
115 double next_time = data.initial_time;
119 while (t < data.final_time)
121 next_time += data.output_period;
123 auto yy = internal::make_nvector_view(solution
141 if (pending_exception)
145 std::rethrow_exception(pending_exception);
149 pending_exception =
nullptr;
157 pending_exception =
nullptr;
166 while (solver_should_restart(t, solution,
solution_dot))
183 VectorType & solution,
186 bool first_step = (current_time == data.initial_time);
191# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
209# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
215 auto yy = internal::make_nvector_view(solution
234 auto *
src_yy = internal::unwrap_nvector_const<VectorType>(
yy);
235 auto *
src_yp = internal::unwrap_nvector_const<VectorType>(
yp);
236 auto *residual = internal::unwrap_nvector<VectorType>(
rr);
240 solver.pending_exception,
250 if (get_local_tolerances)
252 const auto abs_tols = internal::make_nvector_view(get_local_tolerances()
264 data.relative_tolerance,
265 data.absolute_tolerance);
275 if (data.ic_type == AdditionalData::use_y_diff ||
276 data.reset_type == AdditionalData::use_y_diff ||
277 data.ignore_algebraic_terms_for_errors)
281 for (
const auto &component : differential_components())
313# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
328 LS->content =
nullptr;
340 AssertThrow(solve_jacobian_system || solve_with_jacobian,
342 "solve_jacobian_system or solve_with_jacobian"));
350 auto *
src_b = internal::unwrap_nvector_const<VectorType>(b);
351 auto *
dst_x = internal::unwrap_nvector<VectorType>(
x);
352 if (solver.solve_with_jacobian)
354 solver.solve_with_jacobian,
355 solver.pending_exception,
359 else if (solver.solve_jacobian_system)
361 solver.solve_jacobian_system,
362 solver.pending_exception,
392# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
406 A->content =
nullptr;
441 auto *
src_yy = internal::unwrap_nvector_const<VectorType>(
yy);
442 auto *
src_yp = internal::unwrap_nvector_const<VectorType>(
yp);
445 solver.setup_jacobian,
446 solver.pending_exception,
460 type = data.reset_type;
466 if (type == AdditionalData::use_y_dot)
476 else if (type == AdditionalData::use_y_diff)