From b77577a4349143e2739d3ea7b986dbd8ab459f97 Mon Sep 17 00:00:00 2001 From: wearysebas Date: Fri, 8 May 2026 15:59:10 +0100 Subject: [PATCH] Header changes needed to compile and build with the latest changes in BOUT++ next branch. --- src/evolve_density.cxx | 1 + src/evolve_energy.cxx | 1 + src/evolve_momentum.cxx | 1 + src/evolve_pressure.cxx | 1 + src/neutral_mixed.cxx | 2 ++ src/relax_potential.cxx | 1 + src/vorticity.cxx | 1 + tests/mms_operator/main.cxx | 2 ++ tests/unit/fake_mesh.hxx | 20 ++++++++++++-------- 9 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/evolve_density.cxx b/src/evolve_density.cxx index 6efd3a8f3..4b8015d85 100644 --- a/src/evolve_density.cxx +++ b/src/evolve_density.cxx @@ -6,6 +6,7 @@ #include #include #include +#include #include "../include/div_ops.hxx" #include "../include/evolve_density.hxx" diff --git a/src/evolve_energy.cxx b/src/evolve_energy.cxx index 6aef6bad8..4b9dfd9b2 100644 --- a/src/evolve_energy.cxx +++ b/src/evolve_energy.cxx @@ -6,6 +6,7 @@ #include #include #include +#include #include "../include/div_ops.hxx" #include "../include/evolve_energy.hxx" diff --git a/src/evolve_momentum.cxx b/src/evolve_momentum.cxx index 688632121..5a6ca0bdf 100644 --- a/src/evolve_momentum.cxx +++ b/src/evolve_momentum.cxx @@ -4,6 +4,7 @@ #include #include #include +#include #include "../include/evolve_momentum.hxx" #include "../include/div_ops.hxx" diff --git a/src/evolve_pressure.cxx b/src/evolve_pressure.cxx index ebfb606f8..90666cfe6 100644 --- a/src/evolve_pressure.cxx +++ b/src/evolve_pressure.cxx @@ -7,6 +7,7 @@ #include #include #include +#include #include "../include/div_ops.hxx" #include "../include/evolve_pressure.hxx" diff --git a/src/neutral_mixed.cxx b/src/neutral_mixed.cxx index 6f632c8f9..74b4ac9b4 100644 --- a/src/neutral_mixed.cxx +++ b/src/neutral_mixed.cxx @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include "../include/div_ops.hxx" #include "../include/hermes_build_config.hxx" diff --git a/src/relax_potential.cxx b/src/relax_potential.cxx index 425c1f6f6..cde39db88 100644 --- a/src/relax_potential.cxx +++ b/src/relax_potential.cxx @@ -7,6 +7,7 @@ #include #include #include +#include using bout::globals::mesh; diff --git a/src/vorticity.cxx b/src/vorticity.cxx index 116fb4c22..dfaf193ce 100644 --- a/src/vorticity.cxx +++ b/src/vorticity.cxx @@ -9,6 +9,7 @@ #include #include #include +#include using bout::globals::mesh; diff --git a/tests/mms_operator/main.cxx b/tests/mms_operator/main.cxx index eab40edba..3868c06bd 100644 --- a/tests/mms_operator/main.cxx +++ b/tests/mms_operator/main.cxx @@ -1,4 +1,6 @@ #include "bout/field_factory.hxx" +#include "bout/bout.hxx" +#include "bout/options_io.hxx" // #include "hermes-2.hxx" #include "../include/div_ops.hxx" diff --git a/tests/unit/fake_mesh.hxx b/tests/unit/fake_mesh.hxx index 5d0d12de0..deecd8d08 100644 --- a/tests/unit/fake_mesh.hxx +++ b/tests/unit/fake_mesh.hxx @@ -73,8 +73,6 @@ public: // Unused variables periodicX = false; - NXPE = 1; - PE_XIND = 0; IncIntShear = false; maxregionblocksize = MAXREGIONBLOCKSIZE; @@ -109,10 +107,14 @@ public: return nullptr; } int wait(comm_handle UNUSED(handle)) override { return 0; } - int getNXPE() override { return 1; } - int getNYPE() override { return 1; } - int getXProcIndex() override { return 1; } - int getYProcIndex() override { return 1; } + int getNXPE() const override { return 1; } + int getNYPE() const override { return 1; } + int getNZPE() const override { return 1; } + int getXProcIndex() const override { return 0; } + int getYProcIndex() const override { return 0; } + int getZProcIndex() const override { return 0; } + int getProcIndex(int UNUSED(X), int UNUSED(Y), int UNUSED(Z)) const override { return 0; } + MPI_Comm getXZcomm() const override { return BoutComm::get(); } bool firstX() const override { return true; } bool lastX() const override { return true; } int sendXOut(BoutReal* UNUSED(buffer), int UNUSED(size), int UNUSED(tag)) override { @@ -164,8 +166,10 @@ public: } BoutReal GlobalX(int jx) const override { return jx; } BoutReal GlobalY(int jy) const override { return jy; } + BoutReal GlobalZ(int jz) const override { return jz; } BoutReal GlobalX(BoutReal jx) const override { return jx; } BoutReal GlobalY(BoutReal jy) const override { return jy; } + BoutReal GlobalZ(BoutReal jz) const override { return jz; } int getGlobalXIndex(int) const override { return 0; } int getGlobalXIndexNoBoundaries(int) const override { return 0; } int getGlobalYIndex(int y) const override { return y; } @@ -228,7 +232,7 @@ public: addRegion2D("RGN_BNDRY", std::accumulate(begin(boundary_names), end(boundary_names), Region{}, - [this](Region& a, const std::string& b) { + [this](Region a, const std::string& b) { return a + getRegion2D(b); }) .unique()); @@ -236,7 +240,7 @@ public: addRegion3D("RGN_BNDRY", std::accumulate(begin(boundary_names), end(boundary_names), Region{}, - [this](Region& a, const std::string& b) { + [this](Region a, const std::string& b) { return a + getRegion3D(b); }) .unique());