From e4a054962ab784f5fa447b3146938a453aa4dc8f Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 13 Feb 2026 14:42:58 +0100 Subject: [PATCH 1/3] Change default to PETSc for 3D metrics --- include/bout/invert_laplace.hxx | 4 ++++ src/invert/laplace/impls/naulin/naulin_laplace.cxx | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/bout/invert_laplace.hxx b/include/bout/invert_laplace.hxx index 258b4d2e80..73e58e8483 100644 --- a/include/bout/invert_laplace.hxx +++ b/include/bout/invert_laplace.hxx @@ -141,7 +141,11 @@ public: static constexpr auto type_name = "Laplacian"; static constexpr auto section_name = "laplace"; static constexpr auto option_name = "type"; +#if BOUT_USE_METRIC_3D + static constexpr auto default_type = LAPLACE_PETSC; +#else static constexpr auto default_type = LAPLACE_CYCLIC; +#endif ReturnType create(Options* options = nullptr, CELL_LOC loc = CELL_CENTRE, Mesh* mesh = nullptr, Solver* solver = nullptr) { diff --git a/src/invert/laplace/impls/naulin/naulin_laplace.cxx b/src/invert/laplace/impls/naulin/naulin_laplace.cxx index 1c90976ce6..481f01ace0 100644 --- a/src/invert/laplace/impls/naulin/naulin_laplace.cxx +++ b/src/invert/laplace/impls/naulin/naulin_laplace.cxx @@ -149,6 +149,7 @@ #include #include #include +#include #include "naulin_laplace.hxx" @@ -207,7 +208,7 @@ LaplaceNaulin::LaplaceNaulin(Options* opt, const CELL_LOC loc, Mesh* mesh_in, ASSERT0(underrelax_recovery >= 1.); delp2solver = create(opt->getSection("delp2solver"), location, localmesh); std::string delp2type; - opt->getSection("delp2solver")->get("type", delp2type, "cyclic"); + opt->getSection("delp2solver")->get("type", delp2type, LaplaceFactory::default_type); // Check delp2solver is using an FFT scheme, otherwise it will not exactly // invert Delp2 and we will not converge ASSERT0(delp2type == "cyclic" || delp2type == "spt" || delp2type == "tri"); From f2bc0488a298f136294c523bc5ab4086d090059b Mon Sep 17 00:00:00 2001 From: dschwoerer <5637662+dschwoerer@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:56:43 +0000 Subject: [PATCH 2/3] [bot] Apply format changes --- src/invert/laplace/impls/naulin/naulin_laplace.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invert/laplace/impls/naulin/naulin_laplace.cxx b/src/invert/laplace/impls/naulin/naulin_laplace.cxx index 481f01ace0..bf8711245e 100644 --- a/src/invert/laplace/impls/naulin/naulin_laplace.cxx +++ b/src/invert/laplace/impls/naulin/naulin_laplace.cxx @@ -147,9 +147,9 @@ #include #include #include +#include #include #include -#include #include "naulin_laplace.hxx" From e0dd2049d748059f7fa52eb2a1eeabe2c45647ee Mon Sep 17 00:00:00 2001 From: dschwoerer <5637662+dschwoerer@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:56:44 +0000 Subject: [PATCH 3/3] [bot] Add last format changes commit to ignore file --- .git-blame-ignore-revs | 1 + 1 file changed, 1 insertion(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index abd11c7762..742c020e17 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -11,3 +11,4 @@ a71cad2dd6ace5741a754e2ca7daacd4bb094e0e 2c2402ed59c91164eaff46dee0f79386b7347e9e 05b7c571544c3bcb153fce67d12b9ac48947fc2d c8f38049359170a34c915e209276238ea66b9a1e +f2bc0488a298f136294c523bc5ab4086d090059b