Skip to content

Commit

Permalink
Add grow_low and high to Box (#204)
Browse files Browse the repository at this point in the history
* Add grow_low and high to Box

* Update Stub Files

---------

Co-authored-by: ax3l <[email protected]>
  • Loading branch information
dpgrote and ax3l authored Oct 19, 2023
1 parent 1016523 commit ee6537d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/Base/Box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,22 @@ void init_Box(py::module &m) {
py::overload_cast< Direction, int >(&Box::grow),
py::arg("d"), py::arg("n_cell")
)
.def("grow_low",
py::overload_cast< int, int >(&Box::growLo),
py::arg("idir"), py::arg("n_cell")
)
.def("grow_low",
py::overload_cast< Direction, int >(&Box::growLo),
py::arg("d"), py::arg("n_cell")
)
.def("grow_high",
py::overload_cast< int, int >(&Box::growHi),
py::arg("idir"), py::arg("n_cell")
)
.def("grow_high",
py::overload_cast< Direction, int >(&Box::growHi),
py::arg("d"), py::arg("n_cell")
)

.def("surrounding_nodes",
py::overload_cast< >(&Box::surroundingNodes))
Expand All @@ -209,8 +225,6 @@ void init_Box(py::module &m) {

// minBox
// chop
// growLo
// growHi
// refine
// coarsen
// next
Expand Down
8 changes: 8 additions & 0 deletions src/amrex/space1d/amrex_1d_pybind/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,14 @@ class Box:
def grow(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow(self, d: Direction, n_cell: int) -> Box: ...
@typing.overload
def grow_high(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow_high(self, d: Direction, n_cell: int) -> Box: ...
@typing.overload
def grow_low(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow_low(self, d: Direction, n_cell: int) -> Box: ...
def intersects(self, arg0: Box) -> bool: ...
def lbound(self, arg0: Box) -> Dim3: ...
@typing.overload
Expand Down
8 changes: 8 additions & 0 deletions src/amrex/space2d/amrex_2d_pybind/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,14 @@ class Box:
def grow(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow(self, d: Direction, n_cell: int) -> Box: ...
@typing.overload
def grow_high(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow_high(self, d: Direction, n_cell: int) -> Box: ...
@typing.overload
def grow_low(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow_low(self, d: Direction, n_cell: int) -> Box: ...
def intersects(self, arg0: Box) -> bool: ...
def lbound(self, arg0: Box) -> Dim3: ...
@typing.overload
Expand Down
8 changes: 8 additions & 0 deletions src/amrex/space3d/amrex_3d_pybind/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,14 @@ class Box:
def grow(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow(self, d: Direction, n_cell: int) -> Box: ...
@typing.overload
def grow_high(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow_high(self, d: Direction, n_cell: int) -> Box: ...
@typing.overload
def grow_low(self, idir: int, n_cell: int) -> Box: ...
@typing.overload
def grow_low(self, d: Direction, n_cell: int) -> Box: ...
def intersects(self, arg0: Box) -> bool: ...
def lbound(self, arg0: Box) -> Dim3: ...
@typing.overload
Expand Down

0 comments on commit ee6537d

Please sign in to comment.