Skip to content

New Y-Boundaries for unified sheath code#3308

Merged
bendudson merged 194 commits into
nextfrom
new-par-bc-unified
Jun 2, 2026
Merged

New Y-Boundaries for unified sheath code#3308
bendudson merged 194 commits into
nextfrom
new-par-bc-unified

Conversation

@dschwoerer

Copy link
Copy Markdown
Contributor

This allows to implement unified BCs for yup/ydown as well as FCI / FA.
Taking into acount things like whether the boundary is next to the domain, or between the parallel slices.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

There were too many comments to post at once. Showing the first 25 out of 109. Check the log or trigger a new build to see more.

Comment thread include/bout/boundary_iterator.hxx
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

There were too many comments to post at once. Showing the first 25 out of 85. Check the log or trigger a new build to see more.

Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/parallel_boundary_region.hxx Outdated
Comment thread include/bout/parallel_boundary_region.hxx Outdated
Comment thread include/bout/parallel_boundary_region.hxx Outdated
Comment thread include/bout/parallel_boundary_region.hxx Outdated
Comment thread include/bout/parallel_boundary_region.hxx Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

There were too many comments to post at once. Showing the first 25 out of 55. Check the log or trigger a new build to see more.

Comment thread include/bout/boundary_iterator.hxx
Comment thread include/bout/boundary_iterator.hxx
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx Outdated
Comment thread include/bout/boundary_iterator.hxx
Comment thread include/bout/parallel_boundary_region.hxx
Comment thread include/bout/parallel_boundary_region.hxx
Comment thread include/bout/parallel_boundary_region.hxx Outdated
Comment thread include/bout/parallel_boundary_region.hxx Outdated
Comment thread include/bout/parallel_boundary_region.hxx Outdated
Makes it easier to reuse for other code
Mimicks the parallel case, to write FCI independent code
The boundary region does not match what is done for the parallel case,
thus porting it to a iterator does not work.
hasBndryUpperY / hasBndryLowerY does not work for FCI and thus the
request does not make sense / can be configured to throw.
Thus it should not be checked if it is not needed.
BoundaryRegionIter has been delted
This allows to extend the boundary code to place the boundary further
away from the boundary.
This is more general and takes the offset() into account, and thus works
for cases where the boundary is between the first and second guard cell
Previously only the first boundary point was set
Taken from hermes-3, adopted for higher order
This allows to write code for FCI and non-FCI using templates.
Directly iterate over the points

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread include/bout/boundary_region.hxx
if (!args.empty()) {
try {
real_value = stringToReal(args.front());
return new T(region, real_value);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: returning a newly created resource of type 'BoundaryOpPar *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]

        return new T(region, real_value);
        ^

Comment thread src/mesh/boundary_factory.cxx

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread include/bout/boundary_op.hxx Outdated
Comment thread src/mesh/boundary_region.cxx

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread include/bout/boundary_region_iter.hxx

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

[[maybe_unused]] const int y_global_offset =
localmesh->getYProcIndex() * (localmesh->yend - localmesh->ystart + 1);
#if BOUT_HAS_PETSC
BOUT_FOR_SERIAL(i, getRegion(region)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "BOUT_FOR_SERIAL" is directly included [misc-include-cleaner]

  BOUT_FOR_SERIAL(i, getRegion(region)) {
  ^

@dschwoerer dschwoerer marked this pull request as ready for review June 2, 2026 11:52
@bshanahan bshanahan requested a review from bendudson June 2, 2026 20:05

@bendudson bendudson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @dschwoerer !

@bendudson bendudson merged commit 18cc8f7 into next Jun 2, 2026
29 of 30 checks passed
@bendudson bendudson deleted the new-par-bc-unified branch June 2, 2026 23:08
bendudson added a commit to boutproject/hermes-3 that referenced this pull request Jun 13, 2026
This function changed behavior in BOUT++ PR
3308 (boutproject/BOUT-dev#3308 , New
Y-Boundaries for unified sheath code).
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.

4 participants