Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMReX: Update to latest development #379

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/dependencies/AMReX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ option(pyAMReX_amrex_internal "Download & build AMReX" ON)
set(pyAMReX_amrex_repo "https://github.com/AMReX-Codes/amrex.git"
CACHE STRING
"Repository URI to pull and build AMReX from if(pyAMReX_amrex_internal)")
set(pyAMReX_amrex_branch "24.10"
set(pyAMReX_amrex_branch "8df11b69a1169a1b7791a7a5e723feecd121b467"
CACHE STRING
"Repository branch for pyAMReX_amrex_repo if(pyAMReX_amrex_internal)")

Expand Down
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
2 changes: 1 addition & 1 deletion tests/test_soa.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_soa_init():
print("num int components", soa.num_int_comps)
assert soa.num_real_comps == 3 and soa.num_int_comps == 1

soa.define(1, 3)
soa.define(1, 3, ["x", "y", "z", "w"], ["i1", "i2", "i3", "i4"])
print("--test define --")
print("num real components", soa.num_real_comps)
print("num int components", soa.num_int_comps)
Expand Down
Loading