From: Daniel Arndt Date: Fri, 17 Mar 2017 10:21:11 +0000 (+0100) Subject: Fix uninitialized and unused variles in examples X-Git-Tag: v8.5.0-rc1~31^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4075%2Fhead;p=dealii.git Fix uninitialized and unused variles in examples --- diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index d0dd68fc19..6bcf068688 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -2673,6 +2673,7 @@ namespace Step14 ExcInternalError()); Assert (neighbor->has_children(), ExcInternalError()); + (void) neighbor; // Then find out which neighbor the present cell is of the adjacent // cell. Note that we will operate on the children of this adjacent diff --git a/examples/step-28/step-28.cc b/examples/step-28/step-28.cc index 10d23917c1..ce1cef8978 100644 --- a/examples/step-28/step-28.cc +++ b/examples/step-28/step-28.cc @@ -168,7 +168,7 @@ namespace Step28 sigma_s (n_materials, n_groups, n_groups), chi (n_materials, n_groups) { - switch (n_groups) + switch (this->n_groups) { case 2: { diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index 00e7ee0e1f..0dae988798 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -1210,6 +1210,8 @@ namespace Step32 (Triangulation::smoothing_on_refinement | Triangulation::smoothing_on_coarsening)), + global_Omega_diameter(0.), + mapping (4), stokes_fe (FE_Q(parameters.stokes_velocity_degree), diff --git a/examples/step-33/step-33.cc b/examples/step-33/step-33.cc index 9aa53c9235..f1b6bf2ce8 100644 --- a/examples/step-33/step-33.cc +++ b/examples/step-33/step-33.cc @@ -1090,12 +1090,20 @@ namespace Step33 AllParameters::BoundaryConditions::BoundaryConditions () : values (EulerEquations::n_components) - {} + { + for (unsigned int c=0; c::n_components; ++c) + kind[c] = EulerEquations::no_penetration_boundary; + } template AllParameters::AllParameters () : + diffusion_power(0.), + time_step(1.), + final_time(1.), + theta(.5), + is_stationary(true), initial_conditions (EulerEquations::n_components) {} diff --git a/examples/step-34/step-34.cc b/examples/step-34/step-34.cc index 2aedc850a2..f86c865de6 100644 --- a/examples/step-34/step-34.cc +++ b/examples/step-34/step-34.cc @@ -321,7 +321,12 @@ namespace Step34 fe(fe_degree), dh(tria), mapping(mapping_degree, true), - wind(dim) + wind(dim), + singular_quadrature_order(5), + n_cycles(4), + external_refinement(5), + run_in_this_dimension(true), + extend_solution(true) {} diff --git a/examples/step-37/step-37.cc b/examples/step-37/step-37.cc index 86d030ecdd..cf93334369 100644 --- a/examples/step-37/step-37.cc +++ b/examples/step-37/step-37.cc @@ -757,6 +757,7 @@ namespace Step37 #endif fe (degree_finite_element), dof_handler (triangulation), + setup_time(0.), pcout (std::cout, Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0), // The LaplaceProblem class holds an additional output stream that // collects detailed timings about the setup phase. This stream, called diff --git a/examples/step-44/step-44.cc b/examples/step-44/step-44.cc index a849b40864..286d8e76b3 100644 --- a/examples/step-44/step-44.cc +++ b/examples/step-44/step-44.cc @@ -1078,6 +1078,7 @@ namespace Step44 Solid::Solid(const std::string &input_file) : parameters(input_file), + vol_reference(0.), triangulation(Triangulation::maximum_smoothing), time(parameters.end_time, parameters.delta_t), timer(std::cout, diff --git a/examples/step-48/step-48.cc b/examples/step-48/step-48.cc index 40923dd087..433f7e7fb5 100644 --- a/examples/step-48/step-48.cc +++ b/examples/step-48/step-48.cc @@ -338,6 +338,7 @@ namespace Step48 dof_handler (triangulation), n_global_refinements (10-2*dim), time (-10), + time_step(10.), final_time (10), cfl_number (.1/fe_degree), output_timestep_skip (200)