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

Fix use of removed Datafile in Laplacian constructor; update docs #2636

Merged
merged 7 commits into from
Feb 3, 2023

Conversation

ZedThree
Copy link
Member

@ZedThree ZedThree commented Feb 3, 2023

There was still a use of Datafile in the Laplacian constructor which one of the examples (hw-3D) was using, which meant it didn't compile.

I (finally!) added some docs on the new file IO system that relies on OptionsNetCDF, and how to update physics models to use it.

Also fix the predefined macros for doxygen so it preprocesses everything correctly.

Lastly, just for fun, I've updated the docs to use sphinx-book-theme as a refresh for v5. It's cleaner and easier to navigate than the default readthedocs theme.

This is (hopefully) truly the last PR for v5 -- everything else is getting bumped to 5.1, unless there are new build-blocking bugs discovered in the next week.

@ZedThree ZedThree added this to the BOUT-5.0 milestone Feb 3, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -47,8 +47,7 @@

#include <bout/scorepwrapper.hxx>

LaplaceIPT::LaplaceIPT(Options* opt, CELL_LOC loc, Mesh* mesh_in, Solver* UNUSED(solver),
Datafile* UNUSED(dump))
LaplaceIPT::LaplaceIPT(Options* opt, CELL_LOC loc, Mesh* mesh_in, Solver* UNUSED(solver))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: constructor does not initialize these fields: jy, proc_in, proc_out, myproc, nproc, xs, xe [cppcoreguidelines-pro-type-member-init]

src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.hxx:179:

-   int jy;
+   int jy{};

src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.hxx:220:

-   int proc_in, proc_out;
+   int proc_in{}, proc_out{};

src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.hxx:223:

-   int myproc;
+   int myproc{};

src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.hxx:226:

-   int nproc;
+   int nproc{};

src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.hxx:235:

-   int xs, xe;
+   int xs{}, xe{};

@@ -61,8 +61,7 @@

using namespace std;

LaplacePCR::LaplacePCR(Options* opt, CELL_LOC loc, Mesh* mesh_in, Solver* UNUSED(solver),
Datafile* UNUSED(dump))
LaplacePCR::LaplacePCR(Options* opt, CELL_LOC loc, Mesh* mesh_in, Solver* UNUSED(solver))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: constructor does not initialize these fields: inbndry, outbndry [cppcoreguidelines-pro-type-member-init]

src/invert/laplace/impls/pcr/pcr.hxx:121:

-   int inbndry;
+   int inbndry{};

src/invert/laplace/impls/pcr/pcr.hxx:123:

-   int outbndry;
+   int outbndry{};

@ZedThree
Copy link
Member Author

ZedThree commented Feb 3, 2023

Here's how the new docs theme looks

Any major objections to the new theme?

Copy link
Contributor

@bendudson bendudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ZedThree !

@ZedThree ZedThree merged commit 1885260 into v5.0.0-rc Feb 3, 2023
@ZedThree ZedThree deleted the fix-laplace-datafile branch February 3, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants