Skip to content

Conversation

@ZedThree
Copy link
Member

@ZedThree ZedThree commented Jan 9, 2026

Supports #3242

Note these don't actually add Z parallelisation, just let us handle it correctly in various places

  • Mesh::GlobalZ for global Z index in [0, 1]
  • Mesh::getNZPE/getZProcIndex for Z processor info
  • bout::fft::checkZSerial to guard routines using FFT

These also make a lot of code more consistent between the directions

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

dschwoerer
dschwoerer previously approved these changes Jan 13, 2026
d7919 and others added 14 commits January 30, 2026 12:00
Tests are updated because `FakeMesh` has `GlobalZ(z) == z`. This is completely
arbitrary, we could have a `GlobalZ` definition that matches `BoutMesh` (`z / nz`)
then we wouldn't need to change the tests, but this way is a bit clearer what
we're testing.
Also make related methods all `const`
These are just the `BoutReal` overloads of the equivalent `getGlobal?Index` methods
[skip ci]

Co-authored-by: David Bold <dschwoerer@users.noreply.github.com>
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

zlength(zlength_in), ydown_index(mesh.ystart) {

if (mesh.getNZPE() > 1) {
throw BoutException("ShiftedMetricInterp only works with 1 processor in Z");
Copy link
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 "BoutException" is directly included [misc-include-cleaner]

src/mesh/parallel/shiftedmetricinterp.cxx:32:

- #include "bout/constants.hxx"
+ #include "bout/boutexception.hxx"
+ #include "bout/constants.hxx"

// Find the index positions where the magnetic field line intersects the x-z plane
// y_offset points up
Field3D zt_prime_up(&mesh), zt_prime_down(&mesh);
Field3D zt_prime_up(&mesh);
Copy link
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 "Field3D" is directly included [misc-include-cleaner]

src/mesh/parallel/shiftedmetricinterp.cxx:33:

- #include "bout/parallel_boundary_region.hxx"
+ #include "bout/field3d.hxx"
+ #include "bout/parallel_boundary_region.hxx"

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