Skip to content

Commit

Permalink
add Python function to change low pass filter parameter for magnetost…
Browse files Browse the repository at this point in the history
…atic solver
  • Loading branch information
roelof-groenewald committed Sep 3, 2024
1 parent b3ca73a commit 3d9c5b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/Python/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ The physical fields in WarpX have the following naming:
py::arg("potential"),
"Sets the EB potential string and updates the function parser."
)
.def("set_magnetostatic_time_filter_param",
[](WarpX& wx, amrex::Real time_filter_param) {
wx.GetMagnetostaticSolver().t_filter_param = time_filter_param;
},
py::arg("time_filter_param"),
"Sets the low pass filter parameter for the magnetostatic solver."
)
.def_static("run_div_cleaner",
[] () { WarpX::ProjectionCleanDivB(); },
"Executes projection based divergence cleaner on loaded Bfield_fp_external."
Expand Down
1 change: 1 addition & 0 deletions Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public:
MultiParticleContainer& GetPartContainer () { return *mypc; }
MultiFluidContainer& GetFluidContainer () { return *myfl; }
MacroscopicProperties& GetMacroscopicProperties () { return *m_macroscopic_properties; }
MagnetostaticSolver& GetMagnetostaticSolver () { return *m_magnetostatic_solver; }
HybridPICModel& GetHybridPICModel () { return *m_hybrid_pic_model; }
[[nodiscard]] HybridPICModel * get_pointer_HybridPICModel () const { return m_hybrid_pic_model.get(); }
MultiDiagnostics& GetMultiDiags () {return *multi_diags;}
Expand Down

0 comments on commit 3d9c5b0

Please sign in to comment.