Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electromagnetic solver settings #266

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading