]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix comments in @code blocks in lac headers
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 8 Jul 2018 21:50:40 +0000 (23:50 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 8 Jul 2018 21:51:41 +0000 (23:51 +0200)
17 files changed:
include/deal.II/lac/block_linear_operator.h
include/deal.II/lac/block_matrix_array.h
include/deal.II/lac/diagonal_matrix.h
include/deal.II/lac/filtered_matrix.h
include/deal.II/lac/identity_matrix.h
include/deal.II/lac/matrix_out.h
include/deal.II/lac/parpack_solver.h
include/deal.II/lac/petsc_solver.h
include/deal.II/lac/precondition.h
include/deal.II/lac/precondition_selector.h
include/deal.II/lac/read_write_vector.h
include/deal.II/lac/schur_complement.h
include/deal.II/lac/slepc_solver.h
include/deal.II/lac/slepc_spectral_transformation.h
include/deal.II/lac/solver.h
include/deal.II/lac/solver_selector.h
include/deal.II/lac/vector_type_traits.h

index 80f456bf2242fe72e4bd6374600b0f811182ff86..136c457dbad4d7868c9b7339b6b66b4bdeeb67e0 100644 (file)
@@ -171,7 +171,8 @@ block_back_substitution(
  * auto top_left_op = linear_operator(top_left);
  * auto bottom_right_op = linear_operator(bottom_right);
  * std::array<decltype(top_left_op), 2> operators {{top_left_op,
- * bottom_right_op}}; auto block_op = block_diagonal_operator (operators);
+ *                                                  bottom_right_op}};
+ * auto block_op = block_diagonal_operator (operators);
  *
  * std::vector<BlockVector<double>::size_type> block_sizes {2, 4};
  * BlockVector<double> src(block_sizes);
index 3adb25c46e69f210daa4f28e26f4a31d4b574b1f..75fd70b812bd2d231b22df392f396c2ef698e7c1 100644 (file)
@@ -234,26 +234,26 @@ public:
    *
    * As an example, consider the following code:
    * @code
-   *   FullMatrix<double> A1(4,4);
-   *  FullMatrix<double> A2(4,4);
-   *  FullMatrix<double> B(4,3);
-   *  FullMatrix<double> C(3,3);
+   * FullMatrix<double> A1(4,4);
+   * FullMatrix<double> A2(4,4);
+   * FullMatrix<double> B(4,3);
+   * FullMatrix<double> C(3,3);
    *
-   *  BlockMatrixArray<double> block(2,2);
+   * BlockMatrixArray<double> block(2,2);
    *
-   *  block.enter(A1,0,0);
-   *  block.enter(A2,0,0,2,true);
-   *  block.enter(B,0,1,-3.);
-   *  block.enter(B,0,1,-3.,true);
-   *  block.enter(C,1,1,1.,true);
+   * block.enter(A1,0,0);
+   * block.enter(A2,0,0,2,true);
+   * block.enter(B,0,1,-3.);
+   * block.enter(B,0,1,-3.,true);
+   * block.enter(C,1,1,1.,true);
    *
-   *  block.print_latex(std::cout);
+   * block.print_latex(std::cout);
    * @endcode
    * The current function will then produce output of the following kind:
    * @code
    * \begin{array}{cc}
    *    M0+2xM1^T &     -3xM2-3xM3^T\\
-   *    &      M4^T
+   *              &      M4^T
    * \end{array}
    * @endcode
    * Note how the individual blocks here are just numbered successively as
index 08573e8218d360653a9eff32af474706235d0f00..fa99ed42a6482b56fcf47608c42e87059fd75d48 100644 (file)
@@ -36,7 +36,8 @@ DEAL_II_NAMESPACE_OPEN
  * @code
  * DiagonalMatrix<LinearAlgebra::distributed::Vector<double> > diagonal_matrix;
  * LinearAlgebra::distributed::Vector<double> &diagonal_vector =
