Skip to content

Commit ee6537d

Browse files
dpgroteax3l
andauthored
Add grow_low and high to Box (#204)
* Add grow_low and high to Box * Update Stub Files --------- Co-authored-by: ax3l <[email protected]>
1 parent 1016523 commit ee6537d

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

src/Base/Box.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,22 @@ void init_Box(py::module &m) {
184184
py::overload_cast< Direction, int >(&Box::grow),
185185
py::arg("d"), py::arg("n_cell")
186186
)
187+
.def("grow_low",
188+
py::overload_cast< int, int >(&Box::growLo),
189+
py::arg("idir"), py::arg("n_cell")
190+
)
191+
.def("grow_low",
192+
py::overload_cast< Direction, int >(&Box::growLo),
193+
py::arg("d"), py::arg("n_cell")
194+
)
195+
.def("grow_high",
196+
py::overload_cast< int, int >(&Box::growHi),
197+
py::arg("idir"), py::arg("n_cell")
198+
)
199+
.def("grow_high",
200+
py::overload_cast< Direction, int >(&Box::growHi),
201+
py::arg("d"), py::arg("n_cell")
202+
)
187203

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

210226
// minBox
211227
// chop
212-
// growLo
213-
// growHi
214228
// refine
215229
// coarsen
216230
// next

src/amrex/space1d/amrex_1d_pybind/__init__.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,6 +3459,14 @@ class Box:
34593459
def grow(self, idir: int, n_cell: int) -> Box: ...
34603460
@typing.overload
34613461
def grow(self, d: Direction, n_cell: int) -> Box: ...
3462+
@typing.overload
3463+
def grow_high(self, idir: int, n_cell: int) -> Box: ...
3464+
@typing.overload
3465+
def grow_high(self, d: Direction, n_cell: int) -> Box: ...
3466+
@typing.overload
3467+
def grow_low(self, idir: int, n_cell: int) -> Box: ...
3468+
@typing.overload
3469+
def grow_low(self, d: Direction, n_cell: int) -> Box: ...
34623470
def intersects(self, arg0: Box) -> bool: ...
34633471
def lbound(self, arg0: Box) -> Dim3: ...
34643472
@typing.overload

src/amrex/space2d/amrex_2d_pybind/__init__.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,6 +3459,14 @@ class Box:
34593459
def grow(self, idir: int, n_cell: int) -> Box: ...
34603460
@typing.overload
34613461
def grow(self, d: Direction, n_cell: int) -> Box: ...
3462+
@typing.overload
3463+
def grow_high(self, idir: int, n_cell: int) -> Box: ...
3464+
@typing.overload
3465+
def grow_high(self, d: Direction, n_cell: int) -> Box: ...
3466+
@typing.overload
3467+
def grow_low(self, idir: int, n_cell: int) -> Box: ...
3468+
@typing.overload
3469+
def grow_low(self, d: Direction, n_cell: int) -> Box: ...
34623470
def intersects(self, arg0: Box) -> bool: ...
34633471
def lbound(self, arg0: Box) -> Dim3: ...
34643472
@typing.overload

src/amrex/space3d/amrex_3d_pybind/__init__.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,6 +3459,14 @@ class Box:
34593459
def grow(self, idir: int, n_cell: int) -> Box: ...
34603460
@typing.overload
34613461
def grow(self, d: Direction, n_cell: int) -> Box: ...
3462+
@typing.overload
3463+
def grow_high(self, idir: int, n_cell: int) -> Box: ...
3464+
@typing.overload
3465+
def grow_high(self, d: Direction, n_cell: int) -> Box: ...
3466+
@typing.overload
3467+
def grow_low(self, idir: int, n_cell: int) -> Box: ...
3468+
@typing.overload
3469+
def grow_low(self, d: Direction, n_cell: int) -> Box: ...
34623470
def intersects(self, arg0: Box) -> bool: ...
34633471
def lbound(self, arg0: Box) -> Dim3: ...
34643472
@typing.overload

0 commit comments

Comments
 (0)