]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix comments in @code blocks in numerics headers
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 21 Jun 2018 20:31:35 +0000 (22:31 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 3 Jul 2018 22:39:17 +0000 (00:39 +0200)
include/deal.II/numerics/data_postprocessor.h
include/deal.II/numerics/derivative_approximation.h
include/deal.II/numerics/fe_field_function.h
include/deal.II/numerics/point_value_history.h
include/deal.II/numerics/solution_transfer.h
include/deal.II/numerics/time_dependent.h
include/deal.II/numerics/vector_tools.h

index ff7df13dd0a4e44c3d0d4e2b6bad964deeaea754..897eaf09656e5055d539c74805b3713e597faac6 100644 (file)
@@ -130,16 +130,17 @@ namespace DataPostprocessorInputs
    *       ... // overload other necessary member variables
    *       virtual
    *       void
-   *       evaluate_vector_field (const DataPostprocessorInputs::Vector<dim>
-   * &input_data, std::vector<Vector<double> > &computed_quantities) const
+   *       evaluate_vector_field(
+   *         const DataPostprocessorInputs::Vector<dim> &input_data,
+   *         std::vector<Vector<double> > &computed_quantities) const
    *       {
-   *         const typename hp::DoFHandler<dim>::cell_iterator
-   *           current_cell = input_data.template get_cell<hp::DoFHandler<dim>
-   * >(); const viscosity = look_up_viscosity (current_cell->material_id());
+   *         const typename hp::DoFHandler<dim>::cell_iterator current_cell =
+   *           input_data.template get_cell<hp::DoFHandler<dim> >();
+   *         const viscosity = look_up_viscosity (current_cell->material_id());
    *
    *         for (unsigned int q=0; q<input_data.solution_gradients.size(); ++q)
-   *           computed_quantities[q][0] = (viscosity *
-   * input_data.solution_gradients[q]).norm();
+   *           computed_quantities[q][0] =
+   *             (viscosity * input_data.solution_gradients[q]).norm();
    *       }
    *   };
    * @endcode
@@ -635,9 +636,9 @@ private:
  *
  *   virtual
  *   void
