Skip to content

Commit

Permalink
Fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Jan 5, 2024
1 parent 5aa0aa6 commit 8479f27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Source/Utils/WarpXUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,21 +192,14 @@ void ConvertLabParamsToBoost ()
Vector<int> dim_map {2};
#endif

std::string B_ext_grid_s, E_ext_grid_s;

pp_warpx.query("B_ext_grid_init_style", B_ext_grid_s);
pp_warpx.query("E_ext_grid_init_style", E_ext_grid_s);

if ((B_ext_grid_s == "impose_field_in_plane") ||
(E_ext_grid_s == "impose_field_in_plane")) {
pp_warpx.query("impose_field_file_path", WarpX::m_impose_field_file_path);
if ( ! WarpX::m_impose_field_file_path.empty() ) {
Real zstation;
Real tmin = std::numeric_limits<Real>::max();
Real tmax = std::numeric_limits<Real>::lowest();
{
std::string impose_field_file_path;
pp_warpx.get("read_fields_from_path", impose_field_file_path);
Vector<char> headerfile;
ParallelDescriptor::ReadAndBcastFile(impose_field_file_path+"/StationHeader", headerfile);
ParallelDescriptor::ReadAndBcastFile(WarpX::m_impose_field_file_path+"/StationHeader", headerfile);
std::istringstream is(std::string(headerfile.data()));
is >> zstation;
std::string tt;
Expand Down
5 changes: 5 additions & 0 deletions Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ public:
//! The beginning time of boosted frame simulation
static inline amrex::Real m_t_boost_offset = 0;

//! For boosted frame simulation restarting from a previous lab frame
//! run w/ recording plane, this is the path to the data. This also
//! serves as a boolean flag.
static inline std::string m_impose_field_file_path;

/** Maximum level up to which the externally defined electric and magnetic fields are initialized.
* The default value is set to the max levels in the simulation.
* if lev > maxlevel_extEMfield_init, the fields on those levels will have a default value of 0
Expand Down

0 comments on commit 8479f27

Please sign in to comment.