]> https://gitweb.dealii.org/ - dealii.git/commitdiff
do not capitalize proper names in Utilities::LinearAlgebra 5631/head
authorDenis Davydov <davydden@gmail.com>
Tue, 19 Dec 2017 15:04:29 +0000 (16:04 +0100)
committerDenis Davydov <davydden@gmail.com>
Tue, 19 Dec 2017 15:04:29 +0000 (16:04 +0100)
doc/news/changes/minor/20170801DenisDavydov-c
doc/news/changes/minor/20170802DenisDavydov
include/deal.II/lac/utilities.h
source/lac/lapack_full_matrix.cc
tests/lac/utilities_01.cc
tests/lac/utilities_02.cc
tests/lac/utilities_03.cc
tests/lac/utilities_04.cc

index c364c80e9a3ae155c7d39a57293cd1d71ff1576c..3b4265284ac3436c172a819f8af27371a3772025 100644 (file)
@@ -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.
 <br>
 (Denis Davydov, 2017/08/01)
index 0d485b1730dbde93eedb7f3cf30a458bb476a25f..87602076521ad85832a3f93ba4e42bef54f6a21d 100644 (file)
@@ -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.
 <br>
 (Denis Davydov, 2017/08/02)
index 352d00ad72e5f122be29c32fa720f9993eef6ca9..07984541565b6829576323e9018b34dc71f7a2ce 100644 (file)
@@ -63,7 +63,7 @@ namespace Utilities
      * @author Denis Davydov, 2017
      */
     template<typename NumberType>
-    std::array<NumberType,3> Givens_rotation(const NumberType &x,
+    std::array<NumberType,3> givens_rotation(const NumberType &x,
                                              const NumberType &y);
 
     /**
@@ -133,7 +133,7 @@ namespace Utilities
      * @author Denis Davydov, 2017
      */
     template <typename OperatorType, typename VectorType>
-    double Lanczos_largest_eigenvalue(const OperatorType &H,
+    double lanczos_largest_eigenvalue(const OperatorType &H,
                                       const VectorType &v0,
                                       const unsigned int k,
                                       VectorMemory<VectorType> &vector_memory,
@@ -189,7 +189,7 @@ namespace Utilities
      * @author Denis Davydov, 2017
      */
     template <typename OperatorType, typename VectorType>
-    void Chebyshev_filter(VectorType &x,
+    void chebyshev_filter(VectorType &x,
                           const OperatorType &H,
                           const unsigned int n,
                           const std::pair<double,double> unwanted_spectrum,
@@ -244,7 +244,7 @@ namespace Utilities
 
 
     template<typename NumberType>
-    std::array<std::complex<NumberType>,3> Givens_rotation(const std::complex<NumberType> &f,
+    std::array<std::complex<NumberType>,3> givens_rotation(const std::complex<NumberType> &f,
                                                            const std::complex<NumberType> &g)
     {
       AssertThrow(false, ExcNotImplemented());
@@ -255,7 +255,7 @@ namespace Utilities
 
 
     template<typename NumberType>
-    std::array<NumberType,3> Givens_rotation(const NumberType &f,
+    std::array<NumberType,3> givens_rotation(const NumberType &f,
                                              const NumberType &g)
     {
       std::array<NumberType,3> res;
@@ -307,7 +307,7 @@ namespace Utilities
 
 
     template <typename OperatorType, typename VectorType>
-    double Lanczos_largest_eigenvalue(const OperatorType &H,
+    double lanczos_largest_eigenvalue(const OperatorType &H,
                                       const VectorType &v0_,
                                       const unsigned int k,
                                       VectorMemory<VectorType> &vector_memory,
@@ -400,7 +400,7 @@ namespace Utilities
 
 
     template <typename OperatorType, typename VectorType>
-    void Chebyshev_filter(VectorType &x,
+    void chebyshev_filter(VectorType &x,
                           const OperatorType &op,
                           const unsigned int degree,
                           const std::pair<double,double> 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
index f94cbbeee20ad0002cde7ae2ee6f50e97e98bde3..d4155d510fbce89740152aa3fef57807064a7c64 100644 (file)
@@ -240,7 +240,7 @@ namespace
         z *= std::sqrt(a);
         for (unsigned int k = 0; k < N; ++k)
           {
-            const std::array<number,3> csr = Utilities::LinearAlgebra::Givens_rotation(A(k,k),z(k));
+            const std::array<number,3> csr = Utilities::LinearAlgebra::givens_rotation(A(k,k),z(k));
             A(k,k) = csr[2];
             for (unsigned int i = k+1; i < N; ++i)
               {
index d9b8f0e137285f0a87604fd7c156476733fc4a78..58811f5f8ec80cde7910120c1ee7a542e9c790f4 100644 (file)
@@ -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;
index b89f6ed11f3062a11d4b7d4ae76a8728bb4e7933..7621c2ffa0dcbf10619195abd7b00fe4ac22a9ba 100644 (file)
@@ -160,7 +160,7 @@ void test ()
   GrowingVectorMemory<LinearAlgebra::distributed::Vector<double>> 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;
     }
 
index 0ceff63456788d4c9c961638f1b4e2c75de0c080..5f4911110a27260a0dc0a790127a8f4e1215f942 100644 (file)
@@ -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<double>::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;
 
index 078658c9c4f43dd461e598ff2b07db37c890786c..221cb10ef32dd261f066972264f9593a28df269e 100644 (file)
@@ -33,7 +33,7 @@ void test (const NumberType a, const NumberType b)
   x[1] = b;
   y[1] = NumberType();
 
-  const std::array<NumberType,3> csr = Utilities::LinearAlgebra::Givens_rotation(a,b);
+  const std::array<NumberType,3> csr = Utilities::LinearAlgebra::givens_rotation(a,b);
 
   rotation(0,0) =  csr[0]; //  c
   rotation(1,1) =  csr[0]; //  c

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.