392 const std::array<Number, stages> stage_weights,
395 Number tau_max )
const
398 std::cout <<
"HyperbolicModule<HyperbolicDescription, dim, Number>::step()"
404 copy_to_memory_space<MemorySpace>(old_state_vector,
407 for (
int s = 0; s < stages; ++s)
408 copy_to_memory_space<MemorySpace>(stage_state_vectors[s].get(),
411 move_to_memory_space<MemorySpace>(new_state_vector,
414 auto &[old_U, old_precomputed, old_parabolic] = old_state_vector;
415 auto &new_U = new_state_vector.
U;
438 constexpr bool shallow_water =
444 const unsigned int n_internal = offline_data_->n_locally_internal();
445 const unsigned int n_owned = offline_data_->n_locally_owned();
449 const auto sparsity_simd_view =
450 offline_data_->sparsity_pattern_simd().template view<MemorySpace>();
452 const auto mass_matrix_view =
453 offline_data_->mass_matrix().template view<MemorySpace>();
454 const auto lumped_mass_matrix_view =
455 offline_data_->lumped_mass_matrix().template view<1, MemorySpace>();
456 const auto lumped_mass_matrix_inverse_view =
457 offline_data_->lumped_mass_matrix_inverse()
458 .template view<1, MemorySpace>();
460 const auto cij_matrix_view =
461 offline_data_->cij_matrix().template view<MemorySpace>();
467 const bool have_discontinuous_ansatz =
468 offline_data_->discretization().have_discontinuous_ansatz();
469 using MatrixReadView =
470 decltype(offline_data_->mass_matrix().template view<MemorySpace>());
471 const auto mass_matrix_inverse_view =
472 have_discontinuous_ansatz
473 ? offline_data_->mass_matrix_inverse().template view<MemorySpace>()
475 const auto incidence_matrix_view =
476 have_discontinuous_ansatz
477 ? offline_data_->incidence_matrix().template view<MemorySpace>()
480 const auto *coupling_boundary_pairs =
481 offline_data_->coupling_boundary_pairs().template view<MemorySpace>();
482 const auto n_coupling_boundary_pairs =
483 offline_data_->coupling_boundary_pairs().size();
485 const Number measure_of_omega_inverse =
486 Number(1.) / offline_data_->measure_of_omega();
490 const auto dij_matrix_view = dij_matrix_.template view<MemorySpace>();
491 const auto lij_matrix_view = lij_matrix_.template view<MemorySpace>();
492 const auto lij_matrix_next_view =
493 lij_matrix_next_.template view<MemorySpace>();
494 const auto pij_matrix_view = pij_matrix_.template view<MemorySpace>();
498 const auto initial_precomputed_view =
500 .template view<n_initial_precomputed_values, MemorySpace>();
502 const auto old_U_view =
503 old_U.template view<problem_dimension, MemorySpace>();
504 const auto old_precomputed_view =
505 old_precomputed.template view<n_precomputed_values, MemorySpace>();
512 using HyperbolicVectorView = std::remove_const_t<
decltype(old_U_view)>;
513 using PrecomputedVectorView =
514 std::remove_const_t<
decltype(old_precomputed_view)>;
516 Kokkos::Array<HyperbolicVectorView, stages> stage_U_view;
517 Kokkos::Array<PrecomputedVectorView, stages> stage_precomputed_view;
518 Kokkos::Array<Number, stages> stage_weight;
519 for (
int s = 0; s < stages; ++s) {
520 const auto &[U_s, prec_s, V_s] = stage_state_vectors[s].get();
521 stage_U_view[s] = U_s.template view<problem_dimension, MemorySpace>();
522 stage_precomputed_view[s] =
523 prec_s.template view<n_precomputed_values, MemorySpace>();
524 stage_weight[s] = stage_weights[s];
527 const auto new_U_view =
528 new_U.template view<problem_dimension, MemorySpace>();
530 const auto alpha_view = alpha_.template view<1, MemorySpace>();
531 const auto bounds_view = bounds_.template view<n_bounds, MemorySpace>();
532 const auto r_view = r_.template view<problem_dimension, MemorySpace>();
541 const Number cfl = cfl_;
543 const auto hyperbolic_system_views =
544 make_select_view<dim, Number, MemorySpace>(*hyperbolic_system_);
546 const auto indicator_views =
547 make_select_view<dim, Number, MemorySpace>(indicator_);
549 const auto limiter_views =
550 make_select_view<dim, Number, MemorySpace>(limiter_);
551 const auto n_limiter_iterations =
552 limiter_.template view<dim, Number>().iterations();
554 const auto wave_speed_estimator_views =
555 make_select_view<dim, Number, MemorySpace>(wave_speed_estimator_);
563 const auto scoped_name = [&step_no](
const auto &name,
564 const bool advance =
true) {
565 advance || step_no--;
566 return "time step [H] " + std::to_string(++step_no) +
" - " + name;
569 const auto loop_name = [&step_no]() {
570 return "hyperbolic_kernel_" + std::format(
"{:02}", step_no);
574 Mirrored<int> restart_needed(
"hyperbolic_module_restart_needed",
576 *restart_needed.
view() = 0;
606 const auto body = [=](
auto sentinel,
unsigned int i) {
607 using T =
decltype(sentinel);
609 const unsigned int stride_size = sparsity_simd_view.stride_of_row(i);
611 const auto wave_speed_estimator_view =
612 wave_speed_estimator_views.template view<T>();
614 auto indicator_view = indicator_views.template view<T>();
617 const unsigned int row_length = sparsity_simd_view.row_length(i);
621 const auto U_i = old_U_view.template read_tensor<T>(i);
623 indicator_view.reset(old_precomputed_view, i, U_i);
625 const unsigned int *js = sparsity_simd_view.columns(i);
626 for (
unsigned int col_idx = 0; col_idx < row_length;
627 ++col_idx, js += stride_size) {
629 const auto U_j = old_U_view.template read_tensor<T>(js);
631 const auto c_ij = cij_matrix_view.template read_tensor<T>(i, col_idx);
633 indicator_view.accumulate(old_precomputed_view, js, U_j, c_ij);
640 if (all_below_diagonal<T>(i, js))
643 const auto norm = c_ij.norm();
644 const auto n_ij = c_ij / norm;
645 const auto lambda_max = wave_speed_estimator_view.compute(
646 old_precomputed_view, U_i, U_j, i, js, n_ij);
647 const auto d_ij = norm * lambda_max;
649 dij_matrix_view.write_entry(d_ij, i, col_idx,
true);
652 const auto mass = lumped_mass_matrix_view.template read_entry<T>(i);
653 const auto hd_i = mass * measure_of_omega_inverse;
654 alpha_view.template write_entry<T>(indicator_view.alpha(hd_i), i);
657 loop<MemorySpace, Number>(loop_name(), body, 0, n_internal, n_owned);
659 alpha_view.update_ghost_values();
670 scoped_name(
"compute bdry d_ij, diag d_ii, and tau_max"));
686 const auto body_boundary = [=](
auto,
const unsigned int k) {
687 const auto &[i, col_idx, j] = coupling_boundary_pairs[k];
689 const auto wave_speed_estimator_view =
690 wave_speed_estimator_views.template view<Number>();
703 const auto U_i = old_U_view.read_tensor(i);
704 const auto U_j = old_U_view.read_tensor(j);
706 const auto c_ji = cij_matrix_view.read_transposed_tensor(i, col_idx);
707 Assert(c_ji.norm() > 1.e-12, ExcInternalError());
708 const auto norm_ji = c_ji.norm();
709 const auto n_ji = c_ji / norm_ji;
711 const auto d_ij = dij_matrix_view.read_entry(i, col_idx);
713 const auto lambda_max = wave_speed_estimator_view.compute(
714 old_precomputed_view, U_j, U_i, j, &i, n_ji);
715 const auto d_ji = norm_ji * lambda_max;
717 dij_matrix_view.write_entry(std::max(d_ij, d_ji), i, col_idx);
720 loop<MemorySpace, Number>(loop_name() +
'a',
724 n_coupling_boundary_pairs);
727 const auto body = [=](
auto,
unsigned int i) -> Number {
729#ifdef DEBUG_SYMMETRY_CHECK
730 const auto wave_speed_estimator_view =
731 wave_speed_estimator_views.template view<Number>();
735 const unsigned int row_length = sparsity_simd_view.row_length(i);
737 return std::numeric_limits<Number>::max();
739 Number d_sum = Number(0.);
742 const unsigned int stride_size = sparsity_simd_view.stride_of_row(i);
743 const unsigned int *js = sparsity_simd_view.columns(i);
744 for (
unsigned int col_idx = 1; col_idx < row_length; ++col_idx) {
745 const auto j = *(js + col_idx * stride_size);
749 const auto d_ji = dij_matrix_view.read_transposed_entry(i, col_idx);
751#ifdef DEBUG_SYMMETRY_CHECK
754 const auto U_i = old_U_view.read_tensor(i);
755 const auto U_j = old_U_view.read_tensor(j);
757 const auto c_ij = cij_matrix_view.read_tensor(i, col_idx);
758 Assert(c_ij.norm() > 1.e-12, ExcInternalError());
759 const auto norm_ij = c_ij.norm();
760 const auto n_ij = c_ij / norm_ij;
762 const auto lambda_max = wave_speed_estimator_view.compute(
763 old_precomputed_view, U_i, U_j, i, &j, n_ij);
764 const auto d_ij = norm_ij * lambda_max;
766 Assert(d_ij <= d_ji + 1.0e-12,
767 dealii::ExcMessage(
"d_ij not symmetrized correctly on "
768 "boundary degrees of freedom."));
771 dij_matrix_view.write_entry(d_ji, i, col_idx);
774 d_sum -= dij_matrix_view.read_entry(i, col_idx);
783 std::min(d_sum, Number(-1.e6) * std::numeric_limits<Number>::min());
786 dij_matrix_view.write_entry(d_sum, i, 0);
788 const Number mass = lumped_mass_matrix_view.read_entry(i);
789 return cfl * mass / (Number(-2.) * d_sum);
792 reduction_loop<MemorySpace>(
793 loop_name() +
'b', body, Kokkos::Min<Number>(tau_max), 0, n_owned);
803 tau_max = Utilities::MPI::min(
804 tau_max, mpi_ensemble_.synchronization_communicator());
807 !std::isnan(tau_max) && !std::isinf(tau_max) && tau_max > 0.,
809 "I'm sorry, Dave. I'm afraid I can't do that.\nWe crashed."));
811 tau = (tau == Number(0.) ? tau_max : tau);
814 std::cout <<
" computed tau_max = " << tau_max <<
" (CFL = " << cfl
816 std::cout <<
" step with tau = " << tau << std::endl;
820 *restart_needed.
view() = (tau > acceptable_tau_max_ratio_ * tau_max);
823 if (*restart_needed.
view() &&
828 std::cout <<
" signalling restart (suggested_tau_max = "
829 << tau_max <<
")" << std::endl;
837 int *restart_needed_view = restart_needed.
view<MemorySpace>();
841 dij_matrix_view.update_ghost_rows();
852 scoped_name(
"l.-o. update, compute bounds, r_i, and p_ij"));
854 const Number weight =
855 -std::accumulate(stage_weights.begin(), stage_weights.end(), -1.);
857 const auto body = [=](
auto sentinel,
858 auto have_discontinuous_ansatz,
859 const unsigned int i) {
860 using T =
decltype(sentinel);
862 const auto view = hyperbolic_system_views.template view<T>();
864 using View =
decltype(view);
865 using flux_contribution_type =
typename View::flux_contribution_type;
868 const unsigned int stride_size = sparsity_simd_view.stride_of_row(i);
870 auto limiter_view = limiter_views.template view<T>();
873 const unsigned int row_length = sparsity_simd_view.row_length(i);
877 const auto U_i = old_U_view.template read_tensor<T>(i);
880 const auto alpha_i = alpha_view.template read_entry<T>(i);
881 const auto m_i = lumped_mass_matrix_view.template read_entry<T>(i);
883 lumped_mass_matrix_inverse_view.template read_entry<T>(i);
885 const auto flux_i = view.flux_contribution(
886 old_precomputed_view, initial_precomputed_view, i, U_i);
888 Kokkos::Array<flux_contribution_type, stages> flux_iHs;
891 for (
int s = 0; s < stages; ++s) {
892 const auto U_iHs = stage_U_view[s].template read_tensor<T>(i);
893 flux_iHs[s] = view.flux_contribution(
894 stage_precomputed_view[s], initial_precomputed_view, i, U_iHs);
896 if constexpr (View::have_source_terms) {
897 S_iH += stage_weight[s] *
898 view.nodal_source(stage_precomputed_view[s], i, U_iHs, tau);
905 if constexpr (View::have_source_terms) {
906 S_i = view.nodal_source(old_precomputed_view, i, U_i, tau);
907 S_iH += weight * S_i;
908 U_i_new += tau * S_i;
912 limiter_view.reset(old_precomputed_view, i, U_i, flux_i);
922 const unsigned int *js = sparsity_simd_view.columns(i);
923 if constexpr (shallow_water) {
924 for (
unsigned int col_idx = 0; col_idx < row_length;
925 ++col_idx, js += stride_size) {
927 const auto U_j = old_U_view.template read_tensor<T>(js);
928 const auto flux_j = view.flux_contribution(
929 old_precomputed_view, initial_precomputed_view, js, U_j);
932 dij_matrix_view.template read_entry<T>(i, col_idx);
934 cij_matrix_view.template read_tensor<T>(i, col_idx);
936 const auto B_ij = view.affine_shift(flux_i, flux_j, c_ij, d_ij);
937 affine_shift += B_ij;
940 affine_shift *= tau * m_i_inv;
943 if constexpr (View::have_source_terms) {
944 affine_shift += tau * S_i;
947 js = sparsity_simd_view.columns(i);
948 for (
unsigned int col_idx = 0; col_idx < row_length;
949 ++col_idx, js += stride_size) {
951 const auto U_j = old_U_view.template read_tensor<T>(js);
953 const auto alpha_j = alpha_view.template read_entry<T>(js);
955 const auto d_ij = dij_matrix_view.template read_entry<T>(i, col_idx);
956 auto factor = (alpha_i + alpha_j) * Number(.5);
958 if constexpr (have_discontinuous_ansatz) {
959 const auto incidence_ij =
960 incidence_matrix_view.template read_entry<T>(i, col_idx);
961 factor = std::max(factor, incidence_ij);
964 const auto d_ijH = d_ij * factor;
966#ifdef DEBUG_SYMMETRY_CHECK
974 dij_matrix_view.template read_transposed_entry<T>(i, col_idx);
975 Assert(std::max(std::abs(d_ij - d_ji), T(1.0e-12)) == T(1.0e-12),
977 "d_ij not symmetrized correctly over MPI ranks"));
980 const auto c_ij = cij_matrix_view.template read_tensor<T>(i, col_idx);
981 constexpr auto eps = std::numeric_limits<Number>::epsilon();
984 ryujin::compare_and_apply_mask<dealii::SIMDComparison::less_than>(
985 std::abs(d_ij), T(eps * eps), T(0.), T(1.) / d_ij);
987 const auto scaled_c_ij = c_ij * scale;
989 const auto flux_j = view.flux_contribution(
990 old_precomputed_view, initial_precomputed_view, js, U_j);
992 const auto m_ij = mass_matrix_view.template read_entry<T>(i, col_idx);
998 const auto flux_ij = view.flux_divergence(flux_i, flux_j, c_ij);
999 U_i_new += tau * m_i_inv * flux_ij;
1000 auto P_ij = -flux_ij;
1002 if constexpr (shallow_water) {
1007 const auto &[U_star_ij, U_star_ji] =
1008 view.equilibrated_states(flux_i, flux_j);
1010 U_i_new += tau * m_i_inv * d_ij * (U_star_ji - U_star_ij);
1011 F_iH += d_ijH * (U_star_ji - U_star_ij);
1012 P_ij += (d_ijH - d_ij) * (U_star_ji - U_star_ij);
1014 limiter_view.accumulate(old_precomputed_view,
1023 U_i_new += tau * m_i_inv * d_ij * (U_j - U_i);
1024 F_iH += d_ijH * (U_j - U_i);
1025 P_ij += (d_ijH - d_ij) * (U_j - U_i);
1027 limiter_view.accumulate(old_precomputed_view,
1035 if constexpr (View::have_source_terms) {
1036 F_iH -= m_ij * S_iH;
1044 if constexpr (View::have_high_order_flux) {
1045 const auto high_order_flux_ij =
1046 view.high_order_flux_divergence(flux_i, flux_j, c_ij);
1047 F_iH += weight * high_order_flux_ij;
1048 P_ij += weight * high_order_flux_ij;
1050 F_iH += weight * flux_ij;
1051 P_ij += weight * flux_ij;
1054 if constexpr (View::have_source_terms) {
1056 view.nodal_source(old_precomputed_view, js, U_j, tau);
1057 F_iH += weight * m_ij * S_j;
1058 P_ij += weight * m_ij * S_j;
1061 for (
int s = 0; s < stages; ++s) {
1062 const auto U_jHs = stage_U_view[s].template read_tensor<T>(js);
1063 const auto flux_jHs = view.flux_contribution(
1064 stage_precomputed_view[s], initial_precomputed_view, js, U_jHs);
1066 if constexpr (View::have_high_order_flux) {
1067 const auto high_order_flux_ij =
1068 view.high_order_flux_divergence(flux_iHs[s], flux_jHs, c_ij);
1069 F_iH += stage_weight[s] * high_order_flux_ij;
1070 P_ij += stage_weight[s] * high_order_flux_ij;
1072 const auto flux_ij =
1073 view.flux_divergence(flux_iHs[s], flux_jHs, c_ij);
1074 F_iH += stage_weight[s] * flux_ij;
1075 P_ij += stage_weight[s] * flux_ij;
1078 if constexpr (View::have_source_terms) {
1080 view.nodal_source(stage_precomputed_view[s], js, U_jHs, tau);
1081 F_iH += stage_weight[s] * m_ij * S_js;
1082 P_ij += stage_weight[s] * m_ij * S_js;
1086 pij_matrix_view.template write_tensor<T>(P_ij, i, col_idx,
true);
1089#ifdef DEBUG_EXPENSIVE_BOUNDS_CHECK
1090 if (!view.is_admissible(U_i_new)) {
1091 atomic_store(restart_needed_view, 1);
1095 new_U_view.template write_tensor<T>(U_i_new, i);
1096 r_view.template write_tensor<T>(F_iH, i);
1098 const auto hd_i = m_i * measure_of_omega_inverse;
1099 const auto relaxed_bounds = limiter_view.bounds(hd_i);
1100 bounds_view.template write_tensor<T>(relaxed_bounds, i);
1109 if (have_discontinuous_ansatz) {
1110 loop<MemorySpace, Number>(
1111 loop_name(), body, 0, n_internal, n_owned, std::true_type{});
1113 loop<MemorySpace, Number>(
1114 loop_name(), body, 0, n_internal, n_owned, std::false_type{});
1117 r_view.update_ghost_values();
1118 if (have_discontinuous_ansatz) {
1124 bounds_view.update_ghost_values();
1134 if (n_limiter_iterations != 0) {
1137 const auto body = [=](
auto sentinel,
1138 auto have_discontinuous_ansatz,
1139 const unsigned int i) {
1140 using T =
decltype(sentinel);
1142 const unsigned int stride_size = sparsity_simd_view.stride_of_row(i);
1144 auto limiter_view = limiter_views.template view<T>();
1147 const unsigned int row_length = sparsity_simd_view.row_length(i);
1148 if (row_length == 1)
1152 bounds_view.template read_tensor<T, std::array<T, n_bounds>>(i);
1159 if constexpr (have_discontinuous_ansatz) {
1161 const unsigned int *js = sparsity_simd_view.columns(i) + stride_size;
1162 for (
unsigned int col_idx = 1; col_idx < row_length;
1163 ++col_idx, js += stride_size) {
1164 local_bounds = limiter_view.combine_bounds(
1166 bounds_view.template read_tensor<T, std::array<T, n_bounds>>(
1169 bounds_view.template write_tensor<T>(local_bounds, i);
1172 [[maybe_unused]] T m_i;
1173 if constexpr (have_discontinuous_ansatz)
1174 m_i = lumped_mass_matrix_view.template read_entry<T>(i);
1176 const auto m_i_inv =
1177 lumped_mass_matrix_inverse_view.template read_entry<T>(i);
1179 const auto U_i_new = new_U_view.template read_tensor<T>(i);
1181 const auto F_iH = r_view.template read_tensor<T>(i);
1183 const auto lambda_inv = Number(row_length - 1);
1184 const auto factor = tau * m_i_inv * lambda_inv;
1194 auto P_ij = pij_matrix_view.template read_tensor<T>(i, 1);
1197 const unsigned int *js = sparsity_simd_view.columns(i) + stride_size;
1198 for (
unsigned int col_idx = 1; col_idx < row_length;
1199 ++col_idx, js += stride_size) {
1201 const auto P_ij_next = pij_matrix_view.template read_tensor<T>(
1202 i, col_idx + 1 < row_length ? col_idx + 1 : col_idx);
1203 const auto F_jH = r_view.template read_tensor<T>(js);
1209 const auto kronecker_ij = col_idx == 0 ? T(1.) : T(0.);
1211 if constexpr (have_discontinuous_ansatz) {
1214 const auto m_j = lumped_mass_matrix_view.template read_entry<T>(js);
1215 const auto m_ij_inv =
1216 mass_matrix_inverse_view.template read_entry<T>(i, col_idx);
1217 const auto b_ij = m_i * m_ij_inv - kronecker_ij;
1218 const auto b_ji = m_j * m_ij_inv - kronecker_ij;
1220 P_ij += b_ij * F_jH - b_ji * F_iH;
1225 const auto m_j_inv =
1226 lumped_mass_matrix_inverse_view.template read_entry<T>(js);
1228 mass_matrix_view.template read_entry<T>(i, col_idx);
1229 const auto b_ij = kronecker_ij - m_ij * m_j_inv;
1230 const auto b_ji = kronecker_ij - m_ij * m_i_inv;
1232 P_ij += b_ij * F_jH - b_ji * F_iH;
1236 pij_matrix_view.template write_tensor<T>(P_ij, i, col_idx);
1242 const auto &[l_ij, success] =
1243 limiter_view.limit(local_bounds, U_i_new, P_ij);
1244 lij_matrix_view.template write_entry<T>(l_ij, i, col_idx,
true);
1255 atomic_store(restart_needed_view, 1);
1267 if (have_discontinuous_ansatz) {
1268 loop<MemorySpace, Number>(
1269 loop_name(), body, 0, n_internal, n_owned, std::true_type{});
1271 loop<MemorySpace, Number>(
1272 loop_name(), body, 0, n_internal, n_owned, std::false_type{});
1275 lij_matrix_view.update_ghost_rows();
1288 for (
unsigned int pass = 0; pass < n_limiter_iterations; ++pass) {
1289 bool last_round = (pass + 1 == n_limiter_iterations);
1291 std::string additional_step = (last_round ?
"" :
", next l_ij");
1293 scoped_name(
"symmetrize l_ij, h.-o. update" + additional_step));
1295 const auto lij_view = (n_limiter_iterations == 2 && last_round)
1296 ? lij_matrix_next_view
1299 const auto body = [=](
auto sentinel,
const unsigned int i) {
1300 using T =
decltype(sentinel);
1302 auto limiter_view = limiter_views.template view<T>();
1305 const unsigned int row_length = sparsity_simd_view.row_length(i);
1306 if (row_length == 1)
1309 auto U_i_new = new_U_view.template read_tensor<T>(i);
1311 const Number lambda = Number(1.) / Number(row_length - 1);
1314 for (
unsigned int col_idx = 1; col_idx < row_length; ++col_idx) {
1317 std::min(lij_view.template read_entry<T>(i, col_idx),
1318 lij_view.template read_transposed_entry<T>(i, col_idx));
1320 const auto p_ij = pij_matrix_view.template read_tensor<T>(i, col_idx);
1322 U_i_new += l_ij * lambda * p_ij;
1325#ifdef DEBUG_EXPENSIVE_BOUNDS_CHECK
1326 const auto view = hyperbolic_system_views.template view<T>();
1327 if (!view.is_admissible(U_i_new)) {
1328 atomic_store(restart_needed_view, 1);
1332 new_U_view.template write_tensor<T>(U_i_new, i);
1338 const auto local_bounds =
1339 bounds_view.template read_tensor<T, std::array<T, n_bounds>>(i);
1341 for (
unsigned int col_idx = 1; col_idx < row_length; ++col_idx) {
1343 const auto old_l_ij =
1344 std::min(lij_view.template read_entry<T>(i, col_idx),
1345 lij_view.template read_transposed_entry<T>(i, col_idx));
1347 const auto new_p_ij =
1348 (T(1.) - old_l_ij) *
1349 pij_matrix_view.template read_tensor<T>(i, col_idx);
1351 const auto &[new_l_ij, success] =
1352 limiter_view.limit(local_bounds, U_i_new, new_p_ij);
1364#ifdef DEBUG_EXPENSIVE_BOUNDS_CHECK
1366 atomic_store(restart_needed_view, 1);
1375 const auto entry = (T(1.) - old_l_ij) * new_l_ij;
1376 lij_matrix_next_view.write_entry(entry, i, col_idx,
true);
1380 loop<MemorySpace, Number>(loop_name(), body, 0, n_internal, n_owned);
1383 lij_matrix_next_view.update_ghost_rows();
1390 const auto &old_V = old_state_vector.
V;
1391 auto &new_V = new_state_vector.
V;
1410 int &restart_flag = *restart_needed.
view();
1411 restart_flag = Utilities::MPI::logical_or(
1412 restart_flag != 0, mpi_ensemble_.synchronization_communicator());
1415 if (*restart_needed.
view()) {
1416 switch (id_violation_strategy_) {
1420 std::cout <<
" raised warning, CFL/IDP violation encountered "
1428 std::cout <<
" signalling restart (suggested_tau_max = "
1429 << tau_max <<
")" << std::endl;