]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add real_value and use as return type 8465/head
authorJonathan Robey <class4kayaker@gmail.com>
Wed, 7 Aug 2019 20:46:04 +0000 (14:46 -0600)
committerJonathan Robey <class4kayaker@gmail.com>
Wed, 7 Aug 2019 20:46:04 +0000 (14:46 -0600)
include/deal.II/lac/block_matrix_base.h

index 86b97c4063157800128772af729bd50d1d4d0c29..27151967a42f8bac55784d5421492ccee1090d4c 100644 (file)
@@ -360,6 +360,7 @@ public:
    * library containers.
    */
   using value_type      = typename BlockType::value_type;
+  using real_type       = typename numbers::NumberTraits<value_type>::real_type;
   using pointer         = value_type *;
   using const_pointer   = const value_type *;
   using reference       = value_type &;
@@ -702,7 +703,7 @@ public:
    * Return the frobenius norm of the matrix, i.e. the square root of the sum
    * of squares of all entries in the matrix.
    */
-  value_type
+  real_type
   frobenius_norm() const;
 
   /**
@@ -2409,7 +2410,7 @@ BlockMatrixBase<MatrixType>::matrix_norm_square(const BlockVectorType &v) const
 
 
 template <class MatrixType>
-typename BlockMatrixBase<MatrixType>::value_type
+typename BlockMatrixBase<MatrixType>::real_type
 BlockMatrixBase<MatrixType>::frobenius_norm() const
 {
   value_type norm_sqr = 0;

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.