Skip to content

Commit

Permalink
Merge pull request #266 from bendudson/electromagnetic-restart
Browse files Browse the repository at this point in the history
Electromagnetic solver settings
  • Loading branch information
bendudson authored Oct 17, 2024
2 parents 6a0a2de + a4b3049 commit a7b552d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/electromagnetic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
// These are used if the maximum iterations is reached.
// Note: A loose tolerance is used because repeated iterations
// can usually recover tight tolerances.
BOUT_OVERRIDE_DEFAULT_OPTION("electromagnetic:laplacian:type", "naulin");
BOUT_OVERRIDE_DEFAULT_OPTION("electromagnetic:laplacian:rtol_accept", 1e-2);
BOUT_OVERRIDE_DEFAULT_OPTION("electromagnetic:laplacian:atol_accept", 1e-6);
BOUT_OVERRIDE_DEFAULT_OPTION("electromagnetic:laplacian:maxits", 1000);

Electromagnetic::Electromagnetic(std::string name, Options &alloptions, Solver*) {
Electromagnetic::Electromagnetic(std::string name, Options &alloptions, Solver* solver) {
AUTO_TRACE();

Options& units = alloptions["units"];
Expand All @@ -29,10 +31,8 @@ Electromagnetic::Electromagnetic(std::string name, Options &alloptions, Solver*)

// Use the "Naulin" solver because we need to include toroidal
// variations of the density (A coefficient)
if (!options["laplacian"].isSet("type")) {
options["laplacian"]["type"] = "naulin";
}
aparSolver = Laplacian::create(&options["laplacian"]);
aparSolver->savePerformance(*solver, "AparSolver");

const_gradient = options["const_gradient"]
.doc("Extrapolate gradient of Apar into all radial boundaries?")
Expand Down

0 comments on commit a7b552d

Please sign in to comment.