Skip to content

Commit

Permalink
zero_current: Don't mark velocity as used
Browse files Browse the repository at this point in the history
IS_SET marks the quantity as used, so it can't be modified
with e.g. boundary conditions. Using the `.isSet()` method
doesn't mark as used.
  • Loading branch information
bendudson committed Oct 4, 2024
1 parent 65810a7 commit 2e3cabf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zero_current.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void ZeroCurrent::transform(Options &state) {

// Get the species density
Options& species = state["species"][name];
if (IS_SET(species["velocity"])) {
if (species["velocity"].isSet()) {
throw BoutException("Cannot use zero_current in species {} if velocity already set\n", name);
}
Field3D N = getNoBoundary<Field3D>(species["density"]);
Expand Down

0 comments on commit 2e3cabf

Please sign in to comment.