Skip to content

Commit 88c6008

Browse files
leaving the wrapper in header file
1 parent 51056ac commit 88c6008

File tree

2 files changed

+24
-33
lines changed

2 files changed

+24
-33
lines changed

src/Base/MultiFab.H

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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",

src/Base/MultiFab.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,5 @@ void init_MultiFab(py::module &m, py::class_< amrex::MFIter > & py_MFIter)
105105

106106
m.def("copy_mfab", py::overload_cast< MultiFab &, MultiFab const &, int, int, int, int >(&MultiFab::Copy), py::arg("dst"), py::arg("src"), py::arg("srccomp"), py::arg("dstcomp"), py::arg("numcomp"), py::arg("nghost"))
107107
.def("copy_mfab", py::overload_cast< MultiFab &, MultiFab const &, int, int, int, IntVect const & >(&MultiFab::Copy), py::arg("dst"), py::arg("src"), py::arg("srccomp"), py::arg("dstcomp"), py::arg("numcomp"), py::arg("nghost"));
108-
m.def("copymf",
109-
[](T &self, T const &src, int srccomp, int dstcomp, int numcomp, int nghost) {
110-
T::Copy(self, src, srccomp, dstcomp, numcomp, nghost);
111-
},
112-
py::arg("src"), py::arg("srccomp"), py::arg("dstcomp"), py::arg("numcomp"), py::arg("nghost"),
113-
"Copy from src to self including nghost ghost cells.\n"
114-
"The two MultiFabs MUST have the same underlying BoxArray. The copy is local"
115-
)
116-
;
117108

118109
}

0 commit comments

Comments
 (0)