From 05cb5d00641dc5d2f4c398b00b8a691872ce31dd Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@uliege.be> Date: Thu, 13 Oct 2022 12:21:09 +0200 Subject: [PATCH] option for solver type --- tutorials/helmholtz/scattering3D/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tutorials/helmholtz/scattering3D/main.cpp b/tutorials/helmholtz/scattering3D/main.cpp index 994c6dfd..b23d6131 100644 --- a/tutorials/helmholtz/scattering3D/main.cpp +++ b/tutorials/helmholtz/scattering3D/main.cpp @@ -60,6 +60,9 @@ int main(int argc, char **argv) int nDom = 2; gmshDdm.userDefinedParameter(nDom, "nDom"); + std::string solver = "gmres"; // try also "tfqmr" + gmshDdm.userDefinedParameter(solver, "solver"); + double lc = 0.1; gmshDdm.userDefinedParameter(lc, "lc"); @@ -226,7 +229,7 @@ int main(int argc, char **argv) double tolerence = 1e-6; int maxIter = 1000; formulation.pre(); - formulation.solve("gmres", tolerence, maxIter, true); + formulation.solve(solver, tolerence, maxIter, true); if(u_exact) { // Compute analytic L2-error -- GitLab