- * diagonal_matrix.get_vector(); diagonal_vector.reinit(locally_owned_dofs,
+ *   diagonal_matrix.get_vector();
+ * diagonal_vector.reinit(locally_owned_dofs,
  *                        locally_relevant_dofs,
  *                        mpi_communicator);
  * @endcode
index 730bd23ef64cf1a21f52ff09bf1cbf22e0f243af..7c190e828f942d00867128247b7e0fe312d91397 100644 (file)
@@ -69,28 +69,28 @@ class FilteredMatrixBlock;
  *
  * A typical code snippet showing the above steps is as follows:
  * @code
- *   ... // set up sparse matrix A and right hand side b somehow
+ *   // set up sparse matrix A and right hand side b somehow
+ *   ...
  *
- *                     // initialize filtered matrix with
- *                     // matrix and boundary value constraints
+ *   // initialize filtered matrix with matrix and boundary value constraints
  *   FilteredMatrix<Vector<double> > filtered_A (A);
  *   filtered_A.add_constraints (boundary_values);
  *
- *                     // set up a linear solver
+ *   // set up a linear solver
  *   SolverControl control (1000, 1.e-10, false, false);
  *   GrowingVectorMemory<Vector<double> > mem;
  *   SolverCG<Vector<double> > solver (control, mem);
  *
- *                     // set up a preconditioner object
+ *   // set up a preconditioner object
  *   PreconditionJacobi<SparseMatrix<double> > prec;
  *   prec.initialize (A, 1.2);
  *   FilteredMatrix<Vector<double> > filtered_prec (prec);
  *   filtered_prec.add_constraints (boundary_values);
  *
- *                     // compute modification of right hand side
+ *   // compute modification of right hand side
  *   filtered_A.apply_constraints (b, true);
  *
- *                     // solve for solution vector x
+ *   // solve for solution vector x
  *   solver.solve (filtered_A, x, b, filtered_prec);
  * @endcode
  *
index e418b61d7a0cd3148a064cbdb292d2097dd8194a..b34db37b615c2037ddd6fb5c350ee77c3a9d00e6 100644 (file)
@@ -62,7 +62,7 @@ DEAL_II_NAMESPACE_OPEN
  * SolverControl           solver_control (1000, 1e-12);
  * SolverCG<>              cg (solver_control);
  * cg.solve (system_matrix, solution, system_rhs,
- *          IdentityMatrix(solution.size()));
+ *           IdentityMatrix(solution.size()));
  * @endcode
  *
  *
index 2f4a1c4f618e9733bfe4aba2e02f22c5d3a274bb..5fbf56f82f4567532209fd9d4a4321ad7f334d1b 100644 (file)
@@ -45,14 +45,15 @@ DEAL_II_NAMESPACE_OPEN
  *
  * A typical usage of this class would be as follows:
  * @code
- *    FullMatrix<double> M;
- *    ...                // fill matrix M with some values
+ *   FullMatrix<double> M;
+ *   // fill matrix M with some values
+ *   ...
  *
- *                       // now write out M:
- *    MatrixOut matrix_out;
- *    std::ofstream out ("M.gnuplot");
- *    matrix_out.build_patches (M, "M");
- *    matrix_out.write_gnuplot (out);
+ *   // now write out M:
+ *   MatrixOut matrix_out;
+ *   std::ofstream out ("M.gnuplot");
+ *   matrix_out.build_patches (M, "M");
+ *   matrix_out.write_gnuplot (out);
  * @endcode
  * Of course, you can as well choose a different graphical output format.
  * Also, this class supports any matrix, not only of type FullMatrix, as long
index 2225ae43fc9304106ba6124145677c3b9b517950..f43aa909f7d232c48bdeb461e4495eead7ca72d0 100644 (file)
@@ -194,8 +194,8 @@ extern "C"
  *   SolverControl solver_control_lin (1000, 1e-10,false,false);
  *
  *   SolverCG<vector_t> cg(solver_control_lin);
- *   const auto op_shift_invert = inverse_operator(op_shift, cg,
- * PreconditionIdentity ());
+ *   const auto op_shift_invert =
+ *     inverse_operator(op_shift, cg, PreconditionIdentity ());
  * @endcode
  *
  * The class is intended to be used with MPI and can work on arbitrary vector
