]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Big renaming
authorMatthias Maier <matthias.maier@iwr.uni-heidelberg.de>
Tue, 14 Apr 2015 08:16:02 +0000 (10:16 +0200)
committerMatthias Maier <tamiko@43-1.org>
Sun, 19 Apr 2015 20:55:06 +0000 (22:55 +0200)
include/deal.II/lac/linear_operator.h
tests/lac/linear_operator_01.cc
tests/lac/linear_operator_02.cc
tests/lac/linear_operator_02.with_cxx11=on.output
tests/lac/linear_operator_03.cc
tests/lac/linear_operator_03.with_cxx11=on.output
tests/lac/linear_operator_04.cc
tests/lac/linear_operator_05.cc
tests/lac/linear_operator_06.cc
tests/lac/linear_operator_07.cc
tests/lac/linear_operator_08.cc

index c83813aa9fabd3c0a17fa9e01b86d26a07d1966b..ccab84ea6ab0e7533b0974d273c1ddaf0f94362d 100644 (file)
@@ -36,14 +36,15 @@ template <typename Range, typename Domain> class LinearOperator;
 
 template <typename Range = Vector<double>,
           typename Domain = Range,
-          typename Exemplar,
+          typename OperatorExemplar,
           typename Matrix>
-LinearOperator<Range, Domain> linop (const Exemplar &, const Matrix &);
+LinearOperator<Range, Domain> linear_operator (const OperatorExemplar &,
+                                               const Matrix &);
 
 template <typename Range = Vector<double>,
           typename Domain = Range,
           typename Matrix>
-LinearOperator<Range, Domain> linop (const Matrix &);
+LinearOperator<Range, Domain> linear_operator (const Matrix &);
 
 /**
  * A class to store the abstract concept of a linear operator.
@@ -84,9 +85,9 @@ LinearOperator<Range, Domain> linop (const Matrix &);
  *
  * // Setup and assembly of matrices
  *
- * const auto op_a = linop(A);
- * const auto op_b = linop(B);
- * const auto op_c = linop(C);
+ * const auto op_a = linear_operator(A);
+ * const auto op_b = linear_operator(B);
+ * const auto op_c = linear_operator(C);
  *
  * const auto op = (op_a + k * op_b) * op_c;
  * @endcode
@@ -152,28 +153,30 @@ public:
 
   /**
    * Templated copy constructor that creates a LinearOperator object from
-   * an object @p op for which the conversion function <code>linop</code>
+   * an object @p op for which the conversion function
+   * <code>linear_operator</code>
    * is defined.
    */
   template<typename Op>
   LinearOperator (const Op &op)
   {
-    *this = linop<Range, Domain, Op>(op);
+    *this = linear_operator<Range, Domain, Op>(op);
   }
 
   /**
    * Default copy assignment operator.
    */
-  LinearOperator<Range, Domain> &operator=(const LinearOperator<Range, Domain> &) = default;
+  LinearOperator<Range, Domain> &
+  operator=(const LinearOperator<Range, Domain> &) = default;
 
   /**
    * Templated copy assignment operator for an object @p op for which the
-   * conversion function <code>linop</code> is defined.
+   * conversion function <code>linear_operator</code> is defined.
    */
   template <typename Op>
   LinearOperator<Range, Domain> &operator=(const Op &op)
   {
-    return *this = linop<Range, Domain, Op>(op);
+    return *this = linear_operator<Range, Domain, Op>(op);
   }
 
   /**
@@ -489,7 +492,7 @@ operator*(const LinearOperator<Range, Domain> &op,
  */
 template <typename Range, typename Domain>
 LinearOperator<Domain, Range>
