@@ -170,6 +170,28 @@ The physical fields in WarpX have the following naming:
170
170
" Get the current physical time step size on mesh-refinement level ``lev``."
171
171
)
172
172
173
+ .def (" set_potential_on_domain_boundary" ,
174
+ [](WarpX& wx,
175
+ std::string potential_lo_x, std::string potential_hi_x,
176
+ std::string potential_lo_y, std::string potential_hi_y,
177
+ std::string potential_lo_z, std::string potential_hi_z)
178
+ {
179
+ if (potential_lo_x != " " ) wx.m_poisson_boundary_handler .potential_xlo_str = potential_lo_x;
180
+ if (potential_hi_x != " " ) wx.m_poisson_boundary_handler .potential_xhi_str = potential_hi_x;
181
+ if (potential_lo_y != " " ) wx.m_poisson_boundary_handler .potential_ylo_str = potential_lo_y;
182
+ if (potential_hi_y != " " ) wx.m_poisson_boundary_handler .potential_yhi_str = potential_hi_y;
183
+ if (potential_lo_z != " " ) wx.m_poisson_boundary_handler .potential_zlo_str = potential_lo_z;
184
+ if (potential_hi_z != " " ) wx.m_poisson_boundary_handler .potential_zhi_str = potential_hi_z;
185
+ wx.m_poisson_boundary_handler .buildParsers ();
186
+ },
187
+ py::arg (" potential_lo_x" ) = " " ,
188
+ py::arg (" potential_hi_x" ) = " " ,
189
+ py::arg (" potential_lo_y" ) = " " ,
190
+ py::arg (" potential_hi_y" ) = " " ,
191
+ py::arg (" potential_lo_z" ) = " " ,
192
+ py::arg (" potential_hi_z" ) = " " ,
193
+ " Sets the domain boundary potential string(s) and updates the function parser."
194
+ )
173
195
.def (" set_potential_on_eb" ,
174
196
[](WarpX& wx, std::string potential) {
175
197
wx.m_poisson_boundary_handler .setPotentialEB (potential);
0 commit comments