From 6b8f77b8cc1fc87bac329e58cf4d1fb6c017e30e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 19 Dec 2017 16:04:29 +0100 Subject: [PATCH] do not capitalize proper names in Utilities::LinearAlgebra --- doc/news/changes/minor/20170801DenisDavydov-c | 2 +- doc/news/changes/minor/20170802DenisDavydov | 2 +- include/deal.II/lac/utilities.h | 16 ++++++++-------- source/lac/lapack_full_matrix.cc | 2 +- tests/lac/utilities_01.cc | 2 +- tests/lac/utilities_02.cc | 2 +- tests/lac/utilities_03.cc | 2 +- tests/lac/utilities_04.cc | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/news/changes/minor/20170801DenisDavydov-c b/doc/news/changes/minor/20170801DenisDavydov-c index c364c80e9a..3b4265284a 100644 --- a/doc/news/changes/minor/20170801DenisDavydov-c +++ b/doc/news/changes/minor/20170801DenisDavydov-c @@ -1,4 +1,4 @@ -New: Add Utilities::LinearAlgebra::Lanczos_largest_eigenvalue() to estimate the largest +New: Add Utilities::LinearAlgebra::lanczos_largest_eigenvalue() to estimate the largest eigenvalue of a symmetric linear operator using k-steps of Lanczos algorithm.
(Denis Davydov, 2017/08/01) diff --git a/doc/news/changes/minor/20170802DenisDavydov b/doc/news/changes/minor/20170802DenisDavydov index 0d485b1730..8760207652 100644 --- a/doc/news/changes/minor/20170802DenisDavydov +++ b/doc/news/changes/minor/20170802DenisDavydov @@ -1,4 +1,4 @@ -New: Add Utilities::LinearAlgebra::Chebyshev_filter() to apply Chebyshev filter of a +New: Add Utilities::LinearAlgebra::chebyshev_filter() to apply Chebyshev filter of a given degree.
(Denis Davydov, 2017/08/02) diff --git a/include/deal.II/lac/utilities.h b/include/deal.II/lac/utilities.h index 352d00ad72..0798454156 100644 --- a/include/deal.II/lac/utilities.h +++ b/include/deal.II/lac/utilities.h @@ -63,7 +63,7 @@ namespace Utilities * @author Denis Davydov, 2017 */ template - std::array Givens_rotation(const NumberType &x, + std::array givens_rotation(const NumberType &x, const NumberType &y); /** @@ -133,7 +133,7 @@ namespace Utilities * @author Denis Davydov, 2017 */ template - double Lanczos_largest_eigenvalue(const OperatorType &H, + double lanczos_largest_eigenvalue(const OperatorType &H, const VectorType &v0, const unsigned int k, VectorMemory &vector_memory, @@ -189,7 +189,7 @@ namespace Utilities * @author Denis Davydov, 2017 */ template - void Chebyshev_filter(VectorType &x, + void chebyshev_filter(VectorType &x, const OperatorType &H, const unsigned int n, const std::pair unwanted_spectrum, @@ -244,7 +244,7 @@ namespace Utilities template - std::array,3> Givens_rotation(const std::complex &f, + std::array,3> givens_rotation(const std::complex &f, const std::complex &g) { AssertThrow(false, ExcNotImplemented()); @@ -255,7 +255,7 @@ namespace Utilities template - std::array Givens_rotation(const NumberType &f, + std::array givens_rotation(const NumberType &f, const NumberType &g) { std::array res; @@ -307,7 +307,7 @@ namespace Utilities template - double Lanczos_largest_eigenvalue(const OperatorType &H, + double lanczos_largest_eigenvalue(const OperatorType &H, const VectorType &v0_, const unsigned int k, VectorMemory &vector_memory, @@ -400,7 +400,7 @@ namespace Utilities template - void Chebyshev_filter(VectorType &x, + void chebyshev_filter(VectorType &x, const OperatorType &op, const unsigned int degree, const std::pair unwanted_spectrum, @@ -434,7 +434,7 @@ namespace Utilities // Algorithm 3.2 in Zhou et al, Journal of Computational Physics 274 (2014) 770-782 // with **a bugfix for sigma1**. Here is the original algorithm verbatim: // - // [Y]=Chebyshev_filter_scaled(X, m, a, b, aL). + // [Y]=chebyshev_filter_scaled(X, m, a, b, aL). // e=(b−a)/2; c=(a+b)/2; σ=e/(c−aL); τ=2/σ; // Y=(H∗X−c∗X)∗(σ/e); // for i=2 to m do diff --git a/source/lac/lapack_full_matrix.cc b/source/lac/lapack_full_matrix.cc index f94cbbeee2..d4155d510f 100644 --- a/source/lac/lapack_full_matrix.cc +++ b/source/lac/lapack_full_matrix.cc @@ -240,7 +240,7 @@ namespace z *= std::sqrt(a); for (unsigned int k = 0; k < N; ++k) { - const std::array csr = Utilities::LinearAlgebra::Givens_rotation(A(k,k),z(k)); + const std::array csr = Utilities::LinearAlgebra::givens_rotation(A(k,k),z(k)); A(k,k) = csr[2]; for (unsigned int i = k+1; i < N; ++i) { diff --git a/tests/lac/utilities_01.cc b/tests/lac/utilities_01.cc index d9b8f0e137..58811f5f8e 100644 --- a/tests/lac/utilities_01.cc +++ b/tests/lac/utilities_01.cc @@ -61,7 +61,7 @@ int main(int argc, char **argv) for (unsigned int k = 4; k < 10; ++k) { - const double est = Utilities::LinearAlgebra::Lanczos_largest_eigenvalue(A,v0,k,vector_memory); + const double est = Utilities::LinearAlgebra::lanczos_largest_eigenvalue(A,v0,k,vector_memory); Assert (est > 3.98974, ExcInternalError()); deallog << k << std::endl << "Lanczos " << est << std::endl; diff --git a/tests/lac/utilities_02.cc b/tests/lac/utilities_02.cc index b89f6ed11f..7621c2ffa0 100644 --- a/tests/lac/utilities_02.cc +++ b/tests/lac/utilities_02.cc @@ -160,7 +160,7 @@ void test () GrowingVectorMemory> vector_memory; for (unsigned int k = 4; k < 10; ++k) { - const double est = Utilities::LinearAlgebra::Lanczos_largest_eigenvalue(OP,init_vector,k,vector_memory); + const double est = Utilities::LinearAlgebra::lanczos_largest_eigenvalue(OP,init_vector,k,vector_memory); deallog << k << " " << est << std::endl; } diff --git a/tests/lac/utilities_03.cc b/tests/lac/utilities_03.cc index 0ceff63456..5f4911110a 100644 --- a/tests/lac/utilities_03.cc +++ b/tests/lac/utilities_03.cc @@ -132,7 +132,7 @@ check(const int degree, const bool scale = false, const double a_L = -0.1, const const double g_ = (scale ? a_L : std::numeric_limits::infinity() ); y = x; - Utilities::LinearAlgebra::Chebyshev_filter(y, mat, degree, std::make_pair(a, b), g_, vector_memory); + Utilities::LinearAlgebra::chebyshev_filter(y, mat, degree, std::make_pair(a, b), g_, vector_memory); diff = y; diff -=exact; diff --git a/tests/lac/utilities_04.cc b/tests/lac/utilities_04.cc index 078658c9c4..221cb10ef3 100644 --- a/tests/lac/utilities_04.cc +++ b/tests/lac/utilities_04.cc @@ -33,7 +33,7 @@ void test (const NumberType a, const NumberType b) x[1] = b; y[1] = NumberType(); - const std::array csr = Utilities::LinearAlgebra::Givens_rotation(a,b); + const std::array csr = Utilities::LinearAlgebra::givens_rotation(a,b); rotation(0,0) = csr[0]; // c rotation(1,1) = csr[0]; // c -- 2.39.5