We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d071ae4 commit 4c4ee46Copy full SHA for 4c4ee46
src/Base/VisMF.cpp
@@ -32,5 +32,15 @@ void init_VisMF(py::module &m)
32
py::return_value_policy::move,
33
py::arg("name"),
34
"Reads a MultiFab from the specified file")
35
+ .def_static("Read",
36
+ [](const std::string &name, amrex::MultiFab &mf) {
37
+ if (amrex::VisMF::Exist(name)) {
38
+ amrex::VisMF::Read(mf, name);
39
+ } else {
40
+ throw std::runtime_error("MultiFab file " + name + " couldn't be found!");
41
+ }
42
+ },
43
+ py::arg("name"), py::arg("mf"),
44
+ "Reads a MultiFab from the specified file into the given MultiFab. The BoxArray on the disk must match the BoxArray * in mf")
45
;
46
}
0 commit comments