- *   evaluate_scalar_field (const DataPostprocessorInputs::Scalar<dim>
- * &input_data, std::vector<Vector<double> >               &computed_quantities)
- * const
+ *   evaluate_scalar_field(
+ *     const DataPostprocessorInputs::Scalar<dim> &input_data,
+ *     std::vector<Vector<double> >               &computed_quantities) const
  *   {
  *     // ensure that there really are as many output slots
  *     // as there are points at which DataOut provides the
@@ -721,9 +722,9 @@ private:
  *
  *   virtual
  *   void
- *   evaluate_scalar_field (const DataPostprocessorInputs::Scalar<dim>
- * &input_data, std::vector<Vector<double> >               &computed_quantities)
- * const
+ *   evaluate_scalar_field(
+ *     const DataPostprocessorInputs::Scalar<dim> &input_data,
+ *     std::vector<Vector<double> >               &computed_quantities) const
  *   {
  *     AssertDimension (input_data.solution_gradients.size(),
  *                      computed_quantities.size());
@@ -893,9 +894,9 @@ private:
  *
  *     virtual
  *     void
- *     evaluate_vector_field (const DataPostprocessorInputs::Vector<dim>
- * &input_data, std::vector<Vector<double> >               &computed_quantities)
- * const
+ *     evaluate_vector_field(
+ *       const DataPostprocessorInputs::Vector<dim> &input_data,
+ *       std::vector<Vector<double> >               &computed_quantities) const
  *     {
  *       // ensure that there really are as many output slots
  *       // as there are points at which DataOut provides the
@@ -943,7 +944,8 @@ private:
  *     data_component_interpretation
  *     (dim, DataComponentInterpretation::component_is_part_of_vector);
  *     data_out.add_data_vector (solution,
- * std::vector<std::string>(dim,"displacement"), DataOut<dim>::type_dof_data,
+ *                               std::vector<std::string>(dim,"displacement"),
+ *                               DataOut<dim>::type_dof_data,
  *                               data_component_interpretation);
  *     data_out.add_data_vector (solution, grad_u);
  *     data_out.build_patches ();
@@ -982,9 +984,9 @@ private:
  *
  *     virtual
  *     void
- *     evaluate_vector_field (const DataPostprocessorInputs::Vector<dim>
- * &input_data, std::vector<Vector<double> >               &computed_quantities)
- * const
+ *     evaluate_vector_field(
+ *       const DataPostprocessorInputs::Vector<dim> &input_data,
+ *       std::vector<Vector<double> >               &computed_quantities) const
  *     {
  *       AssertDimension (input_data.solution_gradients.size(),
  *                        computed_quantities.size());
index 93e5884b0ee8f2a451309a7f99f8f7b20232b752..3cddf60d86cf1198200a43e18aa804a1a21525f1 100644 (file)
@@ -76,9 +76,10 @@ DEAL_II_NAMESPACE_OPEN
  * DoFHandlerType<dim,spacedim>&, const InputVector&, unsigned int, const
  *  std::pair<unsigned int, unsigned int>&, Vector<float>&) [with
  * DerivativeDescription = DerivativeApproximation::Gradient<3>, int dim = 3,
- * DoFHandlerType = DoFHandler, InputVector = Vector<double>] The violated
- * condition was: determinant(Y) != 0 The name and call sequence of the
- * exception was: ExcInsufficientDirections() Additional Information: (none)
+ * DoFHandlerType = DoFHandler, InputVector = Vector<double>]
+ * The violated condition was: determinant(Y) != 0
+ * The name and call sequence of the exception was: ExcInsufficientDirections()
+ * Additional Information: (none)
  * --------------------------------------------------------
  * @endcode
  * As can easily be verified, this can only happen on very coarse grids, when
index dcc06916ce889d1dbafd017a18b58c0c55089e72..22efd14feecf703469ec5e6c2494778ee3a5a60f 100644 (file)
@@ -92,8 +92,8 @@ namespace Functions
    *
    * // Now project it to the second domain
    * FEFieldFunction<dim> fe_function_1 (dh_1, solution_1);
-   * VectorTools::project (dh_2, constraints_2, quad, fe_function_1,
-   * solution_2);
+   * VectorTools::project (dh_2, constraints_2, quad,
+   *                       fe_function_1, solution_2);
    *
    * // Or interpolate it...
    * Vector<double> solution_3;
index d208d44020ef864a8a8f4413988c3c4e665a1a6f..3e7ed4a103ad1f2535881c96215f4c83d20afddb 100644 (file)
@@ -177,9 +177,11 @@ namespace internal
  * //... code to setup Triangulation, perform any refinement necessary
  * // and setup DoFHandler, sizing solution Vectors etc
  *
+ * // just one independent value, which happens to be an input
+ * unsigned int n_inputs = 1;
+ *
  * // call the constructor
- * unsigned int n_inputs = 1; // just one independent value, which happens to be
- * an input PointValueHistory<dim> node_monitor(dof_handler, n_inputs);
+ * PointValueHistory<dim> node_monitor(dof_handler, n_inputs);
  *
  * // setup fields and points required
  * node_monitor.add_field_name("Solution");
@@ -449,8 +451,9 @@ public:
    * // Call the mark_locations method to get the vector with indices flagged
    * Vector<double> support_point_locations = node_monitor.mark_locations();
    *
-   * // Add the vector to the data_out object and write out a file in the usual
-   * way data_out.add_data_vector(support_point_locations, "Monitor_Locations");
+   * // Add the vector to the data_out object and
+   * // write out a file in the usual way
+   * data_out.add_data_vector(support_point_locations, "Monitor_Locations");
    * data_out.build_patches(2);
    * std::ofstream output("locations.gpl");
    * data_out.write_gnuplot(output);
index 457dd332dd33e767731a423f3f3e5ddc2e8504bd..6473ce88cffbbd7b24c968113351ab4d433905a2 100644 (file)
@@ -50,41 +50,45 @@ DEAL_II_NAMESPACE_OPEN
  * use @p SolutionTransfer as follows:
  * @code
  * SolutionTransfer<dim, double> soltrans(*dof_handler);
- *                                     // flag some cells for refinement, e.g.
- * GridRefinement::refine_and_coarsen_fixed_fraction(
- *   *tria, error_indicators, 0.3, 0);
- *                                     // prepare the triangulation
- *                                     // for refinement,
+ *
+ * // flag some cells for refinement, e.g.
+ * GridRefinement::refine_and_coarsen_fixed_fraction(*tria,
+ *                                                   error_indicators,
+ *                                                   0.3,
+ *                                                   0);
+ * // prepare the triangulation for refinement,
  * tria->prepare_coarsening_and_refinement();
- *                                     // tell the SolutionTransfer object
- *                                     // that we intend to do pure refinement,
+ *
+ * // tell the SolutionTransfer object that we intend to do pure refinement,
  * soltrans.prepare_for_pure_refinement();
- *                                     // actually execute the refinement,
+ *
+ * // actually execute the refinement,
  * tria->execute_coarsening_and_refinement();
- *                                     // and redistribute dofs.
+ *
+ * // and redistribute dofs.
  * dof_handler->distribute_dofs (fe);
  * @endcode
  *
  * Then to proceed do
  * @code
- *                                     // take a copy of the solution vector
+ * // take a copy of the solution vector
  * Vector<double> solution_old(solution);
- *                                     // resize solution vector to the correct
- *                                     // size, as the @p refine_interpolate
- *                                     // function requires the vectors to be
- *                                     // of right sizes
+ *
+ * // resize solution vector to the correct size, as the @p refine_interpolate
+ * // function requires the vectors to be of right sizes
  * solution.reinit(dof_handler->n_dofs());
- *                                     // and finally interpolate
+ *
+ * // and finally interpolate
  * soltrans.refine_interpolate(solution_old, solution);
  * @endcode
  *
  * Although the @p refine_interpolate functions are allowed to be called
  * multiple times, e.g. for interpolating several solution vectors, there is
- * following possibility of interpolating several functions simultaneously.
+ * the following possibility of interpolating several functions simultaneously.
  * @code
- * vector<Vector<double> > solutions_old(n_vectors, Vector<double> (n));
+ * std::vector<Vector<double> > solutions_old(n_vectors, Vector<double> (n));
  * ...
- * vector<Vector<double> > solutions(n_vectors, Vector<double> (n));
+ * std::vector<Vector<double> > solutions(n_vectors, Vector<double> (n));
  * soltrans.refine_interpolate(solutions_old, solutions);
  * @endcode
  * This is used in several of the tutorial programs, for example step-31.
@@ -93,22 +97,27 @@ DEAL_II_NAMESPACE_OPEN
  * SolutionTransfer as follows:
  * @code
  * SolutionTransfer<dim, Vector<double> > soltrans(*dof_handler);
- *                                     // flag some cells for refinement
- *                                     // and coarsening, e.g.
- * GridRefinement::refine_and_coarsen_fixed_fraction(
- *   *tria, error_indicators, 0.3, 0.05);
- *                                     // prepare the triangulation,
+ *
+ * // flag some cells for refinement and coarsening, e.g.
+ * GridRefinement::refine_and_coarsen_fixed_fraction(*tria,
+ *                                                   error_indicators,
+ *                                                   0.3,
+ *                                                   0.05);
+ *
+ * // prepare the triangulation,
  * tria->prepare_coarsening_and_refinement();
- *                                     // prepare the SolutionTransfer object
- *                                     // for coarsening and refinement and give
- *                                     // the solution vector that we intend to
- *                                     // interpolate later,
+ *
+ * // prepare the SolutionTransfer object for coarsening and refinement and give
+ * // the solution vector that we intend to interpolate later,
  * soltrans.prepare_for_coarsening_and_refinement(solution);
- *                                     // actually execute the refinement,
+ *
+ * // actually execute the refinement,
  * tria->execute_coarsening_and_refinement ();
- *                                     // redistribute dofs,
+ *
+ * // redistribute dofs,
  * dof_handler->distribute_dofs (fe);
- *                                     // and interpolate the solution
+ *
+ * // and interpolate the solution
  * Vector<double> interpolate_solution(dof_handler->n_dofs());
  * soltrans.interpolate(solution, interpolated_solution);
  * @endcode
index e95a8ffd8d7242baa4c5e6598a550d8dc0130751..c77e644863fd6ab275dcd428325e3ccc6ac436ae 100644 (file)
@@ -233,13 +233,9 @@ class Triangulation;
  *   {
  *     sweep_no = s;
  *
- *                                 // reset the number each
- *                                 // time step has, since some time
- *                                 // steps might have been added since
- *                                 // the last time we visited them
- *                                 //
- *                                 // also set the sweep we will
- *                                 // process in the sequel
+ *    // reset the number each time step has, since some time steps might have
+ *    // been added since the last time we visited them.
+ *    // also set the sweep we will process in the sequel
  *     for (unsigned int step=0; step<timesteps.size(); ++step)
  *       {
  *         timesteps[step]->set_timestep_no (step);
@@ -255,8 +251,11 @@ class Triangulation;
  *   TimeDependent::solve_primal_problem ()
  *   {
  *     do_loop (std::bind(&TimeStepBase::init_for_primal_problem,
- * std::placeholders::_1), std::bind(&TimeStepBase::solve_primal_problem,
- * std::placeholders::_1), timestepping_data_primal, forward);
+ *                        std::placeholders::_1),
+ *              std::bind(&TimeStepBase::solve_primal_problem,
+ *                        std::placeholders::_1),
+ *              timestepping_data_primal,
+ *              forward);
  *   };
  * @endcode
  * The latter function shows rather clear how most of the loops are invoked
@@ -285,10 +284,11 @@ class Triangulation;
  *   ...
  *
  *   do_loop (std::bind(&TimeStepBase_Tria<dim>::init_for_refinement,
- * std::placeholders::_1), std::bind(&TimeStepBase_Wave<dim>::refine_grid,
+ *                      std::placeholders::_1),
+ *            std::bind(&TimeStepBase_Wave<dim>::refine_grid,
  *                      std::placeholders::_1,
- *                      TimeStepBase_Tria<dim>::RefinementData (top_threshold,
- *                                                              bottom_threshold)),
+ *                      TimeStepBase_Tria<dim>::RefinementData (
+ *                        top_threshold, bottom_threshold)),
  *            TimeDependent::TimeSteppingData (0,1),
  *            TimeDependent::forward);
  * @endcode
@@ -311,41 +311,48 @@ class Triangulation;
  *                           const TimeSteppingData &timestepping_data,
  *                           const Direction         direction)
  *   {
- *                                 // initialize the time steps for
- *                                 // a round of this loop
+ *     // initialize the time steps for a round of this loop
  *     for (unsigned int step=0; step<n_timesteps; ++step)
  *       init_function (static_cast<typename InitFunctionObject::argument_type>
- *                 (timesteps[step]));
+ *                        (timesteps[step]));
  *
