Skip to content

Commit

Permalink
Fix Breaking APIs for AddReal/IntComp
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Oct 9, 2024
1 parent 561b481 commit b00a185
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/Particle/ParticleContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>(&ParticleContainerType::template AddRealComp<bool>),
py::arg("communicate")=true, "add a new runtime component with type Real")
.def("add_int_comp", py::overload_cast<bool>(&ParticleContainerType::template AddIntComp<bool>),
py::arg("communicate")=true, "add a new runtime component with type Int")
.def("add_real_comp", py::overload_cast<int>(&ParticleContainerType::AddRealComp),
py::arg("communicate")=1,
"add a new runtime component with type Real"
)
.def("add_int_comp", py::overload_cast<int>(&ParticleContainerType::AddIntComp),
py::arg("communicate")=1,
"add a new runtime component with type Int"
)
.def("add_real_comp", py::overload_cast<std::string const &, int>(&ParticleContainerType::AddRealComp),
py::arg("name"),
py::arg("communicate")=1,
"add a new runtime component with type Real"
)
.def("add_int_comp", py::overload_cast<std::string const &, int>(&ParticleContainerType::AddIntComp),
py::arg("name"),
py::arg("communicate")=1,
"add a new runtime component with type Int"
)

.def_property_readonly("finest_level", &ParticleContainerBase::finestLevel)

Expand Down

0 comments on commit b00a185

Please sign in to comment.