From: Daniel Arndt Date: Thu, 21 Jun 2018 20:31:35 +0000 (+0200) Subject: Fix comments in @code blocks in numerics headers X-Git-Tag: v9.1.0-rc1~947^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b4341180c4b0589185b40b5c44e4efd61f0e941;p=dealii.git Fix comments in @code blocks in numerics headers --- diff --git a/include/deal.II/numerics/data_postprocessor.h b/include/deal.II/numerics/data_postprocessor.h index ff7df13dd0..897eaf0965 100644 --- a/include/deal.II/numerics/data_postprocessor.h +++ b/include/deal.II/numerics/data_postprocessor.h @@ -130,16 +130,17 @@ namespace DataPostprocessorInputs * ... // overload other necessary member variables * virtual * void - * evaluate_vector_field (const DataPostprocessorInputs::Vector - * &input_data, std::vector > &computed_quantities) const + * evaluate_vector_field( + * const DataPostprocessorInputs::Vector &input_data, + * std::vector > &computed_quantities) const * { - * const typename hp::DoFHandler::cell_iterator - * current_cell = input_data.template get_cell - * >(); const viscosity = look_up_viscosity (current_cell->material_id()); + * const typename hp::DoFHandler::cell_iterator current_cell = + * input_data.template get_cell >(); + * const viscosity = look_up_viscosity (current_cell->material_id()); * * for (unsigned int q=0; q - * &input_data, std::vector > &computed_quantities) - * const + * evaluate_scalar_field( + * const DataPostprocessorInputs::Scalar &input_data, + * std::vector > &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 - * &input_data, std::vector > &computed_quantities) - * const + * evaluate_scalar_field( + * const DataPostprocessorInputs::Scalar &input_data, + * std::vector > &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 - * &input_data, std::vector > &computed_quantities) - * const + * evaluate_vector_field( + * const DataPostprocessorInputs::Vector &input_data, + * std::vector > &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(dim,"displacement"), DataOut::type_dof_data, + * std::vector(dim,"displacement"), + * DataOut::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 - * &input_data, std::vector > &computed_quantities) - * const + * evaluate_vector_field( + * const DataPostprocessorInputs::Vector &input_data, + * std::vector > &computed_quantities) const * { * AssertDimension (input_data.solution_gradients.size(), * computed_quantities.size()); diff --git a/include/deal.II/numerics/derivative_approximation.h b/include/deal.II/numerics/derivative_approximation.h index 93e5884b0e..3cddf60d86 100644 --- a/include/deal.II/numerics/derivative_approximation.h +++ b/include/deal.II/numerics/derivative_approximation.h @@ -76,9 +76,10 @@ DEAL_II_NAMESPACE_OPEN * DoFHandlerType&, const InputVector&, unsigned int, const * std::pair&, Vector&) [with * DerivativeDescription = DerivativeApproximation::Gradient<3>, int dim = 3, - * DoFHandlerType = DoFHandler, InputVector = Vector] The violated - * condition was: determinant(Y) != 0 The name and call sequence of the - * exception was: ExcInsufficientDirections() Additional Information: (none) + * DoFHandlerType = DoFHandler, InputVector = Vector] + * 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 diff --git a/include/deal.II/numerics/fe_field_function.h b/include/deal.II/numerics/fe_field_function.h index dcc06916ce..22efd14fee 100644 --- a/include/deal.II/numerics/fe_field_function.h +++ b/include/deal.II/numerics/fe_field_function.h @@ -92,8 +92,8 @@ namespace Functions * * // Now project it to the second domain * FEFieldFunction 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 solution_3; diff --git a/include/deal.II/numerics/point_value_history.h b/include/deal.II/numerics/point_value_history.h index d208d44020..3e7ed4a103 100644 --- a/include/deal.II/numerics/point_value_history.h +++ b/include/deal.II/numerics/point_value_history.h @@ -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 node_monitor(dof_handler, n_inputs); + * PointValueHistory 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 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); diff --git a/include/deal.II/numerics/solution_transfer.h b/include/deal.II/numerics/solution_transfer.h index 457dd332dd..6473ce88cf 100644 --- a/include/deal.II/numerics/solution_transfer.h +++ b/include/deal.II/numerics/solution_transfer.h @@ -50,41 +50,45 @@ DEAL_II_NAMESPACE_OPEN * use @p SolutionTransfer as follows: * @code * SolutionTransfer 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 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 > solutions_old(n_vectors, Vector (n)); + * std::vector > solutions_old(n_vectors, Vector (n)); * ... - * vector > solutions(n_vectors, Vector (n)); + * std::vector > solutions(n_vectors, Vector (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 > 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 interpolate_solution(dof_handler->n_dofs()); * soltrans.interpolate(solution, interpolated_solution); * @endcode diff --git a/include/deal.II/numerics/time_dependent.h b/include/deal.II/numerics/time_dependent.h index e95a8ffd8d..c77e644863 100644 --- a/include/deal.II/numerics/time_dependent.h +++ b/include/deal.II/numerics/time_dependent.h @@ -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; stepset_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::init_for_refinement, - * std::placeholders::_1), std::bind(&TimeStepBase_Wave::refine_grid, + * std::placeholders::_1), + * std::bind(&TimeStepBase_Wave::refine_grid, * std::placeholders::_1, - * TimeStepBase_Tria::RefinementData (top_threshold, - * bottom_threshold)), + * TimeStepBase_Tria::RefinementData ( + * top_threshold, bottom_threshold)), * TimeDependent::TimeSteppingData (0,1), * TimeDependent::forward); * @endcode @@ -311,41 +311,48 @@ class Triangulation; * const TimeSteppingData ×tepping_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 - * (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; stepwake_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 (timesteps[step])); + * // actually do the work + * loop_function( + * static_cast ( + * 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 * diff --git a/include/deal.II/numerics/vector_tools.h b/include/deal.II/numerics/vector_tools.h index b813a0b49f..5aeb746549 100644 --- a/include/deal.II/numerics/vector_tools.h +++ b/include/deal.II/numerics/vector_tools.h @@ -924,8 +924,11 @@ namespace VectorTools * dof_handler, * constraints, * quadrature_formula, - * [&] (const typename DoFHandler::active_cell_iterator & cell, const - * unsigned int q) -> double { return qp_data.get_data(cell)[q]->density; }, + * [&] (const typename DoFHandler::active_cell_iterator & cell, + * const unsigned int q) -> double + * { + * return qp_data.get_data(cell)[q]->density; + * }, * field); * @endcode * where qp_data 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 { return qp_data(cell,q); }, field); + * [&] (const unsigned int cell, + * const unsigned int q) -> VectorizedArray + * { + * return qp_data(cell,q); + * }, + * field); * @endcode * where qp_data is a an object of type Table<2, * VectorizedArray >, which stores quadrature point data.