index 44b8f4581b79cfddc75702c09713ff8863afea77..a71660e0ec81e93d93411e1c4b7ad46c9faf0e02 100644 (file)
@@ -918,10 +918,10 @@ namespace PETScWrappers
    * is made possible by the set_symmetric_mode() function. If your matrix is
    * symmetric, you can use this class as follows:
    * @code
-   *    SolverControl cn;
-   *    PETScWrappers::SparseDirectMUMPS solver(cn, mpi_communicator);
-   *    solver.set_symmetric_mode(true);
-   *    solver.solve(system_matrix, solution, system_rhs);
+   *   SolverControl cn;
+   *   PETScWrappers::SparseDirectMUMPS solver(cn, mpi_communicator);
+   *   solver.set_symmetric_mode(true);
+   *   solver.solve(system_matrix, solution, system_rhs);
    * @endcode
    *
    * @note The class internally calls KSPSetFromOptions thus you are able to
index cf895e8069bc186f15caaac4ef279c5cee6e4c47..9800cb55a695b7f8d47bca17af6663d461a710c8 100644 (file)
@@ -63,8 +63,7 @@ namespace LinearAlgebra
  * @code
  * SolverControl           solver_control (1000, 1e-12);
  * SolverCG<>              cg (solver_control);
- * cg.solve (system_matrix, solution, system_rhs,
- *          PreconditionIdentity());
+ * cg.solve (system_matrix, solution, system_rhs, PreconditionIdentity());
  * @endcode
  *
  * See the step-3 tutorial program for an example and additional explanations.
@@ -331,13 +330,12 @@ private:
  * You will usually not want to create a named object of this type, although
  * possible. The most common use is like this:
  * @code
- *    SolverGMRES<SparseMatrix<double>,
- *                Vector<double> >      gmres(control,memory,500);
+ * SolverGMRES<SparseMatrix<double> Vector<double>> gmres(control,memory,500);
  *
- *    gmres.solve (matrix, solution, right_hand_side,
- *                 PreconditionUseMatrix<SparseMatrix<double>,Vector<double> >
- *                 (matrix,&SparseMatrix<double>::template
- * precondition_Jacobi<double>));
+ * gmres.solve(
+ *   matrix, solution, right_hand_side,
+ *   PreconditionUseMatrix<SparseMatrix<double>,Vector<double> >(
+ *     matrix, &SparseMatrix<double>::template precondition_Jacobi<double>));
  * @endcode
  * This creates an unnamed object to be passed as the fourth parameter to the
  * solver function of the SolverGMRES class. It assumes that the SparseMatrix
@@ -350,11 +348,11 @@ private:
  * Note that due to the default template parameters, the above example could
  * be written shorter as follows:
  * @code
- *    ...
- *    gmres.solve (matrix, solution, right_hand_side,
- *                 PreconditionUseMatrix<>
- *                   (matrix,&SparseMatrix<double>::template
- * precondition_Jacobi<double>));
+ * ...
+ * gmres.solve(
+ *   matrix, solution, right_hand_side,
+ *   PreconditionUseMatrix<>(
+ *     matrix,&SparseMatrix<double>::template precondition_Jacobi<double>));
  * @endcode
  *
  * @author Guido Kanschat, Wolfgang Bangerth, 1999
@@ -495,8 +493,8 @@ protected:
  * // Define and initialize preconditioner:
  *
  * PreconditionJacobi<SparseMatrix<double> > precondition;
- * precondition.initialize (A, PreconditionJacobi<SparseMatrix<double>
- * >::AdditionalData(.6));
+ * precondition.initialize(
+ *   A, PreconditionJacobi<SparseMatrix<double>>::AdditionalData(.6));
  *
  * solver.solve (A, x, b, precondition);
  * @endcode
@@ -583,8 +581,8 @@ public:
  * // Define and initialize preconditioner
  *
  * PreconditionSOR<SparseMatrix<double> > precondition;
- * precondition.initialize (A, PreconditionSOR<SparseMatrix<double>
- * >::AdditionalData(.6));
+ * precondition.initialize(
+ *   A, PreconditionSOR<SparseMatrix<double>>::AdditionalData(.6));
  *
  * solver.solve (A, x, b, precondition);
  * @endcode