- *                                 // wake up the first few time levels
+ *     // wake up the first few time levels
  *     for (int step=-timestepping_data.look_ahead; step<0; ++step)
- *       for (int look_ahead=0; look_ahead<=timestepping_data.look_ahead;
- * ++look_ahead) timesteps[step+look_ahead]->wake_up(look_ahead);
+ *       for (int look_ahead=0;
+ *            look_ahead<=timestepping_data.look_ahead;
+ *            ++look_ahead)
+ *         timesteps[step+look_ahead]->wake_up(look_ahead);
  *
  *
  *     for (unsigned int step=0; step<n_timesteps; ++step)
  *       {
- *                                     // first thing: wake up the
- *                                     // timesteps ahead as necessary
+ *         // first thing: wake up the timesteps ahead as necessary
  *         for (unsigned int look_ahead=0;
- *         look_ahead<=timestepping_data.look_ahead; ++look_ahead)
- *      timesteps[step+look_ahead]->wake_up(look_ahead);
+ *              look_ahead<=timestepping_data.look_ahead;
+ *              ++look_ahead)
+ *           timesteps[step+look_ahead]->wake_up(look_ahead);
  *
  *
- *                                     // actually do the work
- *         loop_function (static_cast<typename
- * LoopFunctionObject::argument_type> (timesteps[step]));
+ *         // actually do the work
+ *         loop_function(
+ *           static_cast<typename LoopFunctionObject::argument_type> (
+ *             timesteps[step]));
  *
