From 9424e695c4732470761e110a380de8a166426e22 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 29 May 2024 15:50:14 -0700 Subject: [PATCH] AMReX: Update to latest development (#324) * AMReX: Update to latest development Update to latest commit in `development`. * Array4: New overloads for `contains` --- cmake/dependencies/AMReX.cmake | 2 +- src/Base/Array4.H | 6 ++++-- src/Base/Box.cpp | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmake/dependencies/AMReX.cmake b/cmake/dependencies/AMReX.cmake index d61cf509..ca0413d3 100644 --- a/cmake/dependencies/AMReX.cmake +++ b/cmake/dependencies/AMReX.cmake @@ -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)") diff --git a/src/Base/Array4.H b/src/Base/Array4.H index b8a30fce..a0ede4cb 100644 --- a/src/Base/Array4.H +++ b/src/Base/Array4.H @@ -247,8 +247,10 @@ namespace pyAMReX return h_data; }, py::return_value_policy::move) - .def("contains", &Array4::contains) - //.def("__contains__", &Array4::contains) + //.def("__contains__", &Array4::contains) // syntax: "other in b" + .def("contains", py::overload_cast(&Array4::contains, py::const_)) + .def("contains", py::overload_cast(&Array4::contains, py::const_)) + .def("contains", py::overload_cast(&Array4::contains, py::const_)) // getter .def("__getitem__", [](Array4 & a4, IntVect const & v){ return a4(v); }) diff --git a/src/Base/Box.cpp b/src/Base/Box.cpp index e03aaf63..3410dd0d 100644 --- a/src/Base/Box.cpp +++ b/src/Base/Box.cpp @@ -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