@@ -640,7 +638,7 @@ public:
  * @ref ConceptRelaxationType "relaxation concept".
  *
  * @code
- *     // Declare related objects
+ * // Declare related objects
  *
  * SparseMatrix<double> A;
  * Vector<double> x;
@@ -652,8 +650,8 @@ public:
  * // Define and initialize preconditioner
  *
  * PreconditionSSOR<SparseMatrix<double> > precondition;
- * precondition.initialize (A, PreconditionSSOR<SparseMatrix<double>
- * >::AdditionalData(.6));
+ * precondition.initialize(
+ *   A, PreconditionSSOR<SparseMatrix<double>>::AdditionalData(.6));
  *
  * solver.solve (A, x, b, precondition);
  * @endcode
@@ -737,7 +735,7 @@ private:
  * <tt>TPSOR(VectorType&, const VectorType&, double)</tt>.
  *
  * @code
- *     // Declare related objects
+ * // Declare related objects
  *
  * SparseMatrix<double> A;
  * Vector<double> x;
@@ -751,7 +749,7 @@ private:
  *
  * //...fill permutation and its inverse with reasonable values
  *
- *     // Define and initialize preconditioner
+ * // Define and initialize preconditioner
  *
  * PreconditionPSOR<SparseMatrix<double> > precondition;
  * precondition.initialize (A, permutation, inverse_permutation, .6);
index 7b6b2f27edd3c69a5ca13c8d37260574acb34c25..389033a034ab6c3ac5e9f9f8776305b7fe57de36 100644 (file)
@@ -49,35 +49,35 @@ class SparseMatrix;
  *
  * <h3>Usage</h3> The simplest use of this class is the following:
  * @code
- *                                  // generate a @p SolverControl and
- *                                  // a @p VectorMemory
+ * // generate a @p SolverControl and a @p VectorMemory
  * SolverControl control;
  * VectorMemory<Vector<double> > memory;
- *                                  // generate a solver
+ *
+ * // generate a solver
  * SolverCG<SparseMatrix<double>, Vector<double> > solver(control, memory);
- *                                  // generate a @p PreconditionSelector
+ *
+ * // generate a @p PreconditionSelector
  * PreconditionSelector<SparseMatrix<double>, Vector<double> >
  *   preconditioning("jacobi", 1.);
- *                                  // give a matrix whose diagonal entries
- *                                  // are to be used for the preconditioning.
- *                                  // Generally the matrix of the linear
- *                                  // equation system Ax=b.
+ *
+ * // give a matrix whose diagonal entries are to be used for the
+ * // preconditioning. Generally the matrix of the linear equation system Ax=b.
  * preconditioning.use_matrix(A);
- *                                  // call the @p solve function with this
- *                                  // preconditioning as last argument
+ *
+ * // call the @p solve function with this preconditioning as last argument
  * solver.solve(A,x,b,preconditioning);
  * @endcode
  * The same example where also the @p SolverSelector class is used reads
  * @code
- *                                  // generate a @p SolverControl and
- *                                  // a @p VectorMemory
+ * // generate a @p SolverControl and a @p VectorMemory
  * SolverControl control;
  * VectorMemory<Vector<double> > memory;
- *                                  // generate a @p SolverSelector that
- *                                  // calls the @p SolverCG
+ *
+ * // generate a @p SolverSelector that calls the @p SolverCG
  * SolverSelector<SparseMatrix<double>, Vector<double> >
  *   solver_selector("cg", control, memory);
- *                                  // generate a @p PreconditionSelector
+ *
+ * // generate a @p PreconditionSelector
  * PreconditionSelector<SparseMatrix<double>, Vector<double> >
  *   preconditioning("jacobi", 1.);
  *
index 9a3a1529abd547e398b3c623ad955c0078fd2c3c..1c26196c03253b6333b3a59695b645ec6b3e8d41 100644 (file)
@@ -236,7 +236,7 @@ namespace LinearAlgebra
      * @code
      * struct Functor
      * {
-     *    void operator() (Number &value);
+     *   void operator() (Number &value);
      * };
      * @endcode
      *
