237 const VectorType &solution)
239 last_end_time = current_time;
243# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
269 Assert(explicit_function || implicit_function,
278 auto *
src_yy = internal::unwrap_nvector_const<VectorType>(
yy);
279 auto *
dst_yp = internal::unwrap_nvector<VectorType>(
yp);
282 solver.explicit_function,
283 solver.pending_exception,
296 auto *
src_yy = internal::unwrap_nvector_const<VectorType>(
yy);
297 auto *
dst_yp = internal::unwrap_nvector<VectorType>(
yp);
300 solver.implicit_function,
301 solver.pending_exception,
313# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
320 if (get_local_tolerances)
322 const auto abs_tols = internal::make_nvector_view(get_local_tolerances()
335 data.relative_tolerance,
336 data.absolute_tolerance);
344 setup_system_solver(solution);
346 setup_mass_solver(solution);
358 custom_setup(arkode_mem);
368 if (!implicit_function)
375 if (jacobian_times_vector)
378 if (solve_linearized_system)
381 std::make_unique<internal::LinearSolverWrapper<VectorType>>(
382 solve_linearized_system,
384# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
389 sun_linear_solver = *linear_solver;
395 auto y_template = internal::make_nvector_view(solution
401# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
428 auto *
src_v = internal::unwrap_nvector_const<VectorType>(v);
429 auto *
src_y = internal::unwrap_nvector_const<VectorType>(
y);
430 auto *
src_fy = internal::unwrap_nvector_const<VectorType>(
fy);
432 auto *
dst_Jv = internal::unwrap_nvector<VectorType>(
Jv);
435 solver.jacobian_times_vector,
436 solver.pending_exception,
450 auto *
src_y = internal::unwrap_nvector_const<VectorType>(
y);
451 auto *
src_fy = internal::unwrap_nvector_const<VectorType>(
fy);
454 solver.jacobian_times_setup,
455 solver.pending_exception,
461 jacobian_times_setup ?
466 if (jacobian_preconditioner_solve)
476 void * user_data) ->
int {
481 auto *
src_y = internal::unwrap_nvector_const<VectorType>(
y);
482 auto *
src_fy = internal::unwrap_nvector_const<VectorType>(
fy);
483 auto *
src_r = internal::unwrap_nvector_const<VectorType>(r);
485 auto *
dst_z = internal::unwrap_nvector<VectorType>(z);
488 solver.jacobian_preconditioner_solve,
489 solver.pending_exception,
506 void *user_data) ->
int {
511 auto *
src_y = internal::unwrap_nvector_const<VectorType>(
y);
512 auto *
src_fy = internal::unwrap_nvector_const<VectorType>(
fy);
515 solver.jacobian_preconditioner_setup,
516 solver.pending_exception,
526 jacobian_preconditioner_setup ?
532 if (data.implicit_function_is_linear)
535 arkode_mem, data.implicit_function_is_time_independent ? 0 : 1);
541 auto y_template = internal::make_nvector_view(solution
548# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
551 data.anderson_acceleration_subspace);
555 data.anderson_acceleration_subspace,
577 if (mass_times_vector)
583 std::make_unique<internal::LinearSolverWrapper<VectorType>>(
587# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
596 auto y_template = internal::make_nvector_view(solution
602# if DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0)
630 solver.mass_times_setup, solver.pending_exception, t);
639 auto *
src_v = internal::unwrap_nvector_const<VectorType>(v);
640 auto *
dst_Mv = internal::unwrap_nvector<VectorType>(
Mv);
643 solver.mass_times_vector,
644 solver.pending_exception,
658 if (mass_preconditioner_solve)
661 [](
realtype t,
void *user_data) ->
int {
667 solver.mass_preconditioner_setup, solver.pending_exception, t);
675 void *user_data) ->
int {
680 auto *
src_r = internal::unwrap_nvector_const<VectorType>(r);
681 auto *
dst_z = internal::unwrap_nvector<VectorType>(z);
684 solver.mass_preconditioner_solve,
685 solver.pending_exception,
695 mass_preconditioner_setup ?