Skip to content

Commit 9424e69

Browse files
authored
AMReX: Update to latest development (#324)
* AMReX: Update to latest development Update to latest commit in `development`. * Array4: New overloads for `contains`
1 parent c4d5dfd commit 9424e69

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

cmake/dependencies/AMReX.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ option(pyAMReX_amrex_internal "Download & build AMReX" ON)
8989
set(pyAMReX_amrex_repo "https://github.com/AMReX-Codes/amrex.git"
9090
CACHE STRING
9191
"Repository URI to pull and build AMReX from if(pyAMReX_amrex_internal)")
92-
set(pyAMReX_amrex_branch "24.05"
92+
set(pyAMReX_amrex_branch "28b010126a1b39297d8a496ba81f171d8563953b"
9393
CACHE STRING
9494
"Repository branch for pyAMReX_amrex_repo if(pyAMReX_amrex_internal)")
9595

src/Base/Array4.H

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,10 @@ namespace pyAMReX
247247
return h_data;
248248
}, py::return_value_policy::move)
249249

250-
.def("contains", &Array4<T>::contains)
251-
//.def("__contains__", &Array4<T>::contains)
250+
//.def("__contains__", &Array4<T>::contains) // syntax: "other in b"
251+
.def("contains", py::overload_cast<int, int, int>(&Array4<T>::contains, py::const_))
252+
.def("contains", py::overload_cast<IntVect const &>(&Array4<T>::contains, py::const_))
253+
.def("contains", py::overload_cast<Dim3 const &>(&Array4<T>::contains, py::const_))
252254

253255
// getter
254256
.def("__getitem__", [](Array4<T> & a4, IntVect const & v){ return a4(v); })

src/Base/Box.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ void init_Box(py::module &m) {
288288

289289
.def("make_slab",
290290
&Box::makeSlab,
291-
py::arg("direction"), py::arg("slab_index"))
291+
py::arg("direction"), py::arg("slab_index"),
292+
"Flatten the box in one direction.")
292293

293294
// minBox
294295
// chop

0 commit comments

Comments
 (0)