@@ -493,30 +493,30 @@ factory :
493493 ;
494494 }
495495
496- // py_MultiFab
497- // .def("copymf",
498- // [](T &self, T const &src, int srccomp, int dstcomp, int numcomp, int nghost) {
499- // T::Copy(self, src, srccomp, dstcomp, numcomp, nghost);
500- // },
501- // py::arg("src"), py::arg("srccomp"), py::arg("dstcomp"), py::arg("numcomp"), py::arg("nghost"),
502- // "Copy from src to self including nghost ghost cells.\n"
503- // "The two MultiFabs MUST have the same underlying BoxArray. The copy is local"
504- // )
505- // ;
506- //
507- // // TODO: Missing in iMultiFab https://github.com/AMReX-Codes/amrex/issues/4317
508- // if constexpr (std::is_same_v<T, MultiFab>) {
509- // py_MultiFab
510- // .def("copymf",
511- // [](T &self, T const &src, int srccomp, int dstcomp, int numcomp, IntVect const &nghost) {
512- // T::Copy(self, src, srccomp, dstcomp, numcomp, nghost);
513- // },
514- // py::arg("src"), py::arg("srccomp"), py::arg("dstcomp"), py::arg("numcomp"), py::arg("nghost"),
515- // "Copy from src to self including nghost ghost cells.\n"
516- // "The two MultiFabs MUST have the same underlying BoxArray. The copy is local"
517- // )
518- // ;
519- // }
496+ py_MultiFab
497+ .def (" copymf" ,
498+ [](T &self, T const &src, int srccomp, int dstcomp, int numcomp, int nghost) {
499+ T::Copy (self, src, srccomp, dstcomp, numcomp, nghost);
500+ },
501+ py::arg (" src" ), py::arg (" srccomp" ), py::arg (" dstcomp" ), py::arg (" numcomp" ), py::arg (" nghost" ),
502+ " Copy from src to self including nghost ghost cells.\n "
503+ " The two MultiFabs MUST have the same underlying BoxArray. The copy is local"
504+ )
505+ ;
506+
507+ // TODO: Missing in iMultiFab https://github.com/AMReX-Codes/amrex/issues/4317
508+ if constexpr (std::is_same_v<T, MultiFab>) {
509+ py_MultiFab
510+ .def (" copymf" ,
511+ [](T &self, T const &src, int srccomp, int dstcomp, int numcomp, IntVect const &nghost) {
512+ T::Copy (self, src, srccomp, dstcomp, numcomp, nghost);
513+ },
514+ py::arg (" src" ), py::arg (" srccomp" ), py::arg (" dstcomp" ), py::arg (" numcomp" ), py::arg (" nghost" ),
515+ " Copy from src to self including nghost ghost cells.\n "
516+ " The two MultiFabs MUST have the same underlying BoxArray. The copy is local"
517+ )
518+ ;
519+ }
520520
521521 py_MultiFab
522522 .def (" subtract" ,
0 commit comments