index fe9181ae3f8c89b001b94752158d359f0eb1fcdc..7ad43b3e916a5dafc39b4c01e912830a533be449 100644 (file)
@@ -129,36 +129,45 @@ DEAL_II_NAMESPACE_OPEN
  * An illustration of typical usage of this operator for a fully coupled
  * system is given below.
  * @code
- *    #include<deal.II/lac/schur_complement.h>
- *
- *    // Given BlockMatrix K and BlockVectors d,F
- *
- *    // Decomposition of tangent matrix
- *    const auto A = linear_operator(K.block(0,0));
- *    const auto B = linear_operator(K.block(0,1));
- *    const auto C = linear_operator(K.block(1,0));
- *    const auto D = linear_operator(K.block(1,1));
- *
- *    // Decomposition of solution vector
- *    auto x = d.block(0);
- *    auto y = d.block(1);
- *
- *    // Decomposition of RHS vector
- *    auto f = F.block(0);
- *    auto g = F.block(1);
- *
- *    // Construction of inverse of Schur complement
- *    const auto prec_A = PreconditionSelector<...>(A);
- *    const auto A_inv = inverse_operator<...>(A,prec_A);
- *    const auto S = schur_complement(A_inv,B,C,D);
- *    const auto S_prec = PreconditionSelector<...>(D); // D and S operate on
- * same space const auto S_inv = inverse_operator<...>(S,...,prec_S);
- *
- *    // Solve reduced block system
- *    auto rhs = condense_schur_rhs (A_inv,C,f,g); // PackagedOperation that
- * represents the condensed form of g y = S_inv * rhs; // Solve for y x =
- * postprocess_schur_solution (A_inv,B,y,f); // Compute x using resolved
- * solution y
+ * #include<deal.II/lac/schur_complement.h>
+ *
+ * // Given BlockMatrix K and BlockVectors d,F
+ *
+ * // Decomposition of tangent matrix
+ * const auto A = linear_operator(K.block(0,0));
+ * const auto B = linear_operator(K.block(0,1));
+ * const auto C = linear_operator(K.block(1,0));
+ * const auto D = linear_operator(K.block(1,1));
+ *
+ * // Decomposition of solution vector
+ * auto x = d.block(0);
+ * auto y = d.block(1);
+ *
+ * // Decomposition of RHS vector
+ * auto f = F.block(0);
+ * auto g = F.block(1);
+ *
+ * // Construction of inverse of Schur complement
+ * const auto prec_A = PreconditionSelector<...>(A);
+ * const auto A_inv = inverse_operator<...>(A,prec_A);
+ * const auto S = schur_complement(A_inv,B,C,D);
+ *
+ * // D and S operate on same space
+ * const auto S_prec = PreconditionSelector<...>(D);
+ * const auto S_inv = inverse_operator<...>(S,...,prec_S);
+ *
+ * // Solve reduced block system
+ * // PackagedOperation that represents the condensed form of g
+ * y = S_inv * rhs;
+ *
+ * // PackagedOperation that represents the condensed form of g
+ * auto rhs = condense_schur_rhs (A_inv,C,f,g);
+ *
+ * // Solve for y
+ * y = S_inv * rhs;
+ *
+ * // Compute x using resolved solution y
+ * postprocess_schur_solution (A_inv,B,y,f);
  * @endcode
  *
  * In the above example, the preconditioner for $ S $ was defined as the
@@ -178,22 +187,29 @@ DEAL_II_NAMESPACE_OPEN
  * construct the approximate inverse operator $ \tilde{S}^{-1} $ which is then
  * used as the preconditioner for computing $ S^{-1} $.
  * @code
