Skip to content

Commit 9f2d0f9

Browse files
authored
WarpX class: ProjectionCleanDivB no longer static (#5615)
This PR contributes to reducing the usage of static member functions and static variables in the WarpX class.
1 parent 962829d commit 9f2d0f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Source/Python/WarpX.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ The physical fields in WarpX have the following naming:
266266
py::arg("potential"),
267267
"Sets the EB potential string and updates the function parser."
268268
)
269-
.def_static("run_div_cleaner",
270-
[] () { WarpX::ProjectionCleanDivB(); },
269+
.def("run_div_cleaner",
270+
[] (WarpX& wx) { wx.ProjectionCleanDivB(); },
271271
"Executes projection based divergence cleaner on loaded Bfield_fp_external."
272272
)
273273
.def("synchronize",

Source/WarpX.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ public:
849849

850850
void ComputeDivE(amrex::MultiFab& divE, int lev);
851851

852-
static void ProjectionCleanDivB ();
852+
void ProjectionCleanDivB ();
853853

854854
[[nodiscard]] amrex::IntVect getngEB() const { return guard_cells.ng_alloc_EB; }
855855
[[nodiscard]] amrex::IntVect getngF() const { return guard_cells.ng_alloc_F; }

0 commit comments

Comments
 (0)