Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CheckOptions:
value: 'MPI_Comm'

- key: misc-include-cleaner.IgnoreHeaders
value: 'adios2/.*;bits/.*;cpptrace/.*'
value: 'adios2/.*;bits/.*;cpptrace/.*;petsc.*\.h'
---

Disabled checks and reasons:
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
is_cron:
- ${{ github.event_name == 'cron' }}
config:
- name: "CMake, PETSc unreleased, ADIOS2"
- name: "PETSc unreleased, ADIOS2, 3D metrics"
os: ubuntu-24.04
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DBOUT_ENABLE_METRIC_3D=ON
Expand Down Expand Up @@ -121,22 +121,6 @@ jobs:
omp_num_threads: 2
on_cron: false

- name: "CMake, new PETSc"
os: ubuntu-latest
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DBOUT_ENABLE_METRIC_3D=ON
-DBOUT_ENABLE_OPENMP=ON
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_HYPRE=OFF
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local
-DPETSC_DIR=/home/runner/local/petsc
-DSLEPC_DIR=/home/runner/local/slepc"
build_petsc: -petsc
on_cron: false

exclude:
- is_cron: true
config:
Expand Down
6 changes: 6 additions & 0 deletions src/invert/laplace/impls/naulin/naulin_laplace.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@
*/
// clang-format on

#include "bout/build_defines.hxx"

#if not BOUT_USE_METRIC_3D

#include <bout/boutexception.hxx>
#include <bout/coordinates.hxx>
#include <bout/derivs.hxx>
Expand Down Expand Up @@ -426,3 +430,5 @@ void LaplaceNaulin::outputVars(Options& output_options,
output_options[fmt::format("{}_mean_underrelax_counts", getPerformanceName())]
.assignRepeat(naulinsolver_mean_underrelax_counts, time_dimension);
}

#endif
15 changes: 14 additions & 1 deletion src/invert/laplace/impls/naulin/naulin_laplace.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,22 @@ class LaplaceNaulin;
#ifndef BOUT_LAP_NAULIN_H
#define BOUT_LAP_NAULIN_H

#include <bout/build_defines.hxx>
#include <bout/invert_laplace.hxx>

#if BOUT_USE_METRIC_3D

namespace {
const RegisterUnavailableLaplace
registerlaplacenaulin(LAPLACE_NAULIN, "BOUT++ was configured with 3D metrics");
}

#else

#include <bout/options.hxx>

namespace {
RegisterLaplace<LaplaceNaulin> registerlaplacenaulin(LAPLACE_NAULIN);
const RegisterLaplace<LaplaceNaulin> registerlaplacenaulin(LAPLACE_NAULIN);
}

/// Solves the 2D Laplacian equation
Expand Down Expand Up @@ -198,4 +209,6 @@ private:
void copy_x_boundaries(Field3D& x, const Field3D& x0, Mesh* mesh);
};

#endif // BOUT_USE_METRIC_3D

#endif // BOUT_LAP_NAULIN_H
6 changes: 6 additions & 0 deletions src/invert/laplace/impls/pcr/pcr.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
*
**************************************************************************/

#include "bout/build_defines.hxx"

#if not BOUT_USE_METRIC_3D

#include "pcr.hxx"
#include "bout/globals.hxx"

Expand Down Expand Up @@ -1108,3 +1112,5 @@ void LaplacePCR ::verify_solution(const Matrix<dcomplex>& a_ver,
output.write("max abs error {}\n", max_error);
output.write("max abs error location {} {}\n", max_loc_x, max_loc_z);
}

#endif // BOUT_USE_METRIC_3D
17 changes: 15 additions & 2 deletions src/invert/laplace/impls/pcr/pcr.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,24 @@ class LaplacePCR;
#ifndef BOUT_PCR_H
#define BOUT_PCR_H

#include <bout/dcomplex.hxx>
#include <bout/build_defines.hxx>
#include <bout/invert_laplace.hxx>

#if BOUT_USE_METRIC_3D

namespace {
const RegisterUnavailableLaplace
registerlaplacepcr(LAPLACE_PCR, "BOUT++ was configured with 3D metrics");
}

#else

#include <bout/dcomplex.hxx>
#include <bout/options.hxx>
#include <bout/utils.hxx>

namespace {
RegisterLaplace<LaplacePCR> registerlaplacepcr(LAPLACE_PCR);
const RegisterLaplace<LaplacePCR> registerlaplacepcr(LAPLACE_PCR);
}

class LaplacePCR : public Laplacian {
Expand Down Expand Up @@ -175,4 +186,6 @@ private:
bool dst{false};
};

#endif // BOUT_USE_METRIC_3D

#endif // BOUT_PCR_H
6 changes: 6 additions & 0 deletions src/invert/laplace/impls/pcr_thomas/pcr_thomas.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
*
**************************************************************************/

#include "bout/build_defines.hxx"

#if not BOUT_USE_METRIC_3D

#include "pcr_thomas.hxx"
#include "bout/globals.hxx"

Expand Down Expand Up @@ -1190,3 +1194,5 @@ void LaplacePCR_THOMAS ::verify_solution(const Matrix<dcomplex>& a_ver,
}
output.write("max abs error {}\n", max_error);
}

#endif // BOUT_USE_METRIC_3D
15 changes: 14 additions & 1 deletion src/invert/laplace/impls/pcr_thomas/pcr_thomas.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,19 @@ class LaplacePCR_THOMAS;
#ifndef BOUT_PCR_THOMAS_H
#define BOUT_PCR_THOMAS_H

#include "bout/build_defines.hxx"
#include "bout/invert_laplace.hxx"

#if BOUT_USE_METRIC_3D

namespace {
const RegisterUnavailableLaplace
registerlaplacepcrthomas(LAPLACE_PCR_THOMAS, "BOUT++ was configured with 3D metrics");
}

#else

#include <bout/dcomplex.hxx>
#include <bout/invert_laplace.hxx>
#include <bout/options.hxx>
#include <bout/utils.hxx>

Expand Down Expand Up @@ -178,4 +189,6 @@ private:
bool dst{false};
};

#endif // BOUT_USE_METRIC_3D

#endif // BOUT_PCR_THOMAS_H
Loading
Loading