- *    // Construction of approximate inverse of Schur complement
- *    const auto A_inv_approx = linear_operator(preconditioner_A);
- *    const auto S_approx = schur_complement(A_inv_approx,B,C,D);
- *    const auto S_approx_prec = PreconditionSelector<...>(D); // D and S_approx
- * operate on same space const auto S_inv_approx =
- * inverse_operator(S_approx,...,S_approx_prec); // Inner solver: Typically
- * limited to few iterations using IterationNumberControl
- *
- *    // Construction of exact inverse of Schur complement
- *    const auto S = schur_complement(A_inv,B,C,D);
- *    const auto S_inv = inverse_operator(S,...,S_inv_approx); // Outer solver
- *
- *    // Solve reduced block system
- *    auto rhs = condense_schur_rhs (A_inv,C,f,g);
- *    y = S_inv * rhs; // Solve for y
- *    x = postprocess_schur_solution (A_inv,B,y,f);
+ * // Construction of approximate inverse of Schur complement
+ * const auto A_inv_approx = linear_operator(preconditioner_A);
+ * const auto S_approx = schur_complement(A_inv_approx,B,C,D);
+ *
+ * // D and S_approx operate on same space
+ * const auto S_approx_prec = PreconditionSelector<...>(D);
+ *
+ * // Inner solver:
+ * // Typically limited to few iterations using IterationNumberControl
+ * auto S_inv_approx = inverse_operator(S_approx,...,S_approx_prec);
+ *
+ * // Construction of exact inverse of Schur complement
+ * const auto S = schur_complement(A_inv,B,C,D);
+ *
+ * // Outer solver
+ * const auto S_inv = inverse_operator(S,...,S_inv_approx);
+ *
+ * // Solve reduced block system
+ * auto rhs = condense_schur_rhs (A_inv,C,f,g);
+ *
+ * // Solve for y
+ * y = S_inv * rhs;
+ * x = postprocess_schur_solution (A_inv,B,y,f);
  * @endcode
  * Note that due to the construction of @c S_inv_approx and subsequently @c
  * S_inv, there are a pair of nested iterative solvers which could
index ac75ad26681fb39cf0ddded3f26a606fc4401ea3..afcb056b762fc0be5be513c7bc33ec3c20f99e86 100644 (file)
@@ -50,9 +50,9 @@ DEAL_II_NAMESPACE_OPEN
  *
  * SLEPcWrappers can be implemented in application codes in the following way:
  * @code
- *  SolverControl solver_control (1000, 1e-9);
- *  SolverArnoldi system (solver_control, mpi_communicator);
- *  system.solve (A, B, lambda, x, size_of_spectrum);
+ * SolverControl solver_control (1000, 1e-9);
+ * SolverArnoldi system (solver_control, mpi_communicator);
+ * system.solve (A, B, lambda, x, size_of_spectrum);
  * @endcode
  * for the generalized eigenvalue problem $Ax=B\lambda x$, where the variable
  * <code>const unsigned int size_of_spectrum</code> tells SLEPc the number of
@@ -63,8 +63,8 @@ DEAL_II_NAMESPACE_OPEN
  * wanted only, the following code can be implemented before calling
  * <code>solve()</code>:
  * @code
- *  system.set_problem_type (EPS_NHEP);
- *  system.set_which_eigenpairs (EPS_SMALLEST_REAL);
+ * system.set_problem_type (EPS_NHEP);
+ * system.set_which_eigenpairs (EPS_SMALLEST_REAL);
  * @endcode
  * These options can also be set at the command line.
  *
@@ -75,22 +75,22 @@ DEAL_II_NAMESPACE_OPEN
  * additionally specify which linear solver and preconditioner to use. This
  * can be achieved as follows
  * @code
