Skip to content

Commit

Permalink
Add initialized and size to AMReX (#156)
Browse files Browse the repository at this point in the history
* Add initizlized and size to AMReX

* Add doc strings
  • Loading branch information
dpgrote committed Jul 21, 2023
1 parent 4202de6 commit 1992c18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Base/AMReX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ void init_AMReX(py::module& m)
}, py::return_value_policy::reference,
"Initialize AMReX library");

m.def("initialized", &Initialized,
"Returns true if there are any currently-active and initialized "
"AMReX instances (i.e. one for which amrex::Initialize has been called, "
"and amrex::Finalize has not). Otherwise false.");
m.def("size", &AMReX::size,
"The amr stack size, the number of amr instances pushed.");

constexpr auto run_gc = []() {
// explicitly run the garbage collector, so deleted objects
// get freed.
Expand Down

0 comments on commit 1992c18

Please sign in to comment.