From b8a1b878ba3bd225f85c9495d8a65fb500fd3b8a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 17 Aug 2010 19:27:12 +0000 Subject: [PATCH] Reorder initialization of fields to avoid compiler error. git-svn-id: https://svn.dealii.org/trunk@21670 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-34/step-34.cc | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/deal.II/examples/step-34/step-34.cc b/deal.II/examples/step-34/step-34.cc index 8d993b2b70..17cf52129e 100644 --- a/deal.II/examples/step-34/step-34.cc +++ b/deal.II/examples/step-34/step-34.cc @@ -308,7 +308,7 @@ class BEMProblem const Quadrature & get_singular_quadrature( const typename DoFHandler::active_cell_iterator &cell, const unsigned int index) const; - + // The usual deal.II classes can // be used for boundary element @@ -373,7 +373,7 @@ class BEMProblem // from a point $\mathbf x$) at // the support points of our // shape functions. - + Vector phi; Vector alpha; @@ -381,7 +381,7 @@ class BEMProblem // to output errors in the exact // solution and in the computed // alphas. - + ConvergenceTable convergence_table; // The following variables are @@ -421,13 +421,13 @@ class BEMProblem // parameters which are used in // case we wanted to extend the // solution to the entire domain. - + Functions::ParsedFunction wind; Functions::ParsedFunction exact_solution; unsigned int singular_quadrature_order; std_cxx1x::shared_ptr > quadrature; - + SolverControl solver_control; unsigned int n_cycles; @@ -472,8 +472,8 @@ BEMProblem::BEMProblem(const unsigned int fe_degree, : fe(fe_degree), dh(tria), - wind(dim), - mapping(mapping_degree, true) + mapping(mapping_degree, true), + wind(dim) {} @@ -734,7 +734,7 @@ void BEMProblem::read_domain() GridIn gi; gi.attach_triangulation (tria); gi.read_ucd (in); - + tria.set_boundary(1, boundary); } @@ -819,14 +819,14 @@ void BEMProblem::assemble_system() // the support points of the $i$th // basis function, while $j$ runs // on inner integration points. - + // We construct a vector // of support points which will be // used in the local integrations: std::vector > support_points(dh.n_dofs()); DoFTools::map_dofs_to_support_points( mapping, dh, support_points); - + // After doing so, we can start the // integration loop over all cells, // where we first initialize the @@ -947,7 +947,7 @@ void BEMProblem::assemble_system() // explained in detail below. Assert(singular_index != numbers::invalid_unsigned_int, ExcInternalError()); - + const Quadrature & singular_quadrature = get_singular_quadrature(cell, singular_index); @@ -1205,7 +1205,7 @@ void BEMProblem::compute_errors(const unsigned int cycle) // cell. For this reason, it is // necessary to create a new // quadrature for each singular - // integration. + // integration. // // The different quadrature rules are // built inside the @@ -1215,7 +1215,7 @@ void BEMProblem::compute_errors(const unsigned int cycle) // assemble_system function. The // index given as an argument is the // index of the unit support point - // where the singularity is located. + // where the singularity is located. template<> const Quadrature<2> & BEMProblem<3>::get_singular_quadrature( @@ -1224,9 +1224,9 @@ const Quadrature<2> & BEMProblem<3>::get_singular_quadrature( { Assert(index < fe.dofs_per_cell, ExcIndexRange(0, fe.dofs_per_cell, index)); - + static std::vector > quadratures; - if(quadratures.size() == 0) + if(quadratures.size() == 0) for(unsigned int i=0; i(singular_quadrature_order, fe.get_unit_support_points()[i], @@ -1242,10 +1242,10 @@ const Quadrature<1> & BEMProblem<2>::get_singular_quadrature( { Assert(index < fe.dofs_per_cell, ExcIndexRange(0, fe.dofs_per_cell, index)); - + static Quadrature<1> * q_pointer = NULL; if(q_pointer) delete q_pointer; - + q_pointer = new QGaussLogR<1>(singular_quadrature_order, fe.get_unit_support_points()[index], 1./cell->measure(), true); @@ -1460,7 +1460,7 @@ int main () { unsigned int degree = 1; unsigned int mapping_degree = 1; - + deallog.depth_console (3); BEMProblem<2> laplace_problem_2d(degree, mapping_degree); laplace_problem_2d.run(); -- 2.39.5