- *   PETScWrappers::PreconditionBoomerAMG::AdditionalData data;
- *   data.symmetric_operator = true;
- *   PETScWrappers::PreconditionBoomerAMG preconditioner(mpi_communicator,
- * data); SolverControl linear_solver_control (dof_handler.n_dofs(),
- * 1e-12,false,false); PETScWrappers::SolverCG
- * linear_solver(linear_solver_control,mpi_communicator);
- *   linear_solver.initialize(preconditioner);
- *   SolverControl solver_control (100, 1e-9,false,false);
- *   SLEPcWrappers::SolverKrylovSchur
- * eigensolver(solver_control,mpi_communicator);
- *   SLEPcWrappers::TransformationShift
- * spectral_transformation(mpi_communicator);
- *   spectral_transformation.set_solver(linear_solver);
- *   eigensolver.set_transformation(spectral_transformation);
- *   eigensolver.solve
- * (stiffness_matrix,mass_matrix,eigenvalues,eigenfunctions,eigenfunctions.size());
+ * PETScWrappers::PreconditionBoomerAMG::AdditionalData data;
+ * data.symmetric_operator = true;
+ * PETScWrappers::PreconditionBoomerAMG preconditioner(mpi_communicator, data);
+ * SolverControl linear_solver_control (dof_handler.n_dofs(),
+ *                                      1e-12, false, false);
+ * PETScWrappers::SolverCG linear_solver(linear_solver_control,
+ *                                       mpi_communicator);
+ * linear_solver.initialize(preconditioner);
+ * SolverControl solver_control (100, 1e-9,false,false);
+ * SLEPcWrappers::SolverKrylovSchur eigensolver(solver_control,
+ *                                              mpi_communicator);
+ * SLEPcWrappers::TransformationShift spectral_transformation(mpi_communicator);
+ * spectral_transformation.set_solver(linear_solver);
+ * eigensolver.set_transformation(spectral_transformation);
+ * eigensolver.solve(stiffness_matrix, mass_matrix,
+ *                   eigenvalues, eigenfunctions, eigenfunctions.size());
  * @endcode
  *
  * In order to support this usage case, different from PETSc wrappers, the
@@ -110,11 +110,13 @@ DEAL_II_NAMESPACE_OPEN
  * template <typename OutputVector>
  * void
  * SolverBase::solve (const PETScWrappers::MatrixBase &A,
- *                   const PETScWrappers::MatrixBase &B,
- *                   std::vector<PetscScalar>        &eigenvalues,
- *                   std::vector<OutputVector>       &eigenvectors,
- *                   const unsigned int               n_eigenpairs)
- * { ... }
+ *                    const PETScWrappers::MatrixBase &B,
+ *                    std::vector<PetscScalar>        &eigenvalues,
+ *                    std::vector<OutputVector>       &eigenvectors,
+ *                    const unsigned int               n_eigenpairs)
+ * {
+ *   ...
+ * }
  * @endcode
  * as an example on how to do this.
  *
index ab11c1740b0a4951f2aab5fe1105fba68e946753..0beae909d9227782f18293c21cac6397d0ecf4bd 100644 (file)
@@ -50,16 +50,17 @@ namespace SLEPcWrappers
    * application codes in the following way for <code>XXX=INVERT</code> with
    * the solver object <code>eigensolver</code>:
    * @code
-   *  // Set a transformation, this one shifts the eigenspectrum by 3.142..
-   *  SLEPcWrappers::TransformationShift::AdditionalData additional_data
-   * (3.142); SLEPcWrappers::TransformationShift shift
-   * (mpi_communicator,additional_data); eigensolver.set_transformation (shift);
+   * // Set a transformation, this one shifts the eigenspectrum by 3.142..
+   * SLEPcWrappers::TransformationShift::AdditionalData
+   *   additional_data(3.142);
+   * SLEPcWrappers::TransformationShift shift(mpi_communicator,additional_data);
+   * eigensolver.set_transformation(shift);
    * @endcode
    * and later calling the <code>solve()</code> function as usual:
    * @code
-   *  SolverControl solver_control (1000, 1e-9);
-   *  SolverArnoldi system (solver_control, mpi_communicator);
-   *  eigensolver.solve (A, B, lambda, x, size_of_spectrum);
+   * SolverControl solver_control (1000, 1e-9);
+   * SolverArnoldi system (solver_control, mpi_communicator);
+   * eigensolver.solve (A, B, lambda, x, size_of_spectrum);
    * @endcode
    *
    * @note These options can also be set at the command line.
index 4b0b3108fc81170ab99513ca8fcac276ef39dfc5..a62ffbabbfe4b4be8c6922e971a98023e4e1c587 100644 (file)
@@ -247,23 +247,24 @@ class Vector;
  * An example may illuminate these issues. In the step-3 tutorial program, let
  * us add a member function as follows to the main class:
  * @code
