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

Set extra boundary cells in LaplaceXY2 and LaplaceXY2Hypre #2246

Conversation

johnomotani
Copy link
Contributor

Might fix some uses of uninitialised values.

@jonesholger does this fix the NaN exception you had?

This PR includes some fixes for the use of BOUT_HAS_HYPRE in laplacexy2_hypre.cxx, which I needed to get the autotools build to work. I think the new versions are the 'correct' style. Probably needs checking that this is correct with the CMake build too.

Need to include bout/build_defines.hxx.
Set boundary points past the first one in very dumb way, just set equal
to the first boundary point. Should avoid use of uninitialised values
though.
Set boundary points past the first one in very dumb way, just set equal
to the first boundary point. Should avoid use of uninitialised values
though.
Comment on lines +36 to +38
#include <bout/build_defines.hxx>

#if not BOUT_HAS_HYPRE
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ZedThree is this the correct way to be using BOUT_HAS_HYPRE? Should we prefer bout::build::has_hypre from bout/build_config.hxx instead?

Copy link
Member

Choose a reason for hiding this comment

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

This is correct 👍

bout::build::has_hypre is a standard variable so is useful in "ordinary" code, but if used in e.g. an if statement, both branches have to compile in all cases.

@jonesholger jonesholger merged commit 284eb2d into next-hypre-outerloop-cuda Mar 2, 2021
@johnomotani johnomotani deleted the next-hypre-outerloop-cuda-set-laplacexy2-boundary-cells branch March 2, 2021 23:27
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

3 participants