@@ -756,8 +756,7 @@ WarpX::ReadParameters ()
756
756
" Currently, the embedded boundary in RZ only works for electrostatic solvers (or no solver)." );
757
757
#endif
758
758
759
- if (electrostatic_solver_id == ElectrostaticSolverAlgo::LabFrame ||
760
- electrostatic_solver_id == ElectrostaticSolverAlgo::LabFrameElectroMagnetostatic)
759
+ if (electrostatic_solver_id != ElectrostaticSolverAlgo::Relativistic)
761
760
{
762
761
// Note that with the relativistic version, these parameters would be
763
762
// input for each species.
@@ -771,13 +770,18 @@ WarpX::ReadParameters ()
771
770
}
772
771
// Parse the input file for domain boundary potentials
773
772
const ParmParse pp_boundary (" boundary" );
774
- pp_boundary.query (" potential_lo_x" , m_poisson_boundary_handler.potential_xlo_str );
775
- pp_boundary.query (" potential_hi_x" , m_poisson_boundary_handler.potential_xhi_str );
776
- pp_boundary.query (" potential_lo_y" , m_poisson_boundary_handler.potential_ylo_str );
777
- pp_boundary.query (" potential_hi_y" , m_poisson_boundary_handler.potential_yhi_str );
778
- pp_boundary.query (" potential_lo_z" , m_poisson_boundary_handler.potential_zlo_str );
779
- pp_boundary.query (" potential_hi_z" , m_poisson_boundary_handler.potential_zhi_str );
780
- pp_warpx.query (" eb_potential(x,y,z,t)" , m_poisson_boundary_handler.potential_eb_str );
773
+ bool potential_specified = false ;
774
+ // When reading the potential at the boundary from the input file, set this flag to true if any of the potential is specified
775
+ potential_specified |= pp_boundary.query (" potential_lo_x" , m_poisson_boundary_handler.potential_xlo_str );
776
+ potential_specified |= pp_boundary.query (" potential_hi_x" , m_poisson_boundary_handler.potential_xhi_str );
777
+ potential_specified |= pp_boundary.query (" potential_lo_y" , m_poisson_boundary_handler.potential_ylo_str );
778
+ potential_specified |= pp_boundary.query (" potential_hi_y" , m_poisson_boundary_handler.potential_yhi_str );
779
+ potential_specified |= pp_boundary.query (" potential_lo_z" , m_poisson_boundary_handler.potential_zlo_str );
780
+ potential_specified |= pp_boundary.query (" potential_hi_z" , m_poisson_boundary_handler.potential_zhi_str );
781
+ #if defined(AMREX_USE_EB)
782
+ potential_specified |= pp_warpx.query (" eb_potential(x,y,z,t)" , m_poisson_boundary_handler.potential_eb_str );
783
+ #endif
784
+ m_boundary_potential_specified = potential_specified;
781
785
m_poisson_boundary_handler.buildParsers ();
782
786
#ifdef WARPX_DIM_RZ
783
787
pp_boundary.query (" verboncoeur_axis_correction" , verboncoeur_axis_correction);
0 commit comments