From b00a1858f3fd7e5da54a2e35bfd030f62ea642ac Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 9 Oct 2024 15:12:07 -0700 Subject: [PATCH] Fix Breaking APIs for `AddReal/IntComp` --- src/Particle/ParticleContainer.H | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/Particle/ParticleContainer.H b/src/Particle/ParticleContainer.H index f820dc7f..ef103d3e 100644 --- a/src/Particle/ParticleContainer.H +++ b/src/Particle/ParticleContainer.H @@ -205,10 +205,24 @@ void make_ParticleContainer_and_Iterators (py::module &m, std::string allocstr) .def_property_readonly("byte_spread", &ParticleContainerType::ByteSpread) // runtime components - .def("add_real_comp", py::overload_cast(&ParticleContainerType::template AddRealComp), - py::arg("communicate")=true, "add a new runtime component with type Real") - .def("add_int_comp", py::overload_cast(&ParticleContainerType::template AddIntComp), - py::arg("communicate")=true, "add a new runtime component with type Int") + .def("add_real_comp", py::overload_cast(&ParticleContainerType::AddRealComp), + py::arg("communicate")=1, + "add a new runtime component with type Real" + ) + .def("add_int_comp", py::overload_cast(&ParticleContainerType::AddIntComp), + py::arg("communicate")=1, + "add a new runtime component with type Int" + ) + .def("add_real_comp", py::overload_cast(&ParticleContainerType::AddRealComp), + py::arg("name"), + py::arg("communicate")=1, + "add a new runtime component with type Real" + ) + .def("add_int_comp", py::overload_cast(&ParticleContainerType::AddIntComp), + py::arg("name"), + py::arg("communicate")=1, + "add a new runtime component with type Int" + ) .def_property_readonly("finest_level", &ParticleContainerBase::finestLevel)