diff --git a/src/Base/AMReX.cpp b/src/Base/AMReX.cpp index 755ed108..8f5b8595 100644 --- a/src/Base/AMReX.cpp +++ b/src/Base/AMReX.cpp @@ -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.