boutproject / BOUT-dev

BOUT++: Plasma fluid finite-difference simulation code in curvilinear coordinate systems
http://boutproject.github.io/
GNU Lesser General Public License v3.0
179 stars 93 forks source link

Add getters for Laplacian flags #2916

Closed ZedThree closed 3 weeks ago

ZedThree commented 1 month ago

These methods allow us to make the {global, inner_boundary, outer_boundary}_flags members private in Laplacian. This combo silences a whole bunch of clang-tidy warnings, mostly around implicit comparison between int and bool. One extra change was to stop passing the flags into tridagMatrix -- this was a bit redundant as it's a private method on Laplacian anyway, so we were passing members to a method.

While checking all this, I found that the LaplaceSPT dtor crashed clang-tidy, mostly likely because it was doing some pointer address fiddling. I've also fixed that, which also fixes a couple of other issues at the same time.

ZedThree commented 1 month ago

Previous test failure was because this fixed one bug (checking !implemented_flags instead of ~implemented_flags) which uncovered use of deprecated flag that triggered an exception!

Now includes a fairly big tidy up of the PETSc laplace test