Skip to content

Commit

Permalink
AMReX: Update to latest development (#324)
Browse files Browse the repository at this point in the history
* AMReX: Update to latest development

Update to latest commit in `development`.

* Array4: New overloads for `contains`
  • Loading branch information
ax3l authored May 29, 2024
1 parent c4d5dfd commit 9424e69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/dependencies/AMReX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,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.05"
set(pyAMReX_amrex_branch "28b010126a1b39297d8a496ba81f171d8563953b"
CACHE STRING
"Repository branch for pyAMReX_amrex_repo if(pyAMReX_amrex_internal)")

Expand Down
6 changes: 4 additions & 2 deletions src/Base/Array4.H
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ namespace pyAMReX
return h_data;
}, py::return_value_policy::move)

.def("contains", &Array4<T>::contains)
//.def("__contains__", &Array4<T>::contains)
//.def("__contains__", &Array4<T>::contains) // syntax: "other in b"
.def("contains", py::overload_cast<int, int, int>(&Array4<T>::contains, py::const_))
.def("contains", py::overload_cast<IntVect const &>(&Array4<T>::contains, py::const_))
.def("contains", py::overload_cast<Dim3 const &>(&Array4<T>::contains, py::const_))

// getter
.def("__getitem__", [](Array4<T> & a4, IntVect const & v){ return a4(v); })
Expand Down
3 changes: 2 additions & 1 deletion src/Base/Box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ void init_Box(py::module &m) {

.def("make_slab",
&Box::makeSlab,
py::arg("direction"), py::arg("slab_index"))
py::arg("direction"), py::arg("slab_index"),
"Flatten the box in one direction.")

// minBox
// chop
Expand Down

0 comments on commit 9424e69

Please sign in to comment.