Skip to content

Remove deprecated FieldGenerator::generate#3216

Merged
ZedThree merged 1 commit into
nextfrom
remove-deprecated-generator-method
Dec 1, 2025
Merged

Remove deprecated FieldGenerator::generate#3216
ZedThree merged 1 commit into
nextfrom
remove-deprecated-generator-method

Conversation

@ZedThree
Copy link
Copy Markdown
Member

@ZedThree ZedThree commented Dec 1, 2025

The only use was in boundary conditions at CELL_ZLOW. It look a minute for me
to understand what was happening here and why we couldn't just use Context()
already -- we need to set a custom x OR y depending on where the boundary
is, although at first glance it looks like we're setting both, the trick is that
only one of bndry->bx/by is actually non-zero.

An alternative to this would be to change Context(BoundaryRegion) to use the
staggered location like a bitfield and pass e.g. CELL_XLOW | CELL_ZLOW. This
would avoid some duplicated work.

The only remaining use of a deprecated function is now Mesh::firstY()/lastY(),
again in the boundaries, although BoutMesh also uses it without passing
xpos.

I suppose this also serves as our annual reminder that the boundaries need a
complete refactor.

Copy link
Copy Markdown
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

Comment thread src/mesh/boundary_standard.cxx Outdated
Comment thread src/mesh/boundary_standard.cxx Outdated
Comment thread src/mesh/boundary_standard.cxx Outdated
@ZedThree ZedThree force-pushed the remove-deprecated-generator-method branch from 93e301b to ab58ba5 Compare December 1, 2025 14:12
Copy link
Copy Markdown
Contributor

@dschwoerer dschwoerer left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup!

@ZedThree ZedThree merged commit 3228607 into next Dec 1, 2025
27 checks passed
@ZedThree ZedThree deleted the remove-deprecated-generator-method branch December 1, 2025 14:55
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.

2 participants