From f739cc1ca47db72e52be04386232faaa694173bf Mon Sep 17 00:00:00 2001 From: lucafedeli88 Date: Wed, 30 Oct 2024 01:15:57 +0100 Subject: [PATCH] fix miscellaneous issues --- .../test_picsar_schwinger_engine_core.cpp | 4 ++-- .../QED/QED_tests/test_picsar_tables.cpp | 6 +++--- multi_physics/QED/python_bindings/pxr_qed.cpp | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/multi_physics/QED/QED_tests/test_picsar_schwinger_engine_core.cpp b/multi_physics/QED/QED_tests/test_picsar_schwinger_engine_core.cpp index 939082c77..441bfcf28 100644 --- a/multi_physics/QED/QED_tests/test_picsar_schwinger_engine_core.cpp +++ b/multi_physics/QED/QED_tests/test_picsar_schwinger_engine_core.cpp @@ -108,8 +108,8 @@ BOOST_AUTO_TEST_CASE( picsar_schwinger_core_expected_pair_number ) test_expected_pair_number (reference_length); test_expected_pair_number (); test_expected_pair_number (); - test_expected_pair_number (reference_omega); - test_expected_pair_number (reference_length); + test_expected_pair_number (static_cast(reference_omega)); + test_expected_pair_number (static_cast(reference_length)); test_expected_pair_number (); } diff --git a/multi_physics/QED/QED_tests/test_picsar_tables.cpp b/multi_physics/QED/QED_tests/test_picsar_tables.cpp index d714c2125..f174a927f 100644 --- a/multi_physics/QED/QED_tests/test_picsar_tables.cpp +++ b/multi_physics/QED/QED_tests/test_picsar_tables.cpp @@ -551,7 +551,7 @@ BOOST_AUTO_TEST_CASE( picsar_equispaced_1d_table_constructor_getters) { auto tab_1d = make_1d_table(); const auto const_tab_1d = make_1d_table(); - auto copy_tab_1d = tab_1d; + const auto copy_tab_1d = tab_1d; // NOLINT(performance-unnecessary-copy-initialization) check_table_1d(tab_1d); check_table_1d(const_tab_1d); @@ -629,7 +629,7 @@ BOOST_AUTO_TEST_CASE( picsar_equispaced_2d_table_constructor_getters) { auto tab_2d = make_2d_table(); const auto const_tab_2d = make_2d_table(); - const auto copy_tab_2d = tab_2d; + const auto copy_tab_2d = tab_2d; // NOLINT(performance-unnecessary-copy-initialization) check_table_2d(tab_2d); check_table_2d(const_tab_2d); @@ -729,7 +729,7 @@ BOOST_AUTO_TEST_CASE( picsar_generic_2d_table_constructor_getters) { auto gtab_2d = make_generic_2d_table(); const auto const_gtab_2d = make_generic_2d_table(); - auto copy_gtab_2d = gtab_2d; + auto copy_gtab_2d = gtab_2d; // NOLINT(performance-unnecessary-copy-initialization) check_generic_table_2d(gtab_2d); check_generic_table_2d(const_gtab_2d); diff --git a/multi_physics/QED/python_bindings/pxr_qed.cpp b/multi_physics/QED/python_bindings/pxr_qed.cpp index 0080a9d51..287c38c02 100644 --- a/multi_physics/QED/python_bindings/pxr_qed.cpp +++ b/multi_physics/QED/python_bindings/pxr_qed.cpp @@ -1098,7 +1098,7 @@ PYBIND11_MODULE(pxr_qed, m) { .def("interp", [&](bw_dndt_lookup_table &self, const pyArr& chi_phot){ const REAL* p_chi_phot = nullptr; - size_t how_many = 0; + int how_many = 0; std::tie(how_many, p_chi_phot)= check_and_get_pointers(chi_phot); @@ -1152,7 +1152,7 @@ PYBIND11_MODULE(pxr_qed, m) { }, py::arg("file_name")) .def("load_from", - [&](bw_pair_prod_lookup_table &self, const std::string file_name){ + [&](bw_pair_prod_lookup_table &self, const std::string& file_name){ auto input = std::ifstream(file_name, std::ios::ate | std::ios::binary); if( !input ){ @@ -1173,7 +1173,7 @@ PYBIND11_MODULE(pxr_qed, m) { const pyArr& chi_phot, const pyArr& unf_zero_one_minus_epsi){ const REAL *p_chi_phot = nullptr, *p_unf_zero_one_minus_epsi = nullptr; - size_t how_many = 0; + int how_many = 0; std::tie(how_many, p_chi_phot, p_unf_zero_one_minus_epsi)= check_and_get_pointers(chi_phot, unf_zero_one_minus_epsi); @@ -1307,7 +1307,7 @@ PYBIND11_MODULE(pxr_qed, m) { }, py::arg("file_name")) .def("load_from", - [&](qs_dndt_lookup_table &self, const std::string file_name){ + [&](qs_dndt_lookup_table &self, const std::string& file_name){ auto input = std::ifstream(file_name, std::ios::ate | std::ios::binary); if( !input ){ @@ -1326,7 +1326,7 @@ PYBIND11_MODULE(pxr_qed, m) { .def("interp", [&](qs_dndt_lookup_table &self, const pyArr& chi_part){ const REAL* p_chi_part = nullptr; - size_t how_many = 0; + int how_many = 0; std::tie(how_many, p_chi_part)= check_and_get_pointers(chi_part); @@ -1365,7 +1365,7 @@ PYBIND11_MODULE(pxr_qed, m) { py::arg("do_regular") = py::bool_(true), py::arg("verbose") = py::bool_(true)) .def("save_as", - [&](const qs_photon_emission_lookup_table &self, const std::string file_name){ + [&](const qs_photon_emission_lookup_table &self, const std::string& file_name){ if(!self.is_init()){ throw_error("Table must be initialized!"); } @@ -1380,7 +1380,7 @@ PYBIND11_MODULE(pxr_qed, m) { }, py::arg("file_name")) .def("load_from", - [&](qs_photon_emission_lookup_table &self, const std::string file_name){ + [&](qs_photon_emission_lookup_table &self, const std::string& file_name){ auto input = std::ifstream(file_name, std::ios::ate | std::ios::binary); if( !input ){ @@ -1401,7 +1401,7 @@ PYBIND11_MODULE(pxr_qed, m) { const pyArr& chi_part, const pyArr& unf_zero_one_minus_epsi){ const REAL *p_chi_part = nullptr, *p_unf_zero_one_minus_epsi = nullptr; - size_t how_many = 0; + int how_many = 0; std::tie(how_many, p_chi_part, p_unf_zero_one_minus_epsi)= check_and_get_pointers(chi_part, unf_zero_one_minus_epsi);