Skip to content

Commit

Permalink
only set max iters to match ES input
Browse files Browse the repository at this point in the history
  • Loading branch information
roelof-groenewald committed Dec 17, 2024
1 parent aca9901 commit a7304ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
15 changes: 2 additions & 13 deletions Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,13 @@ WarpX::AddMagnetostaticFieldLabFrame()
else {
required_precision = 1e-11;
}
int max_iters = 200;
int verbosity = 2;

// load user specified parameters
const ParmParse pp_warpx("warpx");
utils::parser::queryWithParser(
pp_warpx, "self_fields_required_precision", required_precision);
utils::parser::queryWithParser(
pp_warpx, "self_fields_absolute_tolerance", absolute_tolerance);
utils::parser::queryWithParser(
pp_warpx, "self_fields_max_iters", max_iters);
utils::parser::queryWithParser(
pp_warpx, "self_fields_verbosity", verbosity);

computeVectorPotential(
m_fields.get_mr_levels_alldirs(FieldType::current_fp, finest_level),
m_fields.get_mr_levels_alldirs(FieldType::vector_potential_fp_nodal, finest_level),
required_precision, absolute_tolerance, max_iters, verbosity
required_precision, absolute_tolerance, magnetostatic_solver_max_iters,
verbosity
);
}

Expand Down
1 change: 1 addition & 0 deletions Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ public:

// Magnetostatic Solver Interface
MagnetostaticSolver::VectorPoissonBoundaryHandler m_vector_poisson_boundary_handler;
int magnetostatic_solver_max_iters = 200;
void ComputeMagnetostaticField ();
void AddMagnetostaticFieldLabFrame ();
void computeVectorPotential (ablastr::fields::MultiLevelVectorField const& curr,
Expand Down
1 change: 1 addition & 0 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ WarpX::ReadParameters ()
poisson_solver_id!=PoissonSolverAlgo::IntegratedGreenFunction,
"To use the FFT Poisson solver, compile with WARPX_USE_FFT=ON.");
#endif
utils::parser::queryWithParser(pp_warpx, "self_fields_max_iters", magnetostatic_solver_max_iters);

WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
(
Expand Down

0 comments on commit a7304ad

Please sign in to comment.