- *                                     // let the timesteps behind sleep
+ *         // let the timesteps behind sleep
  *         for (unsigned int look_back=0;
- * look_back<=timestepping_data.look_back; ++look_back)
- *      timesteps[step-look_back]->sleep(look_back);
+ *              look_back<=timestepping_data.look_back;
+ *              ++look_back)
+ *           timesteps[step-look_back]->sleep(look_back);
  *       };
  *
- *                                 // make the last few timesteps sleep
- *     for (int step=n_timesteps; n_timesteps+timestepping_data.look_back;
- * ++step) for (int look_back=0; look_back<=timestepping_data.look_back;
- * ++look_back) timesteps[step-look_back]->sleep(look_back);
+ *     // make the last few timesteps sleep
+ *     for (int step=n_timesteps;
+ *          step<=n_timesteps+timestepping_data.look_back;
+ *          ++step)
+ *       for (int look_back=0;
+ *            look_back<=timestepping_data.look_back;
+ *            ++look_back)
+ *         timesteps[step-look_back]->sleep(look_back);
  *   };
  * @endcode
  *
index b813a0b49f78edc44705bceb961383bc960e3d62..5aeb746549241fb7ac6d21f9bf16143b6e92bf75 100644 (file)
@@ -924,8 +924,11 @@ namespace VectorTools
    *  dof_handler,
    *  constraints,
    *  quadrature_formula,
-   *  [&] (const typename DoFHandler<dim>::active_cell_iterator & cell, const
-   * unsigned int q) -> double { return qp_data.get_data(cell)[q]->density; },
+   *  [&] (const typename DoFHandler<dim>::active_cell_iterator & cell,
+   *       const unsigned int q) -> double
+   *  {
+   *    return qp_data.get_data(cell)[q]->density;
+   *  },
    *  field);
    * @endcode
    * where <code>qp_data</code> is a CellDataStorage object, which stores
@@ -955,8 +958,12 @@ namespace VectorTools
    * (matrix_free_data,
    *  constraints,
    *  3,
-   *  [&] (const unsigned int cell, const unsigned int q) ->
-   * VectorizedArray<double> { return qp_data(cell,q); }, field);
+   *  [&] (const unsigned int cell,
+   *       const unsigned int q) -> VectorizedArray<double>
+   *  {
+   *    return qp_data(cell,q);
+   *  },
+   *  field);
    * @endcode
    * where <code>qp_data</code> is a an object of type Table<2,
    * VectorizedArray<double> >, which stores quadrature point data.

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.