From 0e179211c35b1926d8f7b0ff133dacfc4d6e2100 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Thu, 26 Aug 2021 11:22:47 +0200 Subject: [PATCH] Fix typo: Cholesky (was written Choleski ...) --- src/algebra/LinearSolver.cpp | 8 ++++---- src/algebra/LinearSolverOptions.hpp | 12 ++++++------ tests/test_LinearSolver.cpp | 28 ++++++++++++++-------------- tests/test_LinearSolverOptions.cpp | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/algebra/LinearSolver.cpp b/src/algebra/LinearSolver.cpp index 3cffca729..d7a1d4119 100644 --- a/src/algebra/LinearSolver.cpp +++ b/src/algebra/LinearSolver.cpp @@ -66,7 +66,7 @@ struct LinearSolver::Internals case LSMethod::bicgstab2: case LSMethod::gmres: case LSMethod::lu: - case LSMethod::choleski: { + case LSMethod::cholesky: { break; } // LCOV_EXCL_START @@ -97,7 +97,7 @@ struct LinearSolver::Internals case LSPrecond::none: case LSPrecond::amg: case LSPrecond::diagonal: - case LSPrecond::incomplete_choleski: + case LSPrecond::incomplete_cholesky: case LSPrecond::incomplete_LU: { break; } @@ -221,7 +221,7 @@ struct LinearSolver::Internals direct_solver = true; break; } - case LSMethod::choleski: { + case LSMethod::cholesky: { KSPSetType(ksp, KSPPREONLY); PCSetType(pc, PCCHOLESKY); direct_solver = true; @@ -248,7 +248,7 @@ struct LinearSolver::Internals PCSetType(pc, PCILU); break; } - case LSPrecond::incomplete_choleski: { + case LSPrecond::incomplete_cholesky: { PCSetType(pc, PCICC); break; } diff --git a/src/algebra/LinearSolverOptions.hpp b/src/algebra/LinearSolverOptions.hpp index 014ee86d6..940ce1ed6 100644 --- a/src/algebra/LinearSolverOptions.hpp +++ b/src/algebra/LinearSolverOptions.hpp @@ -24,7 +24,7 @@ enum class LSMethod : int8_t bicgstab2, gmres, lu, - choleski, + cholesky, // LS__end }; @@ -35,7 +35,7 @@ enum class LSPrecond : int8_t // none = LS__begin, diagonal, - incomplete_choleski, + incomplete_cholesky, incomplete_LU, amg, // @@ -77,8 +77,8 @@ name(const LSMethod method) case LSMethod::lu: { return "LU"; } - case LSMethod::choleski: { - return "Choleski"; + case LSMethod::cholesky: { + return "Cholesky"; } case LSMethod::LS__end: { } @@ -96,8 +96,8 @@ name(const LSPrecond precond) case LSPrecond::diagonal: { return "diagonal"; } - case LSPrecond::incomplete_choleski: { - return "ICholeski"; + case LSPrecond::incomplete_cholesky: { + return "ICholesky"; } case LSPrecond::incomplete_LU: { return "ILU"; diff --git a/tests/test_LinearSolver.cpp b/tests/test_LinearSolver.cpp index f8bcd9972..e60f42df7 100644 --- a/tests/test_LinearSolver.cpp +++ b/tests/test_LinearSolver.cpp @@ -46,8 +46,8 @@ TEST_CASE("LinearSolver", "[algebra]") options.method() = LSMethod::lu; REQUIRE_THROWS_WITH(LinearSolver{options}, "error: LU is not a builtin linear solver!"); - options.method() = LSMethod::choleski; - REQUIRE_THROWS_WITH(LinearSolver{options}, "error: Choleski is not a builtin linear solver!"); + options.method() = LSMethod::cholesky; + REQUIRE_THROWS_WITH(LinearSolver{options}, "error: Cholesky is not a builtin linear solver!"); options.method() = LSMethod::gmres; REQUIRE_THROWS_WITH(LinearSolver{options}, "error: GMRES is not a builtin linear solver!"); @@ -67,8 +67,8 @@ TEST_CASE("LinearSolver", "[algebra]") options.precond() = LSPrecond::incomplete_LU; REQUIRE_THROWS_WITH(LinearSolver{options}, "error: ILU is not a builtin preconditioner!"); - options.precond() = LSPrecond::incomplete_choleski; - REQUIRE_THROWS_WITH(LinearSolver{options}, "error: ICholeski is not a builtin preconditioner!"); + options.precond() = LSPrecond::incomplete_cholesky; + REQUIRE_THROWS_WITH(LinearSolver{options}, "error: ICholesky is not a builtin preconditioner!"); options.precond() = LSPrecond::amg; REQUIRE_THROWS_WITH(LinearSolver{options}, "error: AMG is not a builtin preconditioner!"); @@ -101,7 +101,7 @@ TEST_CASE("LinearSolver", "[algebra]") options.method() = LSMethod::lu; REQUIRE_NOTHROW(linear_solver.checkOptions(options)); - options.method() = LSMethod::choleski; + options.method() = LSMethod::cholesky; REQUIRE_NOTHROW(linear_solver.checkOptions(options)); options.method() = LSMethod::gmres; @@ -122,7 +122,7 @@ TEST_CASE("LinearSolver", "[algebra]") options.precond() = LSPrecond::incomplete_LU; REQUIRE_NOTHROW(linear_solver.checkOptions(options)); - options.precond() = LSPrecond::incomplete_choleski; + options.precond() = LSPrecond::incomplete_cholesky; REQUIRE_NOTHROW(linear_solver.checkOptions(options)); options.precond() = LSPrecond::amg; @@ -245,9 +245,9 @@ TEST_CASE("LinearSolver", "[algebra]") REQUIRE(std::sqrt(dot(error, error)) < 1E-10 * std::sqrt(dot(x_exact, x_exact))); } - SECTION("CG ICholeski") + SECTION("CG ICholesky") { - options.precond() = LSPrecond::incomplete_choleski; + options.precond() = LSPrecond::incomplete_cholesky; Vector<double> x{5}; x = zero; @@ -274,11 +274,11 @@ TEST_CASE("LinearSolver", "[algebra]") } } - SECTION("Choleski") + SECTION("Cholesky") { LinearSolverOptions options; options.library() = LSLibrary::petsc; - options.method() = LSMethod::choleski; + options.method() = LSMethod::cholesky; options.precond() = LSPrecond::none; Vector<double> x{5}; @@ -638,9 +638,9 @@ TEST_CASE("LinearSolver", "[algebra]") REQUIRE(std::sqrt(dot(error, error)) < 1E-10 * std::sqrt(dot(x_exact, x_exact))); } - SECTION("CG ICholeski") + SECTION("CG ICholesky") { - options.precond() = LSPrecond::incomplete_choleski; + options.precond() = LSPrecond::incomplete_cholesky; Vector<double> x{5}; x = zero; @@ -667,11 +667,11 @@ TEST_CASE("LinearSolver", "[algebra]") } } - SECTION("Choleski") + SECTION("Cholesky") { LinearSolverOptions options; options.library() = LSLibrary::petsc; - options.method() = LSMethod::choleski; + options.method() = LSMethod::cholesky; options.precond() = LSPrecond::none; Vector<double> x{5}; diff --git a/tests/test_LinearSolverOptions.cpp b/tests/test_LinearSolverOptions.cpp index 3da768889..90519ddf9 100644 --- a/tests/test_LinearSolverOptions.cpp +++ b/tests/test_LinearSolverOptions.cpp @@ -17,7 +17,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") options.verbose() = true; options.library() = LSLibrary::builtin; options.method() = LSMethod::cg; - options.precond() = LSPrecond::incomplete_choleski; + options.precond() = LSPrecond::incomplete_cholesky; options.epsilon() = 1E-3; options.maximumIteration() = 100; @@ -28,7 +28,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") expected_output << R"( library: builtin method : CG - precond: ICholeski + precond: ICholesky epsilon: )" << 1E-3 << R"( maxiter: 100 verbose: true @@ -79,7 +79,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") REQUIRE(name(LSMethod::bicgstab2) == "BICGStab2"); REQUIRE(name(LSMethod::gmres) == "GMRES"); REQUIRE(name(LSMethod::lu) == "LU"); - REQUIRE(name(LSMethod::choleski) == "Choleski"); + REQUIRE(name(LSMethod::cholesky) == "Cholesky"); REQUIRE_THROWS_WITH(name(LSMethod::LS__end), "unexpected error: Linear system method name is not defined!"); } @@ -87,7 +87,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") { REQUIRE(name(LSPrecond::none) == "none"); REQUIRE(name(LSPrecond::diagonal) == "diagonal"); - REQUIRE(name(LSPrecond::incomplete_choleski) == "ICholeski"); + REQUIRE(name(LSPrecond::incomplete_cholesky) == "ICholesky"); REQUIRE(name(LSPrecond::incomplete_LU) == "ILU"); REQUIRE(name(LSPrecond::amg) == "AMG"); REQUIRE_THROWS_WITH(name(LSPrecond::LS__end), @@ -109,7 +109,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") REQUIRE(LSMethod::bicgstab == getLSEnumFromName<LSMethod>("BICGStab")); REQUIRE(LSMethod::bicgstab2 == getLSEnumFromName<LSMethod>("BICGStab2")); REQUIRE(LSMethod::lu == getLSEnumFromName<LSMethod>("LU")); - REQUIRE(LSMethod::choleski == getLSEnumFromName<LSMethod>("Choleski")); + REQUIRE(LSMethod::cholesky == getLSEnumFromName<LSMethod>("Cholesky")); REQUIRE(LSMethod::gmres == getLSEnumFromName<LSMethod>("GMRES")); REQUIRE_THROWS_WITH(getLSEnumFromName<LSMethod>("__invalid_method"), @@ -120,7 +120,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") { REQUIRE(LSPrecond::none == getLSEnumFromName<LSPrecond>("none")); REQUIRE(LSPrecond::diagonal == getLSEnumFromName<LSPrecond>("diagonal")); - REQUIRE(LSPrecond::incomplete_choleski == getLSEnumFromName<LSPrecond>("ICholeski")); + REQUIRE(LSPrecond::incomplete_cholesky == getLSEnumFromName<LSPrecond>("ICholesky")); REQUIRE(LSPrecond::incomplete_LU == getLSEnumFromName<LSPrecond>("ILU")); REQUIRE_THROWS_WITH(getLSEnumFromName<LSPrecond>("__invalid_precond"), @@ -153,7 +153,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") - BICGStab2 - GMRES - LU - - Choleski + - Cholesky )"; REQUIRE(os.str() == library_list); @@ -168,7 +168,7 @@ TEST_CASE("LinearSolverOptions", "[algebra]") const std::string library_list = R"( - none - diagonal - - ICholeski + - ICholesky - ILU - AMG )"; -- GitLab