From: wolf Date: Thu, 9 Jan 2003 20:32:47 +0000 (+0000) Subject: Relieve us from unnecessary semicolons. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9454198a40df6a9178284bead510dcfe55034366;p=dealii-svn.git Relieve us from unnecessary semicolons. git-svn-id: https://svn.dealii.org/trunk@6903 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-1/step-1.cc b/deal.II/examples/step-1/step-1.cc index 02a9dc1bd1..8d2f18886b 100644 --- a/deal.II/examples/step-1/step-1.cc +++ b/deal.II/examples/step-1/step-1.cc @@ -85,7 +85,7 @@ void first_grid () std::ofstream out ("grid-1.eps"); GridOut grid_out; grid_out.write_eps (triangulation, out); -}; +} @@ -229,7 +229,7 @@ void second_grid () // default object, over which the // triangulation has full control. triangulation.set_boundary (0); -}; +} @@ -240,5 +240,5 @@ int main () { first_grid (); second_grid (); -}; +} diff --git a/deal.II/examples/step-10/step-10.cc b/deal.II/examples/step-10/step-10.cc index 2259a16a70..892e1823d3 100644 --- a/deal.II/examples/step-10/step-10.cc +++ b/deal.II/examples/step-10/step-10.cc @@ -527,7 +527,7 @@ void compute_pi_by_area () std::cout << std::endl; }; -}; +} // The following, second function also @@ -632,7 +632,7 @@ void compute_pi_by_perimeter () std::cout << std::endl; }; -}; +} // The following main function just @@ -648,4 +648,4 @@ int main () compute_pi_by_perimeter<2> (); return 0; -}; +} diff --git a/deal.II/examples/step-11/step-11.cc b/deal.II/examples/step-11/step-11.cc index c862b33d14..308228b075 100644 --- a/deal.II/examples/step-11/step-11.cc +++ b/deal.II/examples/step-11/step-11.cc @@ -129,7 +129,7 @@ LaplaceProblem::LaplaceProblem (const unsigned int mapping_degree) : << std::endl << "============================" << std::endl; -}; +} @@ -333,7 +333,7 @@ void LaplaceProblem::setup_system () // ``copy_from'' call. sparsity_pattern.copy_from (csp); system_matrix.reinit (sparsity_pattern); -}; +} @@ -587,7 +587,7 @@ void LaplaceProblem::assemble_and_solve () output_table.add_value ("cells", triangulation.n_active_cells()); output_table.add_value ("|u|_1", norm); output_table.add_value ("error", std::fabs(norm-std::sqrt(3.14159265358/2))); -}; +} @@ -607,7 +607,7 @@ void LaplaceProblem::solve () cg.solve (system_matrix, solution, system_rhs, preconditioner); -}; +} @@ -659,7 +659,7 @@ void LaplaceProblem::run () output_table.set_precision("error", 6); output_table.write_text (std::cout); std::cout << std::endl; -}; +} @@ -715,4 +715,4 @@ int main () }; return 0; -}; +} diff --git a/deal.II/examples/step-12/step-12.cc b/deal.II/examples/step-12/step-12.cc index 4b70ed4488..d51c232a6b 100644 --- a/deal.II/examples/step-12/step-12.cc +++ b/deal.II/examples/step-12/step-12.cc @@ -257,7 +257,7 @@ DGTransportEquation::DGTransportEquation () beta_function (), rhs_function (), boundary_function () -{}; +{} // @sect4{Function: assemble_cell_term} @@ -640,7 +640,7 @@ template DGMethod::~DGMethod () { dof_handler.clear (); -}; +} template @@ -677,7 +677,7 @@ void DGMethod::setup_system () solution1.reinit (dof_handler.n_dofs()); solution2.reinit (dof_handler.n_dofs()); right_hand_side.reinit (dof_handler.n_dofs()); -}; +} // @sect4{Function: assemble_system1} @@ -1182,7 +1182,7 @@ void DGMethod::assemble_system1 () for (unsigned int i=0; i::assemble_system2 () for (unsigned int i=0; i::solve (Vector &solution) // ready to start the linear solver. solver.solve (system_matrix, solution, right_hand_side, preconditioner); -}; +} // We refine the grid according to a @@ -1584,7 +1584,7 @@ void DGMethod::output_results (const unsigned int cycle) const data_out.build_patches (); data_out.write_gnuplot(gnuplot_output); -}; +} // The following ``run'' function is @@ -1715,6 +1715,6 @@ int main () }; return 0; -}; +} diff --git a/deal.II/examples/step-13/step-13.cc b/deal.II/examples/step-13/step-13.cc index 4374e1e3d1..4d03c9f8d3 100644 --- a/deal.II/examples/step-13/step-13.cc +++ b/deal.II/examples/step-13/step-13.cc @@ -196,7 +196,7 @@ namespace Evaluation // straightforward: template EvaluationBase::~EvaluationBase () - {}; + {} @@ -205,7 +205,7 @@ namespace Evaluation EvaluationBase::set_refinement_cycle (const unsigned int step) { refinement_cycle = step; - }; + } // @sect4{Point evaluation} @@ -290,7 +290,7 @@ namespace Evaluation : evaluation_point (evaluation_point), results_table (results_table) - {}; + {} @@ -507,7 +507,7 @@ namespace Evaluation // into the table of results: results_table.add_value ("DoFs", dof_handler.n_dofs()); results_table.add_value ("u(x_0)", point_value); - }; + } @@ -639,7 +639,7 @@ namespace Evaluation : output_name_base (output_name_base), output_format (output_format) - {}; + {} // After the description above, the @@ -706,7 +706,7 @@ namespace Evaluation #endif data_out.write (out, output_format); - }; + } @@ -720,7 +720,7 @@ namespace Evaluation // example, that much shall be // sufficient, so we close the // namespace. -}; +} // @sect3{The Laplace solver classes} @@ -888,12 +888,12 @@ namespace LaplaceSolver Base::Base (Triangulation &coarse_grid) : triangulation (&coarse_grid) - {}; + {} template Base::~Base () - {}; + {} // @sect4{A general solver class} @@ -1093,7 +1093,7 @@ namespace LaplaceSolver quadrature (&quadrature), dof_handler (triangulation), boundary_values (&boundary_values) - {}; + {} // The destructor is simple, it @@ -1104,7 +1104,7 @@ namespace LaplaceSolver Solver::~Solver () { dof_handler.clear (); - }; + } // The next function is the one @@ -1130,7 +1130,7 @@ namespace LaplaceSolver LinearSystem linear_system (dof_handler); assemble_linear_system (linear_system); linear_system.solve (solution); - }; + } // As stated above, the @@ -1147,7 +1147,7 @@ namespace LaplaceSolver postprocess (const Evaluation::EvaluationBase &postprocessor) const { postprocessor (dof_handler, solution); - }; + } // The ``n_dofs'' function should @@ -1157,7 +1157,7 @@ namespace LaplaceSolver Solver::n_dofs () const { return dof_handler.n_dofs(); - }; + } // The following function assembles @@ -1258,7 +1258,7 @@ namespace LaplaceSolver solution, linear_system.rhs); - }; + } // The second of this pair of @@ -1311,7 +1311,7 @@ namespace LaplaceSolver cell_matrix(i,j)); mutex.release (); }; - }; + } // Now for the functions that @@ -1408,7 +1408,7 @@ namespace LaplaceSolver sparsity_pattern.compress(); matrix.reinit (sparsity_pattern); rhs.reinit (dof_handler.n_dofs()); - }; + } @@ -1433,7 +1433,7 @@ namespace LaplaceSolver cg.solve (matrix, solution, rhs, preconditioner); hanging_node_constraints.distribute (solution); - }; + } @@ -1503,7 +1503,7 @@ namespace LaplaceSolver Solver (triangulation, fe, quadrature, boundary_values), rhs_function (&rhs_function) - {}; + {} @@ -1549,7 +1549,7 @@ namespace LaplaceSolver for (unsigned int i=0; i (coarse_grid), PrimalSolver (coarse_grid, fe, quadrature, rhs_function, boundary_values) - {}; + {} @@ -1617,7 +1617,7 @@ namespace LaplaceSolver RefinementGlobal::refine_grid () { this->triangulation->refine_global (1); - }; + } // @sect4{Local refinement by the Kelly error indicator} @@ -1667,7 +1667,7 @@ namespace LaplaceSolver Base (coarse_grid), PrimalSolver (coarse_grid, fe, quadrature, rhs_function, boundary_values) - {}; + {} @@ -1685,9 +1685,9 @@ namespace LaplaceSolver estimated_error_per_cell, 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); - }; + } -}; +} @@ -1749,7 +1749,7 @@ Solution::value (const Point &p, q += std::sin(10*p(i)+5*p(0)*p(0)); const double exponential = std::exp(q); return exponential; -}; +} @@ -1787,7 +1787,7 @@ RightHandSide::value (const Point &p, t1 = t1*t1; return -u*(t1+t2+t3); -}; +} @@ -1873,7 +1873,7 @@ run_simulation (LaplaceSolver::Base &solver, // Finally end the line in which we // displayed status reports: std::cout << std::endl; -}; +} @@ -1978,7 +1978,7 @@ void solve_problem (const std::string &solver_name) // And one blank line after all // results: std::cout << std::endl; -}; +} @@ -2024,4 +2024,4 @@ int main () }; return 0; -}; +} diff --git a/deal.II/examples/step-14/step-14.cc b/deal.II/examples/step-14/step-14.cc index 0f06f9dbb2..cc530cab63 100644 --- a/deal.II/examples/step-14/step-14.cc +++ b/deal.II/examples/step-14/step-14.cc @@ -88,7 +88,7 @@ namespace Evaluation template EvaluationBase::~EvaluationBase () - {}; + {} @@ -97,7 +97,7 @@ namespace Evaluation EvaluationBase::set_refinement_cycle (const unsigned int step) { refinement_cycle = step; - }; + } // @sect4{The PointValueEvaluation class} @@ -124,7 +124,7 @@ namespace Evaluation PointValueEvaluation (const Point &evaluation_point) : evaluation_point (evaluation_point) - {}; + {} @@ -159,7 +159,7 @@ namespace Evaluation std::cout << " Point value=" << point_value << std::endl; - }; + } // @sect4{The PointXDerivativeEvaluation class} @@ -208,7 +208,7 @@ namespace Evaluation PointXDerivativeEvaluation (const Point &evaluation_point) : evaluation_point (evaluation_point) - {}; + {} // The more interesting things @@ -369,7 +369,7 @@ namespace Evaluation point_derivative /= evaluation_point_hits; std::cout << " Point x-derivative=" << point_derivative << std::endl; - }; + } @@ -416,7 +416,7 @@ namespace Evaluation GridOutput (const std::string &output_name_base) : output_name_base (output_name_base) - {}; + {} template @@ -440,8 +440,8 @@ namespace Evaluation #endif GridOut().write_eps (dof_handler.get_tria(), out); - }; -}; + } +} // @sect3{The Laplace solver classes} @@ -506,12 +506,12 @@ namespace LaplaceSolver Base::Base (Triangulation &coarse_grid) : triangulation (&coarse_grid) - {}; + {} template Base::~Base () - {}; + {} @@ -520,7 +520,7 @@ namespace LaplaceSolver Base::set_refinement_cycle (const unsigned int cycle) { refinement_cycle = cycle; - }; + } // @sect4{The Laplace Solver class} @@ -600,14 +600,14 @@ namespace LaplaceSolver face_quadrature (&face_quadrature), dof_handler (triangulation), boundary_values (&boundary_values) - {}; + {} template Solver::~Solver () { dof_handler.clear (); - }; + } template @@ -620,7 +620,7 @@ namespace LaplaceSolver LinearSystem linear_system (dof_handler); assemble_linear_system (linear_system); linear_system.solve (solution); - }; + } template @@ -629,7 +629,7 @@ namespace LaplaceSolver postprocess (const Evaluation::EvaluationBase &postprocessor) const { postprocessor (dof_handler, solution); - }; + } template @@ -637,7 +637,7 @@ namespace LaplaceSolver Solver::n_dofs () const { return dof_handler.n_dofs(); - }; + } template @@ -682,7 +682,7 @@ namespace LaplaceSolver linear_system.matrix, solution, linear_system.rhs); - }; + } template @@ -727,7 +727,7 @@ namespace LaplaceSolver cell_matrix(i,j)); mutex.release (); }; - }; + } template @@ -758,7 +758,7 @@ namespace LaplaceSolver sparsity_pattern.compress(); matrix.reinit (sparsity_pattern); rhs.reinit (dof_handler.n_dofs()); - }; + } @@ -776,7 +776,7 @@ namespace LaplaceSolver cg.solve (matrix, solution, rhs, preconditioner); hanging_node_constraints.distribute (solution); - }; + } @@ -897,7 +897,7 @@ namespace LaplaceSolver quadrature, face_quadrature, boundary_values), rhs_function (&rhs_function) - {}; + {} template @@ -905,7 +905,7 @@ namespace LaplaceSolver PrimalSolver::solve_problem () { Solver::solve_problem (); - }; + } @@ -914,7 +914,7 @@ namespace LaplaceSolver PrimalSolver::n_dofs() const { return Solver::n_dofs(); - }; + } template @@ -923,7 +923,7 @@ namespace LaplaceSolver postprocess (const Evaluation::EvaluationBase &postprocessor) const { Solver::postprocess(postprocessor); - }; + } template @@ -951,7 +951,7 @@ namespace LaplaceSolver #endif data_out.write (out, DataOut::gnuplot); - }; + } @@ -994,7 +994,7 @@ namespace LaplaceSolver for (unsigned int i=0; i (coarse_grid, fe, quadrature, face_quadrature, rhs_function, boundary_values) - {}; + {} @@ -1041,7 +1041,7 @@ namespace LaplaceSolver RefinementGlobal::refine_grid () { this->triangulation->refine_global (1); - }; + } @@ -1074,7 +1074,7 @@ namespace LaplaceSolver PrimalSolver (coarse_grid, fe, quadrature, face_quadrature, rhs_function, boundary_values) - {}; + {} @@ -1092,7 +1092,7 @@ namespace LaplaceSolver estimated_error_per_cell, 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); - }; + } @@ -1155,7 +1155,7 @@ namespace LaplaceSolver face_quadrature, rhs_function, boundary_values), weighting_function (&weighting_function) - {}; + {} @@ -1195,9 +1195,9 @@ namespace LaplaceSolver estimated_error, 0.3, 0.03); this->triangulation->execute_coarsening_and_refinement (); - }; + } -}; +} // @sect3{Equation data} @@ -1404,7 +1404,7 @@ namespace Data SetUp::get_boundary_values () const { return boundary_values; - }; + } template @@ -1412,7 +1412,7 @@ namespace Data SetUp::get_right_hand_side () const { return right_hand_side; - }; + } template @@ -1421,7 +1421,7 @@ namespace Data create_coarse_grid (Triangulation &coarse_grid) const { Traits::create_coarse_grid (coarse_grid); - }; + } // @sect4{The CurvedRidges class} @@ -1471,7 +1471,7 @@ namespace Data q += std::sin(10*p(i)+5*p(0)*p(0)); const double exponential = std::exp(q); return exponential; - }; + } @@ -1498,7 +1498,7 @@ namespace Data t1 = t1*t1; return -u*(t1+t2+t3); - }; + } template @@ -1508,7 +1508,7 @@ namespace Data { GridGenerator::hyper_cube (coarse_grid, -1, 1); coarse_grid.refine_global (2); - }; + } // @sect4{The Exercise_2_3 class} @@ -1720,8 +1720,8 @@ namespace Data // this example is a grid point, // we refine once globally: coarse_grid.refine_global (1); - }; -}; + } +} // @sect4{Discussion} // @@ -1896,7 +1896,7 @@ namespace DualFunctional PointValueEvaluation (const Point &evaluation_point) : evaluation_point (evaluation_point) - {}; + {} // As for doing the main purpose of @@ -1966,7 +1966,7 @@ namespace DualFunctional // point, so raise an exception // unconditionally: AssertThrow (false, ExcEvaluationPointNotFound(evaluation_point)); - }; + } // @sect4{The PointValueEvaluation class} @@ -2005,7 +2005,7 @@ namespace DualFunctional PointXDerivativeEvaluation (const Point &evaluation_point) : evaluation_point (evaluation_point) - {}; + {} // What is interesting is the @@ -2143,10 +2143,10 @@ namespace DualFunctional // measure of the volume over // which we have integrated: rhs.scale (1./total_volume); - }; + } -}; +} // @sect3{Extending the LaplaceSolver namespace} @@ -2240,7 +2240,7 @@ namespace LaplaceSolver quadrature, face_quadrature, boundary_values), dual_functional (&dual_functional) - {}; + {} template @@ -2248,7 +2248,7 @@ namespace LaplaceSolver DualSolver::solve_problem () { Solver::solve_problem (); - }; + } @@ -2257,7 +2257,7 @@ namespace LaplaceSolver DualSolver::n_dofs() const { return Solver::n_dofs(); - }; + } template @@ -2266,7 +2266,7 @@ namespace LaplaceSolver postprocess (const Evaluation::EvaluationBase &postprocessor) const { Solver::postprocess(postprocessor); - }; + } @@ -2276,7 +2276,7 @@ namespace LaplaceSolver assemble_rhs (Vector &rhs) const { dual_functional->assemble_rhs (this->dof_handler, rhs); - }; + } // @sect4{The WeightedResidual class} @@ -2584,7 +2584,7 @@ namespace LaplaceSolver rhs_values.resize(n_q_points); dual_weights.resize(n_q_points); cell_grad_grads.resize(n_q_points); - }; + } @@ -2613,7 +2613,7 @@ namespace LaplaceSolver dual_weights.resize(n_face_q_points); cell_grads.resize(n_face_q_points); neighbor_grads.resize(n_face_q_points); - }; + } @@ -2636,7 +2636,7 @@ namespace LaplaceSolver DualSolver (coarse_grid, dual_fe, quadrature, face_quadrature, dual_functional) - {}; + {} // The next five functions are @@ -2660,7 +2660,7 @@ namespace LaplaceSolver Threads::encapsulate (&WeightedResidual<2>::solve_dual_problem) .collect_args (this)); thread_manager.wait (); - }; + } template @@ -2668,14 +2668,14 @@ namespace LaplaceSolver WeightedResidual::solve_primal_problem () { PrimalSolver::solve_problem (); - }; + } template void WeightedResidual::solve_dual_problem () { DualSolver::solve_problem (); - }; + } template @@ -2684,7 +2684,7 @@ namespace LaplaceSolver postprocess (const Evaluation::EvaluationBase &postprocessor) const { PrimalSolver::postprocess (postprocessor); - }; + } template @@ -2692,7 +2692,7 @@ namespace LaplaceSolver WeightedResidual::n_dofs () const { return PrimalSolver::n_dofs(); - }; + } @@ -2738,7 +2738,7 @@ namespace LaplaceSolver error_indicators, 0.8, 0.02); this->triangulation->execute_coarsening_and_refinement (); - }; + } // Since we want to output both the @@ -2874,7 +2874,7 @@ namespace LaplaceSolver #endif data_out.write (out, DataOut::gnuplot); - }; + } // @sect3{Estimating errors} @@ -3076,7 +3076,7 @@ namespace LaplaceSolver << std::accumulate (error_indicators.begin(), error_indicators.end(), 0.) << std::endl; - }; + } // @sect4{Estimating on a subset of cells} @@ -3297,7 +3297,7 @@ namespace LaplaceSolver if (cell == dual_solver.dof_handler.end()) break; }; - }; + } // @sect4{Computing cell term error contributions} @@ -3343,7 +3343,7 @@ namespace LaplaceSolver cell_data.dual_weights[p] * cell_data.fe_values.JxW (p)); error_indicators(cell_index) += sum; - }; + } // @sect4{Computing edge term error contributions - 1} @@ -3482,7 +3482,7 @@ namespace LaplaceSolver // sum up the contributions for // each cell individually. face_integrals[cell->face(face_no)] = face_integral; - }; + } // @sect4{Computing edge term error contributions - 2} @@ -3639,9 +3639,9 @@ namespace LaplaceSolver // Finally store the value with // the parent face. face_integrals[face] = sum; - }; + } -}; +} // @sect3{A simulation framework} @@ -3823,7 +3823,7 @@ Framework::ProblemDescription::ProblemDescription () dual_fe_degree (2), refinement_criterion (dual_weighted_error_estimator), max_degrees_of_freedom (20000) -{}; +{} @@ -3954,7 +3954,7 @@ void Framework::run (const ProblemDescription &descriptor) std::cout << std::endl; delete solver; solver = 0; -}; +} @@ -4101,4 +4101,4 @@ int main () }; return 0; -}; +} diff --git a/deal.II/examples/step-15/step-15.cc b/deal.II/examples/step-15/step-15.cc index 893a5dab3a..cdc12ba6b9 100644 --- a/deal.II/examples/step-15/step-15.cc +++ b/deal.II/examples/step-15/step-15.cc @@ -104,7 +104,7 @@ double InitializationValues::value (const Point<1> &p, const unsigned int) const { return std::pow(p(0), 1./3.); -}; +} @@ -112,14 +112,14 @@ template MinimizationProblem::MinimizationProblem () : fe (1), dof_handler (triangulation) -{}; +{} template MinimizationProblem::~MinimizationProblem () { dof_handler.clear (); -}; +} @@ -139,7 +139,7 @@ void MinimizationProblem::setup_system () hanging_node_constraints.condense (sparsity_pattern); sparsity_pattern.compress(); -}; +} template @@ -151,7 +151,7 @@ double gradient_power (const Tensor<1,dim> &v, for (unsigned int k=0; k @@ -290,7 +290,7 @@ void MinimizationProblem::assemble_newton_step (const bool p) newton_update, newton_residual); // std::cout << " res=" << newton_residual.l2_norm() << std::endl; -}; +} @@ -318,7 +318,7 @@ void MinimizationProblem::solve () present_solution += newton_update; hanging_node_constraints.distribute (present_solution); -}; +} @@ -330,7 +330,7 @@ void MinimizationProblem::initialize () VectorTools::interpolate (dof_handler, InitializationValues(), present_solution); -}; +} @@ -360,7 +360,7 @@ void MinimizationProblem::refine_grid () Vector tmp (dof_handler.n_dofs()); solution_transfer.interpolate (present_solution, tmp); present_solution = tmp; -}; +} @@ -404,7 +404,7 @@ double MinimizationProblem::energy () const }; return energy; -}; +} @@ -432,7 +432,7 @@ void MinimizationProblem::output_results (const unsigned int cycle) const #endif data_out.write_gnuplot (out); -}; +} @@ -474,7 +474,7 @@ void MinimizationProblem::run () refine_grid (); }; -}; +} int main () @@ -510,4 +510,4 @@ int main () return 1; }; return 0; -}; +} diff --git a/deal.II/examples/step-2/step-2.cc b/deal.II/examples/step-2/step-2.cc index 943997f9fd..6b29f90afa 100644 --- a/deal.II/examples/step-2/step-2.cc +++ b/deal.II/examples/step-2/step-2.cc @@ -127,7 +127,7 @@ void make_grid (Triangulation<2> &triangulation) triangulation.execute_coarsening_and_refinement (); }; -}; +} // Up to now, we only have a grid, @@ -280,7 +280,7 @@ void distribute_dofs (DoFHandler<2> &dof_handler) // all distributed symmetrically // around the origin, this shows up // again in the sparsity pattern. -}; +} @@ -350,7 +350,7 @@ void renumber_dofs (DoFHandler<2> &dof_handler) // 1260 rows and columns, but large // matrices often have several // 100,000s). -}; +} @@ -381,4 +381,4 @@ int main () // of degrees of freedom to the // sparsity pattern of the matrix. renumber_dofs (dof_handler); -}; +} diff --git a/deal.II/examples/step-3/step-3.cc b/deal.II/examples/step-3/step-3.cc index 9828b12417..29c647ed82 100644 --- a/deal.II/examples/step-3/step-3.cc +++ b/deal.II/examples/step-3/step-3.cc @@ -170,7 +170,7 @@ class LaplaceProblem LaplaceProblem::LaplaceProblem () : fe (1), dof_handler (triangulation) -{}; +{} // Now, the first thing we've got to @@ -295,7 +295,7 @@ void LaplaceProblem::make_grid_and_dofs () // values: solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); -}; +} // Now comes the difficult part: @@ -684,7 +684,7 @@ void LaplaceProblem::assemble_system () system_matrix, solution, system_rhs); -}; +} // The following function simply @@ -756,7 +756,7 @@ void LaplaceProblem::solve () // job, the solution variable // contains the nodal values of the // solution function. -}; +} // The last part of a typical finite @@ -820,7 +820,7 @@ void LaplaceProblem::output_results () const // GMV, or some other format): std::ofstream output ("solution.gpl"); data_out.write_gnuplot (output); -}; +} // The following function is the main @@ -838,7 +838,7 @@ void LaplaceProblem::run () assemble_system (); solve (); output_results (); -}; +} @@ -856,4 +856,4 @@ int main () LaplaceProblem laplace_problem; laplace_problem.run (); return 0; -}; +} diff --git a/deal.II/examples/step-4/step-4.cc b/deal.II/examples/step-4/step-4.cc index e9d2476668..242bc84b12 100644 --- a/deal.II/examples/step-4/step-4.cc +++ b/deal.II/examples/step-4/step-4.cc @@ -202,7 +202,7 @@ double RightHandSide::value (const Point &p, return_value += 4*std::pow(p(i), 4); return return_value; -}; +} // The boundary values were to be @@ -219,7 +219,7 @@ double BoundaryValues::value (const Point &p, const unsigned int) const { return p.square(); -}; +} @@ -235,7 +235,7 @@ template LaplaceProblem::LaplaceProblem () : fe (1), dof_handler (triangulation) -{}; +{} @@ -302,7 +302,7 @@ void LaplaceProblem::make_grid_and_dofs () solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); -}; +} @@ -483,7 +483,7 @@ void LaplaceProblem::assemble_system () system_matrix, solution, system_rhs); -}; +} // Solving the linear system of @@ -510,7 +510,7 @@ void LaplaceProblem::solve () std::cout << " " << solver_control.last_step() << " CG iterations needed to obtain convergence." << std::endl; -}; +} @@ -543,7 +543,7 @@ void LaplaceProblem::output_results () const "solution-2d.gmv" : "solution-3d.gmv"); data_out.write_gmv (output); -}; +} @@ -561,7 +561,7 @@ void LaplaceProblem::run () assemble_system (); solve (); output_results (); -}; +} @@ -632,4 +632,4 @@ int main () laplace_problem_3d.run (); return 0; -}; +} diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index 234d286c01..1ac610a46b 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -195,7 +195,7 @@ double Coefficient::value (const Point &p, return 20; else return 1; -}; +} @@ -321,7 +321,7 @@ void Coefficient::value_list (const std::vector > &points, else values[i] = 1; }; -}; +} // This function is as before. @@ -329,7 +329,7 @@ template LaplaceProblem::LaplaceProblem () : fe (1), dof_handler (triangulation) -{}; +{} @@ -357,7 +357,7 @@ void LaplaceProblem::setup_system () solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); -}; +} @@ -522,7 +522,7 @@ void LaplaceProblem::assemble_system () system_matrix, solution, system_rhs); -}; +} @@ -583,7 +583,7 @@ void LaplaceProblem::solve () std::cout << " " << solver_control.last_step() << " CG iterations needed to obtain convergence." << std::endl; -}; +} @@ -765,7 +765,7 @@ void LaplaceProblem::output_results (const unsigned int cycle) const // And then write the data to the // file. data_out.write_eps (output); -}; +} @@ -923,7 +923,7 @@ void LaplaceProblem::run () solve (); output_results (cycle); }; -}; +} @@ -963,4 +963,4 @@ int main () */ return 0; -}; +} diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index 426a71b9c9..4cfcba56c3 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -171,7 +171,7 @@ double Coefficient::value (const Point &p, return 20; else return 1; -}; +} @@ -195,7 +195,7 @@ void Coefficient::value_list (const std::vector > &points, else values[i] = 1; }; -}; +} // This is mostly the same as before, @@ -210,7 +210,7 @@ template LaplaceProblem::LaplaceProblem () : fe (2), dof_handler (triangulation) -{}; +{} // Here comes the added destructor of @@ -335,7 +335,7 @@ template LaplaceProblem::~LaplaceProblem () { dof_handler.clear (); -}; +} @@ -434,7 +434,7 @@ void LaplaceProblem::setup_system () solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); -}; +} @@ -588,7 +588,7 @@ void LaplaceProblem::assemble_system () system_matrix, solution, system_rhs); -}; +} @@ -614,7 +614,7 @@ void LaplaceProblem::solve () // the solutions of the linear // system just solved. hanging_node_constraints.distribute (solution); -}; +} // Instead of global refinement, we @@ -813,7 +813,7 @@ void LaplaceProblem::refine_grid () // perform the actions for which // the cells are flagged. triangulation.execute_coarsening_and_refinement (); -}; +} @@ -843,7 +843,7 @@ void LaplaceProblem::output_results (const unsigned int cycle) const // each grid as a postscript file. GridOut grid_out; grid_out.write_eps (triangulation, output); -}; +} @@ -945,7 +945,7 @@ void LaplaceProblem::run () std::ofstream output ("final-solution.eps"); data_out.write_eps (output); -}; +} // The main function is unaltered in @@ -1073,4 +1073,4 @@ int main () // performed as was expected and we // can return without error. return 0; -}; +} diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc index fff24cd15d..545b8f2ca2 100644 --- a/deal.II/examples/step-7/step-7.cc +++ b/deal.II/examples/step-7/step-7.cc @@ -269,7 +269,7 @@ double Solution::value (const Point &p, }; return return_value; -}; +} @@ -318,7 +318,7 @@ Tensor<1,dim> Solution::gradient (const Point &p, }; return return_value; -}; +} @@ -372,7 +372,7 @@ double RightHandSide::value (const Point &p, }; return return_value; -}; +} // @sect3{The Laplace solver class} @@ -678,7 +678,7 @@ LaplaceProblem::LaplaceProblem (const FiniteElement &fe, dof_handler (triangulation), fe (&fe), refinement_mode (refinement_mode) -{}; +{} @@ -686,7 +686,7 @@ template LaplaceProblem::~LaplaceProblem () { dof_handler.clear (); -}; +} // The following function sets up the @@ -745,7 +745,7 @@ void LaplaceProblem::setup_system () solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); -}; +} @@ -1048,7 +1048,7 @@ void LaplaceProblem::assemble_system () system_matrix, solution, system_rhs); -}; +} // Solving the system of equations is @@ -1067,7 +1067,7 @@ void LaplaceProblem::solve () preconditioner); hanging_node_constraints.distribute (solution); -}; +} // Now for the function doing grid @@ -1128,7 +1128,7 @@ void LaplaceProblem::refine_grid () break; }; }; -}; +} @@ -1311,7 +1311,7 @@ void LaplaceProblem::process_solution (const unsigned int cycle) // used: convergence_table.set_tex_format("cells", "r"); convergence_table.set_tex_format("dofs", "r"); -}; +} @@ -1754,7 +1754,7 @@ void LaplaceProblem::run () convergence_table.write_tex(table_file); table_file.close(); } -}; +} // @sect3{Main function} @@ -1843,4 +1843,4 @@ int main () }; return 0; -}; +} diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index 7b2f6454b3..0d866a3f78 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -173,7 +173,7 @@ class RightHandSide : public Function template RightHandSide::RightHandSide () : Function (dim) -{}; +{} // This is the function that returns @@ -238,7 +238,7 @@ void RightHandSide::vector_value (const Point &p, values(1) = 1; else values(1) = 0; -}; +} @@ -301,7 +301,7 @@ void RightHandSide::vector_value_list (const std::vector > &poin // resulting code can in principle // be as fast as if we had // duplicated the code. -}; +} @@ -361,7 +361,7 @@ ElasticProblem::ElasticProblem () : // constructor only needs the // parameter to generate a copy of // the finite element from this. -{}; +{} @@ -369,7 +369,7 @@ template ElasticProblem::~ElasticProblem () { dof_handler.clear (); -}; +} // Setting up the system of equations @@ -417,7 +417,7 @@ void ElasticProblem::setup_system () solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); -}; +} // The big changes in this program @@ -734,7 +734,7 @@ void ElasticProblem::assemble_system () system_matrix, solution, system_rhs); -}; +} @@ -760,7 +760,7 @@ void ElasticProblem::solve () preconditioner); hanging_node_constraints.distribute (solution); -}; +} @@ -801,7 +801,7 @@ void ElasticProblem::refine_grid () 0.3, 0.03); triangulation.execute_coarsening_and_refinement (); -}; +} // The output happens mostly as has @@ -911,7 +911,7 @@ void ElasticProblem::output_results (const unsigned int cycle) const data_out.add_data_vector (solution, solution_names); data_out.build_patches (); data_out.write_gmv (output); -}; +} @@ -1048,7 +1048,7 @@ void ElasticProblem::run () solve (); output_results (cycle); }; -}; +} // The main function is again exactly @@ -1089,4 +1089,4 @@ int main () }; return 0; -}; +} diff --git a/deal.II/examples/step-9/step-9.cc b/deal.II/examples/step-9/step-9.cc index 2486402101..3be63565dc 100644 --- a/deal.II/examples/step-9/step-9.cc +++ b/deal.II/examples/step-9/step-9.cc @@ -341,7 +341,7 @@ AdvectionField::value (const Point &p) const value[i] = 1+0.8*std::sin(8*M_PI*p[0]); return value; -}; +} @@ -355,7 +355,7 @@ AdvectionField::value_list (const std::vector > &points, for (unsigned int i=0; i::value (points[i]); -}; +} @@ -439,7 +439,7 @@ RightHandSide::value (const Point &p, return ( (p-center_point).square() < diameter*diameter ? .1/std::pow(diameter,dim) : 0); -}; +} @@ -454,7 +454,7 @@ RightHandSide::value_list (const std::vector > &points, for (unsigned int i=0; i::value (points[i], component); -}; +} @@ -488,7 +488,7 @@ BoundaryValues::value (const Point &p, const double sine_term = std::sin(16*M_PI*std::sqrt(p.square())); const double weight = std::exp(-5*p.square()) / std::exp(-5.); return sine_term * weight; -}; +} @@ -503,7 +503,7 @@ BoundaryValues::value_list (const std::vector > &points, for (unsigned int i=0; i::value (points[i], component); -}; +} @@ -648,7 +648,7 @@ template AdvectionProblem::AdvectionProblem () : dof_handler (triangulation), fe(1) -{}; +{} @@ -656,7 +656,7 @@ template AdvectionProblem::~AdvectionProblem () { dof_handler.clear (); -}; +} @@ -683,7 +683,7 @@ void AdvectionProblem::setup_system () solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); -}; +} @@ -897,7 +897,7 @@ void AdvectionProblem::assemble_system () // due to the fact that we have // included them into the weak // formulation of the problem. -}; +} @@ -1280,7 +1280,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & // therefore also operate on // the same ``lock''. }; -}; +} @@ -1310,7 +1310,7 @@ void AdvectionProblem::solve () preconditioner); hanging_node_constraints.distribute (solution); -}; +} // The following function refines the @@ -1337,7 +1337,7 @@ void AdvectionProblem::refine_grid () 0.5, 0.03); triangulation.execute_coarsening_and_refinement (); -}; +} @@ -1356,7 +1356,7 @@ void AdvectionProblem::output_results (const unsigned int cycle) const GridOut grid_out; grid_out.write_eps (triangulation, output); -}; +} // ... as is the main loop (setup - @@ -1401,7 +1401,7 @@ void AdvectionProblem::run () std::ofstream output ("final-solution.gmv"); data_out.write_gmv (output); -}; +} @@ -1514,7 +1514,7 @@ GradientEstimation::estimate (const DoFHandler &dof_handler, // eliminating the need to write // code included in conditional // preprocessor sections. -}; +} // Following now the function that @@ -2023,7 +2023,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, 1+1.0*dim/2) * std::sqrt(gradient.square())); }; -}; +} // @sect3{Main function} @@ -2067,4 +2067,4 @@ int main () }; return 0; -}; +}