* ... // 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
*
* 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
*
* 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());
*
* 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
* 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 ();
*
* 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());
* 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
*
* // 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;
* //... 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");
* // 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);
* 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.
* 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
* {
* 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);
* 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
* ...
*
* 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
* 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<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
*
* 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
* (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.