From 30b28fee37642c1dcd638b3424a59c72a5e8c7dd Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 15 May 2022 18:02:28 -0400 Subject: [PATCH] Convert "not less than" to "greater than or equal to". The later is much simpler. --- include/deal.II/sundials/arkode.h | 2 +- include/deal.II/sundials/ida.h | 2 +- include/deal.II/sundials/kinsol.h | 2 +- include/deal.II/sundials/n_vector.h | 6 ++--- include/deal.II/sundials/n_vector.templates.h | 16 ++++++------- include/deal.II/sundials/sunlinsol_wrapper.h | 2 +- source/sundials/arkode.cc | 24 +++++++++---------- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/deal.II/sundials/arkode.h b/include/deal.II/sundials/arkode.h index eb31f2e22f..aace0386cd 100644 --- a/include/deal.II/sundials/arkode.h +++ b/include/deal.II/sundials/arkode.h @@ -1267,7 +1267,7 @@ namespace SUNDIALS */ void *arkode_mem; -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) /** * A context object associated with the ARKode solver. */ diff --git a/include/deal.II/sundials/ida.h b/include/deal.II/sundials/ida.h index bc50c9b7e4..7b421356aa 100644 --- a/include/deal.II/sundials/ida.h +++ b/include/deal.II/sundials/ida.h @@ -882,7 +882,7 @@ namespace SUNDIALS */ void *ida_mem; -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) /** * A context object associated with the IDA solver. */ diff --git a/include/deal.II/sundials/kinsol.h b/include/deal.II/sundials/kinsol.h index df2f6b16c7..22edb99b12 100644 --- a/include/deal.II/sundials/kinsol.h +++ b/include/deal.II/sundials/kinsol.h @@ -694,7 +694,7 @@ namespace SUNDIALS */ void *kinsol_mem; -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) /** * A context object associated with the KINSOL solver. */ diff --git a/include/deal.II/sundials/n_vector.h b/include/deal.II/sundials/n_vector.h index 6f959444e6..2fb2b03ff9 100644 --- a/include/deal.II/sundials/n_vector.h +++ b/include/deal.II/sundials/n_vector.h @@ -56,7 +56,7 @@ namespace SUNDIALS * @tparam VectorType Type of the viewed vector. This parameter can be * deduced automatically and will respect a potential const-qualifier. * @param vector The vector to view. -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) * @param nvector_context A SUNDIALS context object to be used for the * operations we want to do on this vector. # endif @@ -67,7 +67,7 @@ namespace SUNDIALS template NVectorView make_nvector_view(VectorType &vector -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , SUNContext nvector_context # endif @@ -139,7 +139,7 @@ namespace SUNDIALS * Constructor. Create view of @p vector. */ NVectorView(VectorType &vector -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , SUNContext nvector_context # endif diff --git a/include/deal.II/sundials/n_vector.templates.h b/include/deal.II/sundials/n_vector.templates.h index ee5220d023..0aec4c0470 100644 --- a/include/deal.II/sundials/n_vector.templates.h +++ b/include/deal.II/sundials/n_vector.templates.h @@ -126,7 +126,7 @@ namespace SUNDIALS template N_Vector create_nvector(NVectorContent *content -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , SUNContext nvector_context # endif @@ -139,7 +139,7 @@ namespace SUNDIALS template N_Vector create_empty_nvector( -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) SUNContext nvector_context # endif ); @@ -366,14 +366,14 @@ namespace SUNDIALS template NVectorView make_nvector_view(VectorType &vector -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , SUNContext nvector_context # endif ) { return NVectorView(vector -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , nvector_context # endif @@ -410,7 +410,7 @@ namespace SUNDIALS template NVectorView::NVectorView(VectorType &vector -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , SUNContext nvector_context # endif @@ -419,7 +419,7 @@ namespace SUNDIALS create_nvector( new NVectorContent::type>( &vector) -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , nvector_context # endif @@ -451,7 +451,7 @@ namespace SUNDIALS template N_Vector create_nvector(NVectorContent *content -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , SUNContext nvector_context # endif @@ -983,7 +983,7 @@ namespace SUNDIALS template N_Vector create_empty_nvector( -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) SUNContext nvector_context # endif ) diff --git a/include/deal.II/sundials/sunlinsol_wrapper.h b/include/deal.II/sundials/sunlinsol_wrapper.h index 7ae539e82c..3edc493764 100644 --- a/include/deal.II/sundials/sunlinsol_wrapper.h +++ b/include/deal.II/sundials/sunlinsol_wrapper.h @@ -167,7 +167,7 @@ namespace SUNDIALS { public: explicit LinearSolverWrapper(LinearSolveFunction lsolve -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , SUNContext &linsol_ctx # endif diff --git a/source/sundials/arkode.cc b/source/sundials/arkode.cc index 83cd451abf..38f8d7eaa6 100644 --- a/source/sundials/arkode.cc +++ b/source/sundials/arkode.cc @@ -389,7 +389,7 @@ namespace SUNDIALS ARKStepFree(&arkode_mem); # endif -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) const int status = SUNContext_Free(&arkode_ctx); (void)status; AssertARKode(status); @@ -452,7 +452,7 @@ namespace SUNDIALS } auto solution_nvector = internal::make_nvector_view(solution -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -524,7 +524,7 @@ namespace SUNDIALS // just a view on the memory in solution, all write operations on yy by // ARKODE will automatically be mirrored to solution auto initial_condition_nvector = internal::make_nvector_view(solution -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -541,7 +541,7 @@ namespace SUNDIALS if (get_local_tolerances) { const auto abs_tols = internal::make_nvector_view(get_local_tolerances() -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -630,7 +630,7 @@ namespace SUNDIALS { ARKStepFree(&arkode_mem); -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) const int status = SUNContext_Free(&arkode_ctx); (void)status; AssertARKode(status); @@ -643,7 +643,7 @@ namespace SUNDIALS // just a view on the memory in solution, all write operations on yy by // ARKODE will automatically be mirrored to solution auto initial_condition_nvector = internal::make_nvector_view(solution -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -674,7 +674,7 @@ namespace SUNDIALS if (get_local_tolerances) { const auto abs_tols = internal::make_nvector_view(get_local_tolerances() -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -734,7 +734,7 @@ namespace SUNDIALS linear_solver = std::make_unique>( solve_linearized_system -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -746,7 +746,7 @@ namespace SUNDIALS // use default solver from SUNDIALS // TODO give user options auto y_template = internal::make_nvector_view(solution -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -793,7 +793,7 @@ namespace SUNDIALS else { auto y_template = internal::make_nvector_view(solution -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -836,7 +836,7 @@ namespace SUNDIALS mass_solver = std::make_unique>( solve_mass -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif @@ -846,7 +846,7 @@ namespace SUNDIALS else { auto y_template = internal::make_nvector_view(solution -# if !DEAL_II_SUNDIALS_VERSION_LT(6, 0, 0) +# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) , arkode_ctx # endif -- 2.39.5