Skip to content

Commit

Permalink
Adding hook to call when loading B field from external file.
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkse committed Jun 24, 2024
1 parent 28355e9 commit a650321
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Initialization/WarpXInitData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "Filter/BilinearFilter.H"
#include "Filter/NCIGodfreyFilter.H"
#include "Initialization/ExternalField.H"
#include "Initialization/DivCleaner/ProjectionDivCleaner.H"
#include "Particles/MultiParticleContainer.H"
#include "Utils/Algorithms/LinearInterpolation.H"
#include "Utils/Logo/GetLogo.H"
Expand Down Expand Up @@ -1344,6 +1345,13 @@ WarpX::LoadExternalFieldsFromFile (int const lev)
ReadExternalFieldFromFile(m_p_ext_field_params->external_fields_path, Bfield_fp_external[lev][1].get(), "B", "y");
ReadExternalFieldFromFile(m_p_ext_field_params->external_fields_path, Bfield_fp_external[lev][2].get(), "B", "z");
#endif
if constexpr (std::is_same<Real, double>::value) {
run_ProjectionDivCleaner();
} else {
ablastr::warn_manager::WMRecordWarning("External Fields Loader",
"Field Precision is SINGLE, so divB not cleaned. Interpolation may lead to non-zero B field divergence.",
ablastr::warn_manager::WarnPriority::medium);
}
}
if (m_p_ext_field_params->E_ext_grid_type == ExternalFieldType::read_from_file) {
#if defined(WARPX_DIM_RZ)
Expand Down

0 comments on commit a650321

Please sign in to comment.