Skip to content

Commit

Permalink
fix miscellaneous issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lucafedeli88 committed Oct 30, 2024
1 parent ccf4149 commit f739cc1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ BOOST_AUTO_TEST_CASE( picsar_schwinger_core_expected_pair_number )
test_expected_pair_number <unit_system::norm_lambda, double>(reference_length);
test_expected_pair_number <unit_system::heaviside_lorentz, double>();
test_expected_pair_number <unit_system::SI, float>();
test_expected_pair_number <unit_system::norm_omega, float>(reference_omega);
test_expected_pair_number <unit_system::norm_lambda, float>(reference_length);
test_expected_pair_number <unit_system::norm_omega, float>(static_cast<float>(reference_omega));
test_expected_pair_number <unit_system::norm_lambda, float>(static_cast<float>(reference_length));
test_expected_pair_number <unit_system::heaviside_lorentz, float>();
}

Expand Down
6 changes: 3 additions & 3 deletions multi_physics/QED/QED_tests/test_picsar_tables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions multi_physics/QED/python_bindings/pxr_qed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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 ){
Expand All @@ -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);

Expand Down Expand Up @@ -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 ){
Expand All @@ -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);

Expand Down Expand Up @@ -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!");
}
Expand All @@ -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 ){
Expand All @@ -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);

Expand Down

0 comments on commit f739cc1

Please sign in to comment.