From 75ec5af70b43ef2857a89d4e876395e9bdeb1b3c Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 14 Nov 2019 15:33:07 -0500 Subject: [PATCH] Fix compiling with clang-3.7.1 --- examples/step-13/step-13.cc | 4 ++-- examples/step-27/step-27.cc | 2 +- examples/step-38/step-38.cc | 2 +- examples/step-4/step-4.cc | 2 +- examples/step-41/step-41.cc | 2 +- examples/step-51/step-51.cc | 2 ++ examples/step-61/step-61.cc | 2 +- examples/step-63/step-63.cc | 2 +- examples/step-7/step-7.cc | 4 ++-- source/grid/manifold_lib.cc | 1 + 10 files changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/step-13/step-13.cc b/examples/step-13/step-13.cc index 688d598e71..d12cc57ddf 100644 --- a/examples/step-13/step-13.cc +++ b/examples/step-13/step-13.cc @@ -1359,8 +1359,8 @@ namespace Step13 triangulation.refine_global(2); const FE_Q fe(1); const QGauss quadrature(4); - const RightHandSide rhs_function; - const Solution boundary_values; + const RightHandSide rhs_function{}; + const Solution boundary_values{}; // Create a solver object of the kind indicated by the argument to this // function. If the name is not recognized, throw an exception! diff --git a/examples/step-27/step-27.cc b/examples/step-27/step-27.cc index 9185c2d526..5d108c7e8b 100644 --- a/examples/step-27/step-27.cc +++ b/examples/step-27/step-27.cc @@ -317,7 +317,7 @@ namespace Step27 update_quadrature_points | update_JxW_values); - const RightHandSide rhs_function; + const RightHandSide rhs_function{}; FullMatrix cell_matrix; Vector cell_rhs; diff --git a/examples/step-38/step-38.cc b/examples/step-38/step-38.cc index f4f33dbe2a..6694241c55 100644 --- a/examples/step-38/step-38.cc +++ b/examples/step-38/step-38.cc @@ -370,7 +370,7 @@ namespace Step38 std::vector rhs_values(n_q_points); std::vector local_dof_indices(dofs_per_cell); - const RightHandSide rhs; + const RightHandSide rhs{}; for (const auto &cell : dof_handler.active_cell_iterators()) { diff --git a/examples/step-4/step-4.cc b/examples/step-4/step-4.cc index 80076d7a92..9d1506db9e 100644 --- a/examples/step-4/step-4.cc +++ b/examples/step-4/step-4.cc @@ -324,7 +324,7 @@ void Step4::assemble_system() // the class declared above to generate the necessary data. Since this right // hand side object is only used locally in the present function, we declare // it here as a local variable: - const RightHandSide right_hand_side; + const RightHandSide right_hand_side{}; // Compared to the previous example, in order to evaluate the non-constant // right hand side function we now also need the quadrature points on the diff --git a/examples/step-41/step-41.cc b/examples/step-41/step-41.cc index 2bbbf13f55..02dd3889ad 100644 --- a/examples/step-41/step-41.cc +++ b/examples/step-41/step-41.cc @@ -269,7 +269,7 @@ namespace Step41 system_rhs = 0; const QGauss quadrature_formula(fe.degree + 1); - const RightHandSide right_hand_side; + const RightHandSide right_hand_side{}; FEValues fe_values(fe, quadrature_formula, diff --git a/examples/step-51/step-51.cc b/examples/step-51/step-51.cc index 946063f9da..1178fd47ad 100644 --- a/examples/step-51/step-51.cc +++ b/examples/step-51/step-51.cc @@ -545,6 +545,7 @@ namespace Step51 , trace_values(face_quadrature_formula.size()) , fe_local_support_on_face(GeometryInfo::faces_per_cell) , fe_support_on_face(GeometryInfo::faces_per_cell) + , exact_solution() { for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) @@ -587,6 +588,7 @@ namespace Step51 , trace_values(sd.trace_values) , fe_local_support_on_face(sd.fe_local_support_on_face) , fe_support_on_face(sd.fe_support_on_face) + , exact_solution() {} }; diff --git a/examples/step-61/step-61.cc b/examples/step-61/step-61.cc index 6b397a437f..6683c339f3 100644 --- a/examples/step-61/step-61.cc +++ b/examples/step-61/step-61.cc @@ -419,7 +419,7 @@ namespace Step61 const unsigned int n_face_q_points = fe_face_values.get_quadrature().size(); - const RightHandSide right_hand_side; + const RightHandSide right_hand_side{}; std::vector right_hand_side_values(n_q_points); const Coefficient coefficient; diff --git a/examples/step-63/step-63.cc b/examples/step-63/step-63.cc index a3437c7553..010b16f1fa 100644 --- a/examples/step-63/step-63.cc +++ b/examples/step-63/step-63.cc @@ -716,7 +716,7 @@ namespace Step63 scratch_data.fe_values.reinit(cell); - const RightHandSide right_hand_side; + const RightHandSide right_hand_side{}; std::vector rhs_values(n_q_points); right_hand_side.value_list(scratch_data.fe_values.get_quadrature_points(), diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index b0fbccf438..e1838cbf09 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -587,7 +587,7 @@ namespace Step7 // Note that the operations we will do with the right hand side object are // only querying data, never changing the object. We can therefore declare // it const: - const RightHandSide right_hand_side; + const RightHandSide right_hand_side{}; std::vector rhs_values(n_q_points); // Finally we define an object denoting the exact solution function. We @@ -597,7 +597,7 @@ namespace Step7 // Neumann values are prescribed. We will, however, be a little bit lazy // and use what we already have in information. Real-life programs would // to go other ways here, of course. - const Solution exact_solution; + const Solution exact_solution{}; // Now for the main loop over all cells. This is mostly unchanged from // previous examples, so we only comment on the things that have changed. diff --git a/source/grid/manifold_lib.cc b/source/grid/manifold_lib.cc index 75138e0dbd..d9723307e9 100644 --- a/source/grid/manifold_lib.cc +++ b/source/grid/manifold_lib.cc @@ -1308,6 +1308,7 @@ FunctionManifold::FunctionManifold( const Tensor<1, chartdim> &periodicity, const double tolerance) : ChartManifold(periodicity) + , const_map() , push_forward_function(&push_forward_function) , pull_back_function(&pull_back_function) , tolerance(tolerance) -- 2.39.5