- *  SolverControl::State
- *  Step3::write_intermediate_solution (const unsigned int    iteration,
- *                                      const double          , //check_value
- *                                      const Vector<double> &current_iterate)
- * const
- *    {
- *      DataOut<2> data_out;
- *      data_out.attach_dof_handler (dof_handler);
- *      data_out.add_data_vector (current_iterate, "solution");
- *      data_out.build_patches ();
- *
- *      std::ofstream output ((std::string("solution-")
- *                             + Utilities::int_to_string(iteration,4) +
- * ".vtu").c_str()); data_out.write_vtu (output);
- *
- *      return SolverControl::success;
- *    }
+ * SolverControl::State
+ * Step3::write_intermediate_solution (
+ *   const unsigned int    iteration,
+ *   const double          , //check_value
+ *   const Vector<double> &current_iterate) const
+ * {
+ *   DataOut<2> data_out;
+ *   data_out.attach_dof_handler (dof_handler);
+ *   data_out.add_data_vector (current_iterate, "solution");
+ *   data_out.build_patches ();
+ *
+ *   std::ofstream output ("solution-"
+ *                         + Utilities::int_to_string(iteration,4)
+ *                         + ".vtu");
+ *   data_out.write_vtu (output);
+ *
+ *   return SolverControl::success;
+ * }
  * @endcode
  * The function satisfies the signature necessary to be a slot for the signal
  * discussed above, with the exception that it is a member function and
index 893e3d294ab38841c4c6aa6153801bf40d6faaaf..e5a1f57833d80096c8f9728506a0d3085fdff715 100644 (file)
@@ -47,22 +47,21 @@ DEAL_II_NAMESPACE_OPEN
  *
  * <h3>Usage</h3> The simplest use of this class is the following:
  * @code
- *                                  // generate a @p SolverControl and
- *                                  // a @p VectorMemory
+ * // generate a @p SolverControl and a @p VectorMemory
  * SolverControl control;
  * VectorMemory<Vector<double> > memory;
- *                                  // Line 3:
- *                                  //
- *                                  // generate a @p SolverSelector that
- *                                  // calls the @p SolverCG
+ *
+ * // Line 3:
+ * // generate a @p SolverSelector that calls the @p SolverCG
  * SolverSelector<Vector<double> >
  *   solver_selector("cg", control, memory);
- *                                  // generate e.g. a @p PreconditionRelaxation
+ *
+ * // generate e.g. a @p PreconditionRelaxation
  * PreconditionRelaxation<SparseMatrix<double>, Vector<double> >
- *   preconditioning(A, &SparseMatrix<double>
- *                   ::template precondition_SSOR<double>,0.8);
- *                                  // call the @p solve function with this
- *                                  // preconditioning as last argument
+ *   preconditioning(
+ *     A, &SparseMatrix<double>::template precondition_SSOR<double>,0.8);
+ *
+ * // call the @p solve function with this preconditioning as last argument
  * solver_selector.solve(A,x,b,preconditioning);
  * @endcode
  * But the full usefulness of the @p SolverSelector class is not clear until
@@ -71,7 +70,8 @@ DEAL_II_NAMESPACE_OPEN
  * @code
  * Parameter_Handler prm;
  * prm.declare_entry ("solver", "none",
- *                    Patterns::Selection(SolverSelector<>::get_solver_names()));
+ *                    Patterns::Selection(
+ *                      SolverSelector<>::get_solver_names()));
  * ...
  * @endcode
  * Assuming that in the users parameter file there exists the line
index 4cefa13004d4330d9f51c30c5057cab090bb34d0..3f07ae3bab9391ac5f57688ab0f70dce8e42d891 100644 (file)
@@ -31,12 +31,14 @@ DEAL_II_NAMESPACE_OPEN
  * The specialization
  * @code
  *   template <>
- *   struct is_serial_vector< VectorType > : std::true_type {};
+ *   struct is_serial_vector<VectorType> : std::true_type
+ *   {};
  * @endcode
  * for a serial vector type, respectively,
  * @code
  *   template <>
- *   struct is_serial_vector< VectorType > : std::false_type {};
+ *   struct is_serial_vector<VectorType> : std::false_type
+ *   {};
  * @endcode
  * for a vector type with support of distributed storage,
  * must be done in a header file of a vector declaration.

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.