-transpose_linop(const LinearOperator<Range, Domain> &op)
+transpose_operator(const LinearOperator<Range, Domain> &op)
 {
   LinearOperator<Domain, Range> return_op;
 
@@ -518,7 +521,7 @@ transpose_linop(const LinearOperator<Range, Domain> &op)
  */
 template <typename Range>
 LinearOperator<Range, Range>
-identity_linop(const std::function<void(Range &, bool)> &reinit_vector)
+identity_operator(const std::function<void(Range &, bool)> &reinit_vector)
 {
   LinearOperator<Range, Range> return_op;
 
@@ -567,9 +570,9 @@ identity_linop(const std::function<void(Range &, bool)> &reinit_vector)
  */
 template <typename Solver, typename Preconditioner>
 LinearOperator<typename Solver::vector_type, typename Solver::vector_type>
-inverse_linop(const LinearOperator<typename Solver::vector_type, typename Solver::vector_type> &op,
-              Solver &solver,
-              const Preconditioner &preconditioner)
+inverse_operator(const LinearOperator<typename Solver::vector_type, typename Solver::vector_type> &op,
+                 Solver &solver,
+                 const Preconditioner &preconditioner)
 {
   typedef typename Solver::vector_type Vector;
 
@@ -603,7 +606,7 @@ inverse_linop(const LinearOperator<typename Solver::vector_type, typename Solver
   return_op.Tvmult = [op, &solver, &preconditioner]( Vector &v, const
                                                      Vector &u)
   {
-    solver.solve(transpose_linop(op), v, u, preconditioner);
+    solver.solve(transpose_operator(op), v, u, preconditioner);
   };
 
   return_op.Tvmult =
@@ -611,7 +614,7 @@ inverse_linop(const LinearOperator<typename Solver::vector_type, typename Solver
   {
     Vector *v2 = op.range_vector_memory.alloc();
     op.reinit_range_vector(*v2, /*bool fast =*/ true);
-    solver.solve(transpose_linop(op), *v2, u, preconditioner);
+    solver.solve(transpose_operator(op), *v2, u, preconditioner);
     v += *v2;
     op.range_vector_memory.free(v2);
   };
@@ -639,16 +642,16 @@ inverse_linop(const LinearOperator<typename Solver::vector_type, typename Solver
  *         |
  *  op_a10 | op_a11
  * @endcode
- * The coresponding block_linop invocation takes the form
+ * The coresponding block_operator invocation takes the form
  * @code
- * block_linop<2, 2, BlockVector<double>>({op_a00, op_a01, op_a10, op_a11});
+ * block_operator<2, 2, BlockVector<double>>({op_a00, op_a01, op_a10, op_a11});
  * @endcode
  */
 template <unsigned int m, unsigned int n,
           typename Range = BlockVector<double>,
           typename Domain = Range>
 LinearOperator<Range, Domain>
-block_linop(const std::array<std::array<LinearOperator<typename Range::BlockType, typename Domain::BlockType>, n>, m> &ops)
+block_operator(const std::array<std::array<LinearOperator<typename Range::BlockType, typename Domain::BlockType>, n>, m> &ops)
 {
   static_assert(m > 0 && n > 0,
                 "a blocked LinearOperator must consist of at least one block");
@@ -739,16 +742,16 @@ block_linop(const std::array<std::array<LinearOperator<typename Range::BlockType
  * The list @p ops is best passed as an initializer list. Consider for
  * example a linear operator block (acting on Vector<double>)
  * <code>diag(op_a0, op_a1, ..., op_am)</code>. The coresponding
- * block_linop invocation takes the form
+ * block_operator invocation takes the form
  * @code
- * blockdiagonal_linop<m, BlockVector<double>>({op_00, op_a1, ..., op_am});
+ * block_diagonal_operator<m, BlockVector<double>>({op_00, op_a1, ..., op_am});
  * @endcode
  */
 template <unsigned int m,
           typename Range = BlockVector<double>,
           typename Domain = Range>
 LinearOperator<Range, Domain>
-blockdiag_linop(const std::array<LinearOperator<typename Range::BlockType, typename Domain::BlockType>, m> &ops)
+block_diagonal_operator(const std::array<LinearOperator<typename Range::BlockType, typename Domain::BlockType>, m> &ops)
 {
   static_assert(m > 0,
                 "a blockdiagonal LinearOperator must consist of at least one block");
@@ -830,7 +833,7 @@ template <unsigned int m,
           typename Range = BlockVector<double>,
           typename Domain = Range>
 LinearOperator<Range, Domain>
-blockdiag_linop(const LinearOperator<typename Range::BlockType, typename Domain::BlockType> &op)
+block_diagonal_operator(const LinearOperator<typename Range::BlockType, typename Domain::BlockType> &op)
 {
 
   static_assert(m > 0,
@@ -1133,20 +1136,21 @@ namespace
 template <typename Range = Vector<double>,
           typename Domain = Range,
           typename Matrix>
-LinearOperator<Range, Domain> linop(const Matrix &matrix)
+LinearOperator<Range, Domain> linear_operator(const Matrix &matrix)
 {
   // implement with the more generic variant below...
-  return linop<Range, Domain, Matrix, Matrix>(matrix, matrix);
+  return linear_operator<Range, Domain, Matrix, Matrix>(matrix, matrix);
 }
 
 
 /**
  * \relates LinearOperator
  *
- * Variant of above function that takes an Exemplar object @p exemplar as
- * an additional reference. This object is used to populate the
- * reinit_domain_vector and reinit_range_vector function objects. The
- * reference @p matrix is used to construct vmult, Tvmult, etc.
+ * Variant of above function that takes an operator object @p
+ * operator_exemplar as an additional reference. This object is used to
+ * populate the reinit_domain_vector and reinit_range_vector function
+ * objects. The reference @p matrix is used to construct vmult, Tvmult,
+ * etc.
  *
  * This variant can, for example, be used to encapsulate preconditioners
  * (that typically do not expose any information about the underlying
@@ -1156,23 +1160,25 @@ LinearOperator<Range, Domain> linop(const Matrix &matrix)
  */
 template <typename Range = Vector<double>,
           typename Domain = Range,
-          typename Exemplar,
+          typename OperatorExemplar,
           typename Matrix>
-LinearOperator<Range, Domain> linop(const Exemplar &exemplar,
-                                    const Matrix   &matrix)
-{
+LinearOperator<Range, Domain>
+linear_operator(const OperatorExemplar &operator_exemplar,
+                const Matrix &matrix) {
   LinearOperator<Range, Domain> return_op;
 
-  // Always store a reference to matrix and exemplar in the lambda
+  // Always store a reference to matrix and operator_exemplar in the lambda
   // functions. This ensures that a modification of the matrix after the
   // creation of a LinearOperator wrapper is respected - further a matrix
-  // or an exemplar cannot usually be copied...
+  // or an operator_exemplar cannot usually be copied...
 
   return_op.reinit_range_vector =
-    internal::LinearOperator::ReinitRangeFactory<Range>().operator()(exemplar);
+      internal::LinearOperator::ReinitRangeFactory<Range>().operator()(
+          operator_exemplar);
 
   return_op.reinit_domain_vector =
-    internal::LinearOperator::ReinitDomainFactory<Domain>().operator()(exemplar);
+      internal::LinearOperator::ReinitDomainFactory<Domain>().operator()(
+          operator_exemplar);
 
   typename std::conditional<
   has_vmult_add<Range, Domain, Matrix>::type::value,
index 1d486c4fdfbc5e1701dd55c2262649708e6a8f9b..f227822c6634dd49b770ad0ca8f2b5a11d42964a 100644 (file)
@@ -200,14 +200,14 @@ int main()
 
   // operator* and transpose
 
-  auto test2 = transpose_linop(multiply2) * multiply4;
+  auto test2 = transpose_operator(multiply2) * multiply4;
   RightVector w = { 0. };
   test2.vmult(w, u);
   deallog << "(2 * 4) * " << u.value << " = " << w.value << std::endl;
 
   // identity
 
-  auto test3 = identity_linop(test2.reinit_range_vector) + test2;
+  auto test3 = identity_operator(test2.reinit_range_vector) + test2;
   test3.vmult(w, u);
   deallog << "(1 + 2 * 4) * " << u.value << " = " << w.value << std::endl;
 }
index 1620746cd042f8b2e43cd2c9b7741c33178ebe3e..3fd049146352837fbdc26a29b572e655be81b1d9 100644 (file)
@@ -70,8 +70,8 @@ int main()
 
   // Constructors and assignment:
 
-  auto op_a = linop(a);
-  auto op_b = linop(b);
+  auto op_a = linear_operator(a);
+  auto op_b = linear_operator(b);
 
   {
     LinearOperator<dealii::Vector<double>, dealii::Vector<double>> op_x (a);
@@ -153,33 +153,33 @@ int main()
   deallog << "solve(B, v, u): " << v << std::endl;
 
   deallog.depth_file(0);
-  inverse_linop(op_b, solver, PreconditionIdentity()).vmult(v, u);
+  inverse_operator(op_b, solver, PreconditionIdentity()).vmult(v, u);
   deallog.depth_file(3);
-  deallog << "inverse_linop(B)u: " << v << std::endl;
+  deallog << "inverse_operator(B)u: " << v << std::endl;
 
   deallog.depth_file(0);
   op_b.vmult(w, v);
   deallog.depth_file(3);
-  deallog << "B(inverse_linop(B)u): " << w << std::endl;
+  deallog << "B(inverse_operator(B)u): " << w << std::endl;
 
   deallog.depth_file(0);
-  (op_b * inverse_linop(op_b, solver, PreconditionIdentity())).vmult(w, u);
+  (op_b * inverse_operator(op_b, solver, PreconditionIdentity())).vmult(w, u);
   deallog.depth_file(3);
-  deallog << "(B*inverse_linop(B))u: " << w << std::endl;
+  deallog << "(B*inverse_operator(B))u: " << w << std::endl;
 
   deallog.depth_file(0);
-  (inverse_linop(op_b, solver, PreconditionIdentity()) * op_b).vmult(w, u);
+  (inverse_operator(op_b, solver, PreconditionIdentity()) * op_b).vmult(w, u);
   deallog.depth_file(3);
-  deallog << "(inverse_linop(B)*B)u: " << w << std::endl;
+  deallog << "(inverse_operator(B)*B)u: " << w << std::endl;
 
   SolverControl inner_solver_control (1000, 1e-12);
   SolverCG<> inner_solver (solver_control);
 
   deallog.depth_file(0);
-  solver.solve(inverse_linop(op_b, inner_solver, PreconditionIdentity()), v, u,
+  solver.solve(inverse_operator(op_b, inner_solver, PreconditionIdentity()), v, u,
                PreconditionIdentity());
   deallog.depth_file(3);
-  deallog << "solve(inverse_linop(B), v, u) == Bu: " << v << std::endl;
+  deallog << "solve(inverse_operator(B), v, u) == Bu: " << v << std::endl;
 
   deallog.depth_file(0);
   solver.solve(op_b + 0.005 * op_a, v, u, PreconditionIdentity());
index f9f16141e65b3c8ab518795179b32f68e984f0e3..a1c91305e160a1581aa406691d06abf211de8d1d 100644 (file)
@@ -25,15 +25,15 @@ DEAL::(A*=B)u: -0.1073495370 -0.1866319444 -0.2039930556 -0.02199074074 -0.28935
 DEAL::
 DEAL::solve(B, v, u): 80.16326531 28.24489796 86.53061224 25.79591837 259.4285714 57.14285714 328.0000000 88.00000000 184.0000000 226.6122449 40.48979592 1446.693878 315.7551020 160.0000000 760.0000000 387.7551020 81.63265306 190.8571429 2286.693878 470.0408163 1140.571429 108.0816327 569.9591837 539.1020408 3018.448980 
 DEAL::
-DEAL::inverse_linop(B)u: 80.16326531 28.24489796 86.53061224 25.79591837 259.4285714 57.14285714 328.0000000 88.00000000 184.0000000 226.6122449 40.48979592 1446.693878 315.7551020 160.0000000 760.0000000 387.7551020 81.63265306 190.8571429 2286.693878 470.0408163 1140.571429 108.0816327 569.9591837 539.1020408 3018.448980 
+DEAL::inverse_operator(B)u: 80.16326531 28.24489796 86.53061224 25.79591837 259.4285714 57.14285714 328.0000000 88.00000000 184.0000000 226.6122449 40.48979592 1446.693878 315.7551020 160.0000000 760.0000000 387.7551020 81.63265306 190.8571429 2286.693878 470.0408163 1140.571429 108.0816327 569.9591837 539.1020408 3018.448980 
 DEAL::
-DEAL::B(inverse_linop(B)u): 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
+DEAL::B(inverse_operator(B)u): 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
 DEAL::
-DEAL::(B*inverse_linop(B))u: 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
+DEAL::(B*inverse_operator(B))u: 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
 DEAL::
-DEAL::(inverse_linop(B)*B)u: 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
+DEAL::(inverse_operator(B)*B)u: 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
 DEAL::
-DEAL::solve(inverse_linop(B), v, u) == Bu: 0.03125000000 0.09201388889 0.1145833333 0.2812500000 0.1788194444 0.4270833333 0.2552083333 0.5538194444 0.6631944444 0.3072916667 0.6753472222 0.1822916667 0.3923611111 0.8888888889 0.4878472222 0.4791666667 1.000000000 1.093750000 0.2864583333 0.5937500000 0.6371527778 1.281250000 0.6770833333 0.7170138889 0.3750000000 
+DEAL::solve(inverse_operator(B), v, u) == Bu: 0.03125000000 0.09201388889 0.1145833333 0.2812500000 0.1788194444 0.4270833333 0.2552083333 0.5538194444 0.6631944444 0.3072916667 0.6753472222 0.1822916667 0.3923611111 0.8888888889 0.4878472222 0.4791666667 1.000000000 1.093750000 0.2864583333 0.5937500000 0.6371527778 1.281250000 0.6770833333 0.7170138889 0.3750000000 
 DEAL::
 DEAL::solve(B+0.5*0.01*A, v, u): 59.31059595 52.77843700 93.77361796 53.05371114 176.7862626 80.04635988 236.6925420 110.0293599 135.7027276 299.7370750 139.0997515 987.0719769 399.5852319 197.1836670 535.4087997 487.8703686 221.2510235 251.7282805 1564.703948 612.1971228 783.5848738 287.5180747 708.4784200 725.1386389 2062.398876 
 DEAL::
index f65717ccf961af5efddc65ff2b941dd4dc0a56e9..3fd25df0f3c0dca94c540348351625ec467585a1 100644 (file)
@@ -90,8 +90,8 @@ int main()
 
   // Constructors and assignment:
 
-  auto op_a = linop<BlockVector<double>>(a);
-  auto op_b = linop<BlockVector<double>>(b);
+  auto op_a = linear_operator<BlockVector<double>>(a);
+  auto op_b = linear_operator<BlockVector<double>>(b);
 
   {
     decltype(op_a) op_x (a);
@@ -173,33 +173,33 @@ int main()
   PRINTME("solve(B, v, u)", v);
 
   deallog.depth_file(0);
-  inverse_linop(op_b, solver, PreconditionIdentity()).vmult(v, u);
+  inverse_operator(op_b, solver, PreconditionIdentity()).vmult(v, u);
   deallog.depth_file(3);
-  PRINTME("inverse_linop(B)u", v);
+  PRINTME("inverse_operator(B)u", v);
 
   deallog.depth_file(0);
   op_b.vmult(w, v);
   deallog.depth_file(3);
-  PRINTME("B(inverse_linop(B)u)", w);
+  PRINTME("B(inverse_operator(B)u)", w);
 
   deallog.depth_file(0);
-  (op_b * inverse_linop(op_b, solver, PreconditionIdentity())).vmult(w, u);
+  (op_b * inverse_operator(op_b, solver, PreconditionIdentity())).vmult(w, u);
   deallog.depth_file(3);
-  PRINTME("(B*inverse_linop(B))u", w);
+  PRINTME("(B*inverse_operator(B))u", w);
 
   deallog.depth_file(0);
-  (inverse_linop(op_b, solver, PreconditionIdentity()) * op_b).vmult(w, u);
+  (inverse_operator(op_b, solver, PreconditionIdentity()) * op_b).vmult(w, u);
   deallog.depth_file(3);
-  PRINTME("(inverse_linop(B)*B)u", w);
+  PRINTME("(inverse_operator(B)*B)u", w);
 
   SolverControl inner_solver_control (1000, 1e-12);
   SolverCG<BlockVector<double>> inner_solver (solver_control);
 
   deallog.depth_file(0);
-  solver.solve(inverse_linop(op_b, inner_solver, PreconditionIdentity()), v, u,
+  solver.solve(inverse_operator(op_b, inner_solver, PreconditionIdentity()), v, u,
                PreconditionIdentity());
   deallog.depth_file(3);
-  PRINTME("solve(inverse_linop(B), v, u) == Bu", v);
+  PRINTME("solve(inverse_operator(B), v, u) == Bu", v);
 
   deallog.depth_file(0);
   solver.solve(op_b + 0.005 * op_a, v, u, PreconditionIdentity());
index 7d006da0c1f8eaf98504a87609285ea92b608383..d87ee3a373f8891a6cc18d8fd7fdb076fb0467cd 100644 (file)
@@ -38,19 +38,19 @@ DEAL::
 DEAL::solve(B, v, u): [block 0] 0.2000000000 0.4000000000 0.6000000000 0.8000000000 1.000000000 1.200000000 1.400000000 1.600000000 1.800000000 2.000000000 2.200000000 2.400000000 2.600000000 2.800000000 3.000000000 3.200000000 3.400000000 3.600000000 3.800000000 4.000000000 4.200000000 4.400000000 4.600000000 4.800000000 5.000000000 
 DEAL::  [block 1] 5.200000000 5.400000000 5.600000000 5.800000000 6.000000000 6.200000000 6.400000000 6.600000000 6.800000000 7.000000000 7.200000000 7.400000000 7.600000000 7.800000000 8.000000000 8.200000000 8.400000000 8.600000000 8.800000000 9.000000000 9.200000000 9.400000000 9.600000000 9.800000000 10.00000000 
 DEAL::
-DEAL::inverse_linop(B)u: [block 0] 0.2000000000 0.4000000000 0.6000000000 0.8000000000 1.000000000 1.200000000 1.400000000 1.600000000 1.800000000 2.000000000 2.200000000 2.400000000 2.600000000 2.800000000 3.000000000 3.200000000 3.400000000 3.600000000 3.800000000 4.000000000 4.200000000 4.400000000 4.600000000 4.800000000 5.000000000 
+DEAL::inverse_operator(B)u: [block 0] 0.2000000000 0.4000000000 0.6000000000 0.8000000000 1.000000000 1.200000000 1.400000000 1.600000000 1.800000000 2.000000000 2.200000000 2.400000000 2.600000000 2.800000000 3.000000000 3.200000000 3.400000000 3.600000000 3.800000000 4.000000000 4.200000000 4.400000000 4.600000000 4.800000000 5.000000000 
 DEAL::  [block 1] 5.200000000 5.400000000 5.600000000 5.800000000 6.000000000 6.200000000 6.400000000 6.600000000 6.800000000 7.000000000 7.200000000 7.400000000 7.600000000 7.800000000 8.000000000 8.200000000 8.400000000 8.600000000 8.800000000 9.000000000 9.200000000 9.400000000 9.600000000 9.800000000 10.00000000 
 DEAL::
-DEAL::B(inverse_linop(B)u): [block 0] 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
+DEAL::B(inverse_operator(B)u): [block 0] 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
 DEAL::  [block 1] 26.00000000 27.00000000 28.00000000 29.00000000 30.00000000 31.00000000 32.00000000 33.00000000 34.00000000 35.00000000 36.00000000 37.00000000 38.00000000 39.00000000 40.00000000 41.00000000 42.00000000 43.00000000 44.00000000 45.00000000 46.00000000 47.00000000 48.00000000 49.00000000 50.00000000 
 DEAL::
-DEAL::(B*inverse_linop(B))u: [block 0] 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
+DEAL::(B*inverse_operator(B))u: [block 0] 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
 DEAL::  [block 1] 26.00000000 27.00000000 28.00000000 29.00000000 30.00000000 31.00000000 32.00000000 33.00000000 34.00000000 35.00000000 36.00000000 37.00000000 38.00000000 39.00000000 40.00000000 41.00000000 42.00000000 43.00000000 44.00000000 45.00000000 46.00000000 47.00000000 48.00000000 49.00000000 50.00000000 
 DEAL::
-DEAL::(inverse_linop(B)*B)u: [block 0] 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
+DEAL::(inverse_operator(B)*B)u: [block 0] 1.000000000 2.000000000 3.000000000 4.000000000 5.000000000 6.000000000 7.000000000 8.000000000 9.000000000 10.00000000 11.00000000 12.00000000 13.00000000 14.00000000 15.00000000 16.00000000 17.00000000 18.00000000 19.00000000 20.00000000 21.00000000 22.00000000 23.00000000 24.00000000 25.00000000 
 DEAL::  [block 1] 26.00000000 27.00000000 28.00000000 29.00000000 30.00000000 31.00000000 32.00000000 33.00000000 34.00000000 35.00000000 36.00000000 37.00000000 38.00000000 39.00000000 40.00000000 41.00000000 42.00000000 43.00000000 44.00000000 45.00000000 46.00000000 47.00000000 48.00000000 49.00000000 50.00000000 
 DEAL::
-DEAL::solve(inverse_linop(B), v, u) == Bu: [block 0] 5.000000000 10.00000000 15.00000000 20.00000000 25.00000000 30.00000000 35.00000000 40.00000000 45.00000000 50.00000000 55.00000000 60.00000000 65.00000000 70.00000000 75.00000000 80.00000000 85.00000000 90.00000000 95.00000000 100.0000000 105.0000000 110.0000000 115.0000000 120.0000000 125.0000000 
+DEAL::solve(inverse_operator(B), v, u) == Bu: [block 0] 5.000000000 10.00000000 15.00000000 20.00000000 25.00000000 30.00000000 35.00000000 40.00000000 45.00000000 50.00000000 55.00000000 60.00000000 65.00000000 70.00000000 75.00000000 80.00000000 85.00000000 90.00000000 95.00000000 100.0000000 105.0000000 110.0000000 115.0000000 120.0000000 125.0000000 
 DEAL::  [block 1] 130.0000000 135.0000000 140.0000000 145.0000000 150.0000000 155.0000000 160.0000000 165.0000000 170.0000000 175.0000000 180.0000000 185.0000000 190.0000000 195.0000000 200.0000000 205.0000000 210.0000000 215.0000000 220.0000000 225.0000000 230.0000000 235.0000000 240.0000000 245.0000000 250.0000000 
 DEAL::
 DEAL::solve(B+0.5*0.01*A, v, u): [block 0] 0.1998001998 0.3996003996 0.5994005994 0.7992007992 0.9990009990 1.198801199 1.398601399 1.598401598 1.798201798 1.998001998 2.197802198 2.397602398 2.597402597 2.797202797 2.997002997 3.196803197 3.396603397 3.596403596 3.796203796 3.996003996 4.195804196 4.395604396 4.595404595 4.795204795 4.995004995 
index 2a4e4f4216b829fdf072c7c47fff2059bd74d6f8..6a492275e330a125a222360c75f7ea4d33000e67 100644 (file)
@@ -35,13 +35,13 @@ int main(int argc, char *argv[])
 
   TrilinosWrappers::SparseMatrix a;
 
-  auto op_a  = linop<TrilinosWrappers::MPI::Vector>(a);
-  auto op_a2  = linop<TrilinosWrappers::Vector>(a);
+  auto op_a  = linear_operator<TrilinosWrappers::MPI::Vector>(a);
+  auto op_a2  = linear_operator<TrilinosWrappers::Vector>(a);
 
   TrilinosWrappers::BlockSparseMatrix b;
 
-  auto op_b = linop<TrilinosWrappers::MPI::BlockVector>(b);
-  auto op_b3 = linop<TrilinosWrappers::BlockVector>(b);
+  auto op_b = linear_operator<TrilinosWrappers::MPI::BlockVector>(b);
+  auto op_b3 = linear_operator<TrilinosWrappers::BlockVector>(b);
 
   deallog << "OK" << std::endl;
 
index 0a66e8903bfe1302746e07267d3abc521dbb03b3..958df9fcf1a6dec9153bbc0ce56642ff951d6c53 100644 (file)
@@ -13,7 +13,7 @@
 //
 // ---------------------------------------------------------------------
 
-// Tests for block_linop
+// Tests for block_operator
 
 #include "../tests.h"
 
@@ -98,15 +98,15 @@ int main()
     a.block(1, 0).set(i, i, 1.);
 
 
-  auto op_a = linop<BlockVector<double>>(a);
+  auto op_a = linear_operator<BlockVector<double>>(a);
 
-  auto op_b00 = linop(a.block(0, 0));
-  auto op_b01 = linop(a.block(0, 1));
-  auto op_b10 = linop(a.block(1, 0));
-  auto op_b11 = linop(a.block(1, 1));
+  auto op_b00 = linear_operator(a.block(0, 0));
+  auto op_b01 = linear_operator(a.block(0, 1));
+  auto op_b10 = linear_operator(a.block(1, 0));
+  auto op_b11 = linear_operator(a.block(1, 1));
 
   auto op_b =
-      block_linop<2, 2, BlockVector<double>>({op_b00, op_b01, op_b10, op_b11});
+      block_operator<2, 2, BlockVector<double>>({op_b00, op_b01, op_b10, op_b11});
 
   // vmult:
 
@@ -173,7 +173,7 @@ int main()
 
   // And finally complicated block structures:
 
-  auto op_upp_x_upu = block_linop<3, 3, BlockVector<double>>(
+  auto op_upp_x_upu = block_operator<3, 3, BlockVector<double>>(
       {op_b00, op_b01, op_b00, op_b10, op_b11, op_b10, op_b10, op_b11, op_b10});
 
   op_upp_x_upu.reinit_domain_vector(u, false);
@@ -191,12 +191,12 @@ int main()
   PRINTME("v", v);
 
   auto op_upp_x_p =
-      block_linop<3, 1, BlockVector<double>>({op_b01, op_b11, op_b11});
+      block_operator<3, 1, BlockVector<double>>({op_b01, op_b11, op_b11});
 
   auto op_u_x_upu =
-      block_linop<1, 3, BlockVector<double>>({op_b00, op_b01, op_b00});
+      block_operator<1, 3, BlockVector<double>>({op_b00, op_b01, op_b00});
 
-  auto op_long = op_u_x_upu * transpose_linop(op_upp_x_upu) * op_upp_x_p;
+  auto op_long = op_u_x_upu * transpose_operator(op_upp_x_upu) * op_upp_x_p;
 
   op_long.reinit_domain_vector(u, false);
   for (unsigned int i = 0; i < u.size(); ++i) {
index 393b548c61105e3b7c6983c3000c5d35933d17b1..0eab4f6f224e9bd060d061055064a1b54974d83b 100644 (file)
@@ -13,7 +13,7 @@
 //
 // ---------------------------------------------------------------------
 
-// Test linop constructor for full and reduced interface:
+// Test linear_operator constructor for full and reduced interface:
 
 #include "../tests.h"
 
@@ -207,33 +207,33 @@ int main()
   MyMatrix5 m5;
   MyMatrix6 m6;
 
-  linop(m1).vmult(v, u);
-  linop(m1).Tvmult(v, u);
-  linop(m1).vmult_add(v, u);
-  linop(m1).Tvmult_add(v, u);
-
-  linop(m2).vmult(v, u);
-  linop(m2).Tvmult(v, u);
-  linop(m2).vmult_add(v, u);
-  linop(m2).Tvmult_add(v, u);
-
-  linop(m3).vmult(v, u);
-  linop(m3).Tvmult(v, u);
-  linop(m3).vmult_add(v, u);
-  linop(m3).Tvmult_add(v, u);
-
-  linop(m4).vmult(v, u);
-  linop(m4).Tvmult(v, u);
-  linop(m4).vmult_add(v, u);
-  linop(m4).Tvmult_add(v, u);
-
-  linop(m5).vmult(v, u);
-  linop(m5).Tvmult(v, u);
-  linop(m5).vmult_add(v, u);
-  linop(m5).Tvmult_add(v, u);
-
-  linop(m6).vmult(v, u);
-  linop(m6).Tvmult(v, u);
-  linop(m6).vmult_add(v, u);
-  linop(m6).Tvmult_add(v, u);
+  linear_operator(m1).vmult(v, u);
+  linear_operator(m1).Tvmult(v, u);
+  linear_operator(m1).vmult_add(v, u);
+  linear_operator(m1).Tvmult_add(v, u);
+
+  linear_operator(m2).vmult(v, u);
+  linear_operator(m2).Tvmult(v, u);
+  linear_operator(m2).vmult_add(v, u);
+  linear_operator(m2).Tvmult_add(v, u);
+
+  linear_operator(m3).vmult(v, u);
+  linear_operator(m3).Tvmult(v, u);
+  linear_operator(m3).vmult_add(v, u);
+  linear_operator(m3).Tvmult_add(v, u);
+
+  linear_operator(m4).vmult(v, u);
+  linear_operator(m4).Tvmult(v, u);
+  linear_operator(m4).vmult_add(v, u);
+  linear_operator(m4).Tvmult_add(v, u);
+
+  linear_operator(m5).vmult(v, u);
+  linear_operator(m5).Tvmult(v, u);
+  linear_operator(m5).vmult_add(v, u);
+  linear_operator(m5).Tvmult_add(v, u);
+
+  linear_operator(m6).vmult(v, u);
+  linear_operator(m6).Tvmult(v, u);
+  linear_operator(m6).vmult_add(v, u);
+  linear_operator(m6).Tvmult_add(v, u);
 }
index 75f92cb569efdef31ae17a4aa59c8748c07e1a0c..53711def2dbb38a074df817e5cda5adf77a9712c 100644 (file)
@@ -13,7 +13,7 @@
 //
 // ---------------------------------------------------------------------
 
-// Tests for blockdiagonal_linop
+// Tests for block_diagonal_operator
 
 #include "../tests.h"
 
@@ -78,14 +78,14 @@ int main()
     a.block(2, 2).set(i, i, 3.);
 
 
-  auto op_a = linop<BlockVector<double>>(a);
+  auto op_a = linear_operator<BlockVector<double>>(a);
 
-  auto op_b0 = linop(a.block(0, 0));
-  auto op_b1 = linop(a.block(1, 1));
-  auto op_b2 = linop(a.block(2, 2));
+  auto op_b0 = linear_operator(a.block(0, 0));
+  auto op_b1 = linear_operator(a.block(1, 1));
+  auto op_b2 = linear_operator(a.block(2, 2));
 
   auto op_b =
-      blockdiag_linop<3, BlockVector<double>>({op_b0, op_b1, op_b2});
+      block_diagonal_operator<3, BlockVector<double>>({op_b0, op_b1, op_b2});
 
   // vmult:
 
@@ -150,11 +150,11 @@ int main()
   op_x.Tvmult_add(x, u);
   PRINTME("(B*B*B) Tvmult_add", x);
 
-  // And finally the other blockdiag_linop variant:
+  // And finally the other block_diagonal_operator variant:
 
-  auto op_c = blockdiag_linop<5, BlockVector<double>>({op_b0, op_b0, op_b0, op_b0, op_b0});
+  auto op_c = block_diagonal_operator<5, BlockVector<double>>({op_b0, op_b0, op_b0, op_b0, op_b0});
 
-  auto op_d = blockdiag_linop<5, BlockVector<double>>(op_b0);
+  auto op_d = block_diagonal_operator<5, BlockVector<double>>(op_b0);
 
   op_c.reinit_domain_vector(u, false);
   for (unsigned int i = 0; i < u.size(); ++i) {
index a03cd8f91d0e696b138b2f28090b5d99999c9136..d15d626d5312f202d96683679a220d3e42ce0265 100644 (file)
@@ -44,7 +44,7 @@ int main()
 
     SparseMatrix<double> a (sparsity_pattern);
 
-    auto op_a = linop(a);
+    auto op_a = linear_operator(a);
 
     Vector<double> u;
     op_a.reinit_domain_vector(u, false);
@@ -72,7 +72,7 @@ int main()
 
     BlockSparseMatrix<double> a (sparsity_pattern);
 
-    auto op_a = linop<BlockVector<double>>(a);
+    auto op_a = linear_operator<BlockVector<double>>(a);
 
     BlockVector<double> u;
     op_a.reinit_domain_vector(u, false);

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.