From d5337356dae9b6779842a9d044ee947e4ef76afd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 21 Apr 2003 21:53:19 +0000 Subject: [PATCH] Move somewhat closer to compilability with gcc3.4 (still a long way to go...) git-svn-id: https://svn.dealii.org/trunk@7437 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/deal.II/wave-test-3.cc | 379 ++++++++++++++++++----------------- 1 file changed, 190 insertions(+), 189 deletions(-) diff --git a/tests/deal.II/wave-test-3.cc b/tests/deal.II/wave-test-3.cc index 9ae9bfe85a..f6ee569560 100644 --- a/tests/deal.II/wave-test-3.cc +++ b/tests/deal.II/wave-test-3.cc @@ -13,6 +13,7 @@ //TODO:[WB] Figure out why postscript output changes output-precision. +#include #include #include #include @@ -2004,8 +2005,8 @@ template void SeismicSignal::compute_functionals (Vector &j1, Vector &j2) { const double y_offset = 1.0; - const unsigned int n_q_points = quadrature_face->n_quadrature_points; - const unsigned int dofs_per_cell = fe->dofs_per_cell; + const unsigned int n_q_points = this->quadrature_face->n_quadrature_points; + const unsigned int dofs_per_cell = this->fe->dofs_per_cell; j1.reinit (this->dof->n_dofs()); j2.reinit (this->dof->n_dofs()); @@ -2017,7 +2018,7 @@ void SeismicSignal::compute_functionals (Vector &j1, std::vector cell_dof_indices (dofs_per_cell); - FEFaceValues fe_face_values (*fe, *quadrature_face, + FEFaceValues fe_face_values (*this->fe, *this->quadrature_face, UpdateFlags(update_values | update_JxW_values | update_q_points)); @@ -2063,13 +2064,13 @@ void EarthSurface::compute_functionals (Vector &j1, Vector &j2) { const unsigned int face_dofs = this->fe->dofs_per_face; - j1.reinit (dof->n_dofs()); - j2.reinit (dof->n_dofs()); + j1.reinit (this->dof->n_dofs()); + j2.reinit (this->dof->n_dofs()); typename DoFHandler::active_cell_iterator cell, endc; typename DoFHandler::face_iterator face; - cell = dof->begin_active(); - endc = dof->end(); + cell = this->dof->begin_active(); + endc = this->dof->end(); std::vector face_dof_indices (face_dofs); @@ -2109,22 +2110,22 @@ void SplitSignal<1>::compute_functionals (Vector &, template void SplitSignal::compute_functionals (Vector &j1, Vector &j2) { - const unsigned int dofs_per_cell = fe->dofs_per_cell; - const unsigned int n_q_points = quadrature_face->n_quadrature_points; + const unsigned int dofs_per_cell = this->fe->dofs_per_cell; + const unsigned int n_q_points = this->quadrature_face->n_quadrature_points; - j1.reinit (dof->n_dofs()); - j2.reinit (dof->n_dofs()); + j1.reinit (this->dof->n_dofs()); + j2.reinit (this->dof->n_dofs()); if ((time<=1.6) || (time>1.8)) return; typename DoFHandler::active_cell_iterator cell, endc; typename DoFHandler::face_iterator face; - cell = dof->begin_active(); - endc = dof->end(); + cell = this->dof->begin_active(); + endc = this->dof->end(); - std::vector dof_indices (fe->dofs_per_cell); - FEFaceValues fe_face_values (*fe, *quadrature_face, UpdateFlags(update_values | update_JxW_values)); + std::vector dof_indices (this->fe->dofs_per_cell); + FEFaceValues fe_face_values (*this->fe, *this->quadrature_face, UpdateFlags(update_values | update_JxW_values)); for (; cell!=endc; ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; @@ -2152,7 +2153,7 @@ void SplitSignal::compute_functionals (Vector &j1, for (unsigned int j=0; jtime_step / 2; }; }; } @@ -2215,21 +2216,21 @@ void SplitLine<1>::compute_endtime_vectors (Vector &final_u_bar, template void OneBranch1d::compute_functionals (Vector &j1, Vector &j2) { - const unsigned int dofs_per_cell = fe->dofs_per_cell; - const unsigned int n_q_points = quadrature->n_quadrature_points; + const unsigned int dofs_per_cell = this->fe->dofs_per_cell; + const unsigned int n_q_points = this->quadrature->n_quadrature_points; - j1.reinit (dof->n_dofs()); - j2.reinit (dof->n_dofs()); + j1.reinit (this->dof->n_dofs()); + j2.reinit (this->dof->n_dofs()); - if ((time<=2.5-time_step) || (time>2.5)) + if ((this->time<=2.5-this->time_step) || (this->time>2.5)) return; typename DoFHandler::active_cell_iterator cell, endc; - cell = dof->begin_active(); - endc = dof->end(); + cell = this->dof->begin_active(); + endc = this->dof->end(); - std::vector dof_indices (fe->dofs_per_cell); - FEValues fe_values (*fe, *quadrature, UpdateFlags(update_values | update_JxW_values)); + std::vector dof_indices (this->fe->dofs_per_cell); + FEValues fe_values (*this->fe, *this->quadrature, UpdateFlags(update_values | update_JxW_values)); for (; cell!=endc; ++cell) if ((cell->center()(0) > -0.6) && @@ -2257,21 +2258,21 @@ void OneBranch1d::compute_functionals (Vector &j1, template void SecondCrossing::compute_functionals (Vector &j1, Vector &j2) { - const unsigned int dofs_per_cell = fe->dofs_per_cell; - const unsigned int n_q_points = quadrature->n_quadrature_points; + const unsigned int dofs_per_cell = this->fe->dofs_per_cell; + const unsigned int n_q_points = this->quadrature->n_quadrature_points; - j1.reinit (dof->n_dofs()); - j2.reinit (dof->n_dofs()); + j1.reinit (this->dof->n_dofs()); + j2.reinit (this->dof->n_dofs()); - if ((time<=2.4-time_step) || (time>2.4)) + if ((this->time<=2.4-this->time_step) || (time>2.4)) return; typename DoFHandler::active_cell_iterator cell, endc; - cell = dof->begin_active(); - endc = dof->end(); + cell = this->dof->begin_active(); + endc = this->dof->end(); - std::vector dof_indices (fe->dofs_per_cell); - FEValues fe_values (*fe, *quadrature, UpdateFlags(update_values | update_JxW_values)); + std::vector dof_indices (this->fe->dofs_per_cell); + FEValues fe_values (*this->fe, *this->quadrature, UpdateFlags(update_values | update_JxW_values)); for (; cell!=endc; ++cell) if ((cell->center()(0) > -0.03) && @@ -2287,7 +2288,7 @@ void SecondCrossing::compute_functionals (Vector &j1, sum += fe_values.shape_value(i,j) *fe_values.JxW(j); - j1(dof_indices[i]) += sum / time_step; + j1(dof_indices[i]) += sum / this->time_step; }; }; } @@ -2299,19 +2300,19 @@ void SecondCrossing::compute_functionals (Vector &j1, template void HuyghensWave::compute_functionals (Vector &j1, Vector &j2) { - j1.reinit (dof->n_dofs()); - j2.reinit (dof->n_dofs()); + j1.reinit (this->dof->n_dofs()); + j2.reinit (this->dof->n_dofs()); - if ((time < 0.5) || (time > 0.69)) + if ((this->time < 0.5) || (this->time > 0.69)) return; Point p; p(0) = 0.75; const Point evaluation_point (p); - const typename DoFHandler::cell_iterator endc = dof->end(3); + const typename DoFHandler::cell_iterator endc = this->dof->end(3); bool point_found = false; - for (typename DoFHandler::cell_iterator cell=dof->begin(3); + for (typename DoFHandler::cell_iterator cell=this->dof->begin(3); (cell!=endc) && !point_found; ++cell) for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) if (cell->vertex(vertex) == evaluation_point) @@ -2320,7 +2321,7 @@ void HuyghensWave::compute_functionals (Vector &j1, while (terminal_cell->has_children()) terminal_cell = terminal_cell->child(vertex); - j1(cell->vertex_dof_index(vertex,0)) = time*time_step; + j1(cell->vertex_dof_index(vertex,0)) = this->time*this->time_step; point_found = true; break; @@ -2438,20 +2439,20 @@ double EvaluateEnergyContent::compute_energy (const PartOfDomain pod) const const double y_offset = 300000000; typename DoFHandler::active_cell_iterator cell, endc; - cell = dof->begin_active (); - endc = dof->end (); + cell = this->dof->begin_active (); + endc = this->dof->end (); - FEValues fe_values (*fe, *quadrature, + FEValues fe_values (*this->fe, *this->quadrature, UpdateFlags(update_values | update_gradients | update_JxW_values | update_q_points)); - FullMatrix cell_matrix (fe->dofs_per_cell, fe->dofs_per_cell); - Vector local_u (fe->dofs_per_cell); - Vector local_v (fe->dofs_per_cell); + FullMatrix cell_matrix (this->fe->dofs_per_cell, this->fe->dofs_per_cell); + Vector local_u (this->fe->dofs_per_cell); + Vector local_v (this->fe->dofs_per_cell); - std::vector density_values(quadrature->n_quadrature_points); - std::vector stiffness_values(quadrature->n_quadrature_points); + std::vector density_values(this->quadrature->n_quadrature_points); + std::vector stiffness_values(this->quadrature->n_quadrature_points); double total_energy = 0; @@ -2471,15 +2472,15 @@ double EvaluateEnergyContent::compute_energy (const PartOfDomain pod) const fe_values.reinit (cell); - cell->get_dof_values (*u, local_u); - cell->get_dof_values (*v, local_v); + cell->get_dof_values (*this->u, local_u); + cell->get_dof_values (*this->v, local_v); cell_matrix.clear (); - density->value_list (fe_values.get_quadrature_points(), + this->density->value_list (fe_values.get_quadrature_points(), density_values); for (unsigned int point=0; pointdofs_per_cell; ++i) - for (unsigned int j=0; jdofs_per_cell; ++j) + for (unsigned int i=0; ife->dofs_per_cell; ++i) + for (unsigned int j=0; jfe->dofs_per_cell; ++j) cell_matrix(i,j) += (fe_values.shape_value(i,point) * fe_values.shape_value(j,point)) * fe_values.JxW(point) * @@ -2488,11 +2489,11 @@ double EvaluateEnergyContent::compute_energy (const PartOfDomain pod) const total_energy += 1./2. * cell_matrix.matrix_norm_square (local_v); cell_matrix.clear (); - stiffness->value_list (fe_values.get_quadrature_points(), + this->stiffness->value_list (fe_values.get_quadrature_points(), stiffness_values); for (unsigned int point=0; pointdofs_per_cell; ++i) - for (unsigned int j=0; jdofs_per_cell; ++j) + for (unsigned int i=0; ife->dofs_per_cell; ++i) + for (unsigned int j=0; jfe->dofs_per_cell; ++j) cell_matrix(i,j) += (fe_values.shape_grad(i,point) * fe_values.shape_grad(j,point)) * fe_values.JxW(point) * @@ -2534,8 +2535,8 @@ void EvaluateIntegratedValueAtOrigin::reset () { template double EvaluateIntegratedValueAtOrigin::evaluate () { - typename DoFHandler::active_cell_iterator cell = dof->begin_active(), - endc = dof->end(); + typename DoFHandler::active_cell_iterator cell = this->dof->begin_active(), + endc = this->dof->end(); double value_at_origin = 0; Point origin; @@ -2546,7 +2547,7 @@ double EvaluateIntegratedValueAtOrigin::evaluate () { for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) if (cell->vertex(vertex) == origin) { - value_at_origin = (*u)(cell->vertex_dof_index(vertex,0)); + value_at_origin = (*this->u)(cell->vertex_dof_index(vertex,0)); origin_found = true; }; }; @@ -2554,7 +2555,7 @@ double EvaluateIntegratedValueAtOrigin::evaluate () { Assert (origin_found, ExcVertexNotFound()); if (time > 0) - integrated_value += value_at_origin * time_step; + integrated_value += value_at_origin * this->time_step; return value_at_origin; } @@ -2597,26 +2598,26 @@ double EvaluateSeismicSignal<1>::evaluate () template double EvaluateSeismicSignal::evaluate () { - const unsigned int n_q_points = quadrature_face->n_quadrature_points; + const unsigned int n_q_points = this->quadrature_face->n_quadrature_points; - std::ofstream out((base_file_name + ".seismic").c_str()); + std::ofstream out((this->base_file_name + ".seismic").c_str()); AssertThrow (out, typename EvaluationBase::ExcIO()); - typename DoFHandler::active_cell_iterator cell = dof->begin_active(), - endc = dof->end(); + typename DoFHandler::active_cell_iterator cell = this->dof->begin_active(), + endc = this->dof->end(); double u_integrated=0; - FEFaceValues face_values (*fe, *quadrature_face, + FEFaceValues face_values (*this->fe, *this->quadrature_face, UpdateFlags(update_values | update_JxW_values | update_q_points)); - std::vector face_u (fe->dofs_per_face); + std::vector face_u (this->fe->dofs_per_face); for (; cell!=endc; ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->center()(1) == 1.0) { face_values.reinit (cell, face); - face_values.get_function_values (*u, face_u); + face_values.get_function_values (*this->u, face_u); const std::vector > &q_points (face_values.get_quadrature_points()); double local_integral = 0; @@ -2630,13 +2631,13 @@ double EvaluateSeismicSignal::evaluate () { << ' ' << cell->face(face)->vertex(0)(0) << " " - << (*u)(cell->face(face)->vertex_dof_index(0,0)) + << (*this->u)(cell->face(face)->vertex_dof_index(0,0)) << std::endl << time << ' ' << cell->face(face)->vertex(1)(0) << " " - << (*u)(cell->face(face)->vertex_dof_index(1,0)) + << (*this->u)(cell->face(face)->vertex_dof_index(1,0)) << std::endl << std::endl; }; @@ -2644,7 +2645,7 @@ double EvaluateSeismicSignal::evaluate () { out.close (); if (time!=0) - result += u_integrated*time_step; + result += u_integrated*this->time_step; return u_integrated; } @@ -2690,12 +2691,12 @@ double EvaluateSplitSignal::evaluate () { if ((time<=1.6) || (time>1.8)) return 0; - const unsigned int n_q_points = quadrature_face->n_quadrature_points; - typename DoFHandler::active_cell_iterator cell = dof->begin_active(), - endc = dof->end(); + const unsigned int n_q_points = this->quadrature_face->n_quadrature_points; + typename DoFHandler::active_cell_iterator cell = this->dof->begin_active(), + endc = this->dof->end(); double u_integrated=0; - FEFaceValues face_values (*fe, *quadrature_face, UpdateFlags(update_values | update_JxW_values)); - std::vector face_u (fe->dofs_per_face); + FEFaceValues face_values (*this->fe, *this->quadrature_face, UpdateFlags(update_values | update_JxW_values)); + std::vector face_u (this->fe->dofs_per_face); for (; cell!=endc; ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) @@ -2714,7 +2715,7 @@ double EvaluateSplitSignal::evaluate () { continue; face_values.reinit (cell, face_no); - face_values.get_function_values (*u, face_u); + face_values.get_function_values (*this->u, face_u); double local_integral = 0; for (unsigned int point=0; point::evaluate () { }; if (time!=0) - result += u_integrated*time_step / 2; + result += u_integrated*this->time_step / 2; return u_integrated; } @@ -2906,9 +2907,9 @@ double EvaluateHuyghensWave::evaluate () p(0) = 0.75; const Point evaluation_point (p); - const typename DoFHandler::cell_iterator endc = dof->end(3); + const typename DoFHandler::cell_iterator endc = this->dof->end(3); bool point_found = false; - for (typename DoFHandler::cell_iterator cell=dof->begin(3); + for (typename DoFHandler::cell_iterator cell=this->dof->begin(3); (cell!=endc) && !point_found; ++cell) for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) if (cell->vertex(vertex) == evaluation_point) @@ -2917,7 +2918,7 @@ double EvaluateHuyghensWave::evaluate () while (terminal_cell->has_children()) terminal_cell = terminal_cell->child(vertex); - value_at_origin = (*u)(cell->vertex_dof_index(vertex,0)); + value_at_origin = (*this->u)(cell->vertex_dof_index(vertex,0)); point_found = true; break; @@ -2927,8 +2928,8 @@ double EvaluateHuyghensWave::evaluate () if ((time > 0.5) && (time < 0.69)) { - integrated_value += value_at_origin * time_step; - weighted_value += value_at_origin * time_step * time; + integrated_value += value_at_origin * this->time_step; + weighted_value += value_at_origin * this->time_step * time; }; return value_at_origin; @@ -3030,7 +3031,7 @@ void TimestepManager::run_sweep (const unsigned int sweep_no) if (sweep_no != parameters.number_of_sweeps-1) refine_grids (); - write_statistics (sweep_info); + write_statistics (this->sweep_info); end_sweep (); @@ -3243,7 +3244,7 @@ void TimestepManager::write_statistics (const SweepInfo &sweep_info) const { deallog << " Writing summary."; - sweep_info.write_summary (parameters.eval_list, + this->sweep_info.write_summary (parameters.eval_list, logfile); AssertThrow (logfile, ExcIO()); @@ -4743,15 +4744,15 @@ std::string TimeStepBase_Wave::tmp_filename_base (const std::string &branch { return (parameters.tmp_directory + branch_signature + 's' + - int_to_string (sweep_no, 2) + 't' + - int_to_string (timestep_no, 4)); + int_to_string (this->sweep_no, 2) + 't' + + int_to_string (this->timestep_no, 4)); } template void TimeStepBase_Wave::attach_sweep_info (SweepInfo &si) { - sweep_info = &si; + this->sweep_info = &si; } @@ -4795,12 +4796,12 @@ void TimeStep_Wave::wake_up (const unsigned int wakeup_level) { Assert (dof_handler==0, ExcInternalError()); - sweep_info->get_timers().grid_generation.start(); + this->sweep_info->get_timers().grid_generation.start(); - dof_handler = new DoFHandler(*tria); + dof_handler = new DoFHandler(*this->tria); dof_handler->distribute_dofs (fe); - if (parameters.renumber_dofs) + if (this->parameters.renumber_dofs) DoFRenumbering::Cuthill_McKee (*dof_handler); @@ -4808,41 +4809,41 @@ constraints.clear (); DoFTools::make_hanging_node_constraints (*dof_handler, constraints); constraints.close (); - sweep_info->get_timers().grid_generation.stop(); + this->sweep_info->get_timers().grid_generation.stop(); Assert (u.size()==0, ExcInternalError ()); Assert (v.size()==0, ExcInternalError ()); - switch (next_action) + switch (this->next_action) { case primal_problem: case dual_problem: { - Assert (((next_action == primal_problem) && + Assert (((this->next_action == primal_problem) && (static_cast*>(&get_timestep_primal()) == this)) || - ((next_action == dual_problem) && + ((this->next_action == dual_problem) && (static_cast*>(&get_timestep_dual()) == this)), ExcInternalError()); u.reinit (dof_handler->n_dofs(), - parameters.extrapolate_old_solutions && (timestep_no!=0)); + this->parameters.extrapolate_old_solutions && (this->timestep_no!=0)); v.reinit (dof_handler->n_dofs(), - parameters.extrapolate_old_solutions && (timestep_no!=0)); + this->parameters.extrapolate_old_solutions && (this->timestep_no!=0)); break; }; case postprocess: { - sweep_info->get_timers().postprocessing.start(); + this->sweep_info->get_timers().postprocessing.start(); std::ifstream tmp_in(tmp_filename_base(branch_signature()).c_str()); u.block_read (tmp_in); v.block_read (tmp_in); tmp_in.close (); - sweep_info->get_timers().postprocessing.stop(); + this->sweep_info->get_timers().postprocessing.stop(); break; }; @@ -4942,18 +4943,18 @@ void TimeStep_Wave::create_matrices () const unsigned int dofs_per_cell = fe.dofs_per_cell, n_q_points = quadrature.n_quadrature_points; - const bool density_constant = parameters.density_constant, - stiffness_constant = parameters.stiffness_constant; + const bool density_constant = this->parameters.density_constant, + stiffness_constant = this->parameters.stiffness_constant; std::vector density_values (n_q_points, 1.); std::vector stiffness_values (n_q_points, 1.); if (density_constant) fill_n (density_values.begin(), n_q_points, - parameters.density->value(Point())); + this->parameters.density->value(Point())); if (stiffness_constant) fill_n (stiffness_values.begin(), n_q_points, - parameters.stiffness->value(Point())); + this->parameters.stiffness->value(Point())); FEValues fe_values (fe, quadrature, @@ -4980,10 +4981,10 @@ FEValues fe_values (fe, quadrature, if (!density_constant || !stiffness_constant) { if (!density_constant) - parameters.density->value_list (fe_values.get_quadrature_points (), + this->parameters.density->value_list (fe_values.get_quadrature_points (), density_values); if (!stiffness_constant) - parameters.stiffness->value_list (fe_values.get_quadrature_points (), + this->parameters.stiffness->value_list (fe_values.get_quadrature_points (), stiffness_values); }; @@ -5024,29 +5025,29 @@ void TimeStep_Wave::transfer_old_solutions (Vector &old_u, const Vector *old_grid_u = 0, *old_grid_v = 0; - switch (next_action) + switch (this->next_action) { case primal_problem: - Assert (previous_timestep != 0, ExcInternalError()); + Assert (this->previous_timestep != 0, ExcInternalError()); old_dof_handler = (static_cast*> - (previous_timestep)->get_timestep_primal()).dof_handler; + (this->previous_timestep)->get_timestep_primal()).dof_handler; old_grid_u = &(static_cast*> - (previous_timestep)->get_timestep_primal()).u; + (this->previous_timestep)->get_timestep_primal()).u; old_grid_v = &(static_cast*> - (previous_timestep)->get_timestep_primal()).v; + (this->previous_timestep)->get_timestep_primal()).v; break; case dual_problem: - Assert (next_timestep != 0, ExcInternalError()); + Assert (this->next_timestep != 0, ExcInternalError()); old_dof_handler = (static_cast*> - (next_timestep)->get_timestep_dual()).dof_handler; + (this->next_timestep)->get_timestep_dual()).dof_handler; old_grid_u = &(static_cast*> - (next_timestep)->get_timestep_dual()).u; + (this->next_timestep)->get_timestep_dual()).u; old_grid_v = &(static_cast*> - (next_timestep)->get_timestep_dual()).v; + (this->next_timestep)->get_timestep_dual()).v; break; }; @@ -5100,7 +5101,7 @@ std::pair TimeStep_Wave::compute_energy () { std::pair energy; - switch (next_action) + switch (this->next_action) { case primal_problem: energy.first = 0.5*laplace_matrix.matrix_norm_square (u); @@ -5205,39 +5206,39 @@ template void TimeStep_Dual::do_initial_step () { deallog << " Dual problem: time=" << time - << ", step=" << timestep_no - << ", sweep=" << sweep_no + << ", step=" << this->timestep_no + << ", sweep=" << this->sweep_no << ". " - << tria->n_active_cells() << " cells, " - << dof_handler->n_dofs() << " dofs"; + << this->tria->n_active_cells() << " cells, " + << this->dof_handler->n_dofs() << " dofs"; - sweep_info->get_data().dual_dofs += dof_handler->n_dofs() * 2; + this->sweep_info->get_data().dual_dofs += this->dof_handler->n_dofs() * 2; Vector tmp_u_bar, tmp_v_bar; - parameters.dual_functional->reset (*this); - parameters.dual_functional-> + this->parameters.dual_functional->reset (*this); + this->parameters.dual_functional-> compute_endtime_vectors (tmp_u_bar, tmp_v_bar); - u.reinit (tmp_u_bar.size()); - v.reinit (tmp_v_bar.size()); + this->u.reinit (tmp_u_bar.size()); + this->v.reinit (tmp_v_bar.size()); if ((tmp_u_bar.linfty_norm() > 0) || (tmp_v_bar.linfty_norm() > 0)) { - UserMatrix system_matrix (system_sparsity, - parameters.preconditioning); - system_matrix.copy_from (mass_matrix); + UserMatrix system_matrix (this->system_sparsity, + this->parameters.preconditioning); + system_matrix.copy_from (this->mass_matrix); constraints.condense (static_cast&>(system_matrix)); const unsigned int - solver_steps1 = solve (system_matrix, u, tmp_u_bar), - solver_steps2 = solve (system_matrix, v, tmp_v_bar); + solver_steps1 = solve (system_matrix, this->u, tmp_u_bar), + solver_steps2 = solve (system_matrix, this->v, tmp_v_bar); - statistic_data = typename TimeStep_Wave::StatisticData (tria->n_active_cells(), - dof_handler->n_dofs(), + this->statistic_data = typename TimeStep_Wave::StatisticData (this->tria->n_active_cells(), + this->dof_handler->n_dofs(), solver_steps1, solver_steps2, compute_energy ()); } else - statistic_data = typename TimeStep_Wave::StatisticData (tria->n_active_cells(), - dof_handler->n_dofs(), + this->statistic_data = typename TimeStep_Wave::StatisticData (this->tria->n_active_cells(), + this->dof_handler->n_dofs(), 0, 0, std::make_pair (0.0, 0.0)); deallog << "." << std::endl; @@ -5249,42 +5250,42 @@ void TimeStep_Dual::do_timestep () { deallog << " Dual problem: time=" << time - << ", step=" << timestep_no - << ", sweep=" << sweep_no + << ", step=" << this->timestep_no + << ", sweep=" << this->sweep_no << ". " - << tria->n_active_cells() << " cells, " - << dof_handler->n_dofs() << " dofs"; + << this->tria->n_active_cells() << " cells, " + << this->dof_handler->n_dofs() << " dofs"; - sweep_info->get_data().dual_dofs += dof_handler->n_dofs() * 2; + this->sweep_info->get_data().dual_dofs += this->dof_handler->n_dofs() * 2; const double time_step = get_forward_timestep (); - Vector right_hand_side1 (dof_handler->n_dofs()); - Vector right_hand_side2 (dof_handler->n_dofs()); + Vector right_hand_side1 (this->dof_handler->n_dofs()); + Vector right_hand_side2 (this->dof_handler->n_dofs()); Vector old_u, old_v; if (parameters.extrapolate_old_solutions) { - old_u.reinit (dof_handler->n_dofs()); - old_v.reinit (dof_handler->n_dofs()); + old_u.reinit (this->dof_handler->n_dofs()); + old_v.reinit (this->dof_handler->n_dofs()); transfer_old_solutions (old_u, old_v); }; assemble_vectors (right_hand_side1, right_hand_side2); - UserMatrix system_matrix (system_sparsity, parameters.preconditioning); - system_matrix.copy_from (mass_matrix); + UserMatrix system_matrix (this->system_sparsity, parameters.preconditioning); + system_matrix.copy_from (this->mass_matrix); system_matrix.add_scaled (time_step * time_step * - parameters.theta * - parameters.theta, - laplace_matrix); + this->parameters.theta * + this->parameters.theta, + this->laplace_matrix); constraints.condense (static_cast&>(system_matrix)); if (parameters.extrapolate_old_solutions) { - v = old_v; - v.add (time_step, old_u); + this->v = old_v; + this->v.add (time_step, old_u); }; @@ -5293,41 +5294,41 @@ void TimeStep_Dual::do_timestep () { static const ZeroFunction boundary_values; - VectorTools::interpolate_boundary_values (*dof_handler, 0, boundary_values, + VectorTools::interpolate_boundary_values (*this->dof_handler, 0, boundary_values, boundary_value_list); MatrixTools::apply_boundary_values (boundary_value_list, - system_matrix, v, + system_matrix, this->v, right_hand_side1); }; - const unsigned int solver_steps1 = solve (system_matrix, v, right_hand_side1); + const unsigned int solver_steps1 = solve (system_matrix, this->v, right_hand_side1); - system_matrix.copy_from (mass_matrix); - constraints.condense (static_cast&>(system_matrix)); + system_matrix.copy_from (this->mass_matrix); + this->constraints.condense (static_cast&>(system_matrix)); if (true) { Vector tmp (right_hand_side2.size()); - laplace_matrix.vmult (tmp, v); - right_hand_side2.add (-parameters.theta*time_step, tmp); + this->laplace_matrix.vmult (tmp, this->v); + right_hand_side2.add (-this->parameters.theta*time_step, tmp); }; - constraints.condense (right_hand_side2); + this->constraints.condense (right_hand_side2); if (dim != 1) MatrixTools::apply_boundary_values (boundary_value_list, - system_matrix, u, + system_matrix, this->u, right_hand_side2); - if (parameters.extrapolate_old_solutions) + if (this->parameters.extrapolate_old_solutions) { - u = v; - u -= old_v; - u.scale (2./time_step); - u -= old_u; + this->u = this->v; + this->u -= old_v; + this->u.scale (2./time_step); + this->u -= old_u; }; const unsigned int solver_steps2 = solve (system_matrix, u, right_hand_side2); - statistic_data = typename TimeStep_Wave::StatisticData (tria->n_active_cells(), - dof_handler->n_dofs(), + this->statistic_data = typename TimeStep_Wave::StatisticData (this->tria->n_active_cells(), + this->dof_handler->n_dofs(), solver_steps1, solver_steps2, compute_energy ()); @@ -5339,12 +5340,12 @@ void TimeStep_Dual::do_timestep () template void TimeStep_Dual::solve_dual_problem () { - sweep_info->get_timers().dual_problem.start(); - if (next_timestep == 0) + this->sweep_info->get_timers().dual_problem.start(); + if (this->next_timestep == 0) do_initial_step (); else do_timestep (); - sweep_info->get_timers().dual_problem.stop(); + this->sweep_info->get_timers().dual_problem.stop(); } @@ -5360,14 +5361,14 @@ void TimeStep_Dual::wake_up (const unsigned int wakeup_level) { TimeStep_Wave::wake_up (wakeup_level); - sweep_info->get_timers().dual_problem.start(); + this->sweep_info->get_timers().dual_problem.start(); if ((wakeup_level==0) && (next_action==dual_problem)) { Assert (system_sparsity.empty(), ExcInternalError()); create_matrices (); }; - sweep_info->get_timers().dual_problem.stop(); + this->sweep_info->get_timers().dual_problem.stop(); } @@ -5775,7 +5776,7 @@ TimeStep_ErrorEstimation::TimeStep_ErrorEstimation () template void TimeStep_ErrorEstimation::estimate_error () { - sweep_info->get_timers().error_estimation.start(); + this->sweep_info->get_timers().error_estimation.start(); deallog << "[ee]"; @@ -5794,9 +5795,9 @@ void TimeStep_ErrorEstimation::estimate_error () estimated_error_per_cell.end(), 0.0); statistic_data = StatisticData (accumulated_error); - sweep_info->get_data().accumulated_error += accumulated_error; + this->sweep_info->get_data().accumulated_error += accumulated_error; - sweep_info->get_timers().error_estimation.stop(); + this->sweep_info->get_timers().error_estimation.stop(); } @@ -6581,11 +6582,11 @@ TimeStep::TimeStep (const double time, template void TimeStep::wake_up (const unsigned int wakeup_level) { - sweep_info->get_timers().grid_generation.start(); + this->sweep_info->get_timers().grid_generation.start(); TimeStepBase_Wave::wake_up (wakeup_level); - sweep_info->get_timers().grid_generation.stop(); + this->sweep_info->get_timers().grid_generation.stop(); - switch (next_action) + switch (this->next_action) { case primal_problem: TimeStep_Primal::wake_up (wakeup_level); @@ -6619,7 +6620,7 @@ void TimeStep::wake_up (const unsigned int wakeup_level) template void TimeStep::sleep (const unsigned int sleep_level) { - switch (next_action) + switch (this->next_action) { case primal_problem: TimeStep_Primal::sleep (sleep_level); @@ -6649,9 +6650,9 @@ void TimeStep::sleep (const unsigned int sleep_level) Assert (false, ExcInternalError()); }; - sweep_info->get_timers().grid_generation.start(); + this->sweep_info->get_timers().grid_generation.start(); TimeStepBase_Wave::sleep (sleep_level); - sweep_info->get_timers().grid_generation.stop(); + this->sweep_info->get_timers().grid_generation.stop(); } @@ -6730,7 +6731,7 @@ void TimeStep_Postprocess::postprocess_timestep () (parameters.refinement_strategy == WaveParameters::dual_estimator)) estimate_error (); - sweep_info->get_timers().postprocessing.start(); + this->sweep_info->get_timers().postprocessing.start(); statistic_data.evaluation_results.clear(); for (typename std::list*>::const_iterator i = parameters.eval_list.begin(); @@ -6856,7 +6857,7 @@ void TimeStep_Postprocess::postprocess_timestep () deallog << std::endl; - sweep_info->get_timers().postprocessing.stop(); + this->sweep_info->get_timers().postprocessing.stop(); } @@ -6973,8 +6974,8 @@ void TimeStep_Primal::do_initial_step () << dof_handler->n_dofs() << " dofs"; - sweep_info->get_data().cells += tria->n_active_cells(); - sweep_info->get_data().primal_dofs += dof_handler->n_dofs() * 2; + this->sweep_info->get_data().cells += tria->n_active_cells(); + this->sweep_info->get_data().primal_dofs += dof_handler->n_dofs() * 2; #if 2 == 1 VectorTools::interpolate (*dof_handler, *parameters.initial_u, u); @@ -7008,8 +7009,8 @@ void TimeStep_Primal::do_timestep () << tria->n_active_cells() << " cells, " << dof_handler->n_dofs() << " dofs"; - sweep_info->get_data().cells += tria->n_active_cells(); - sweep_info->get_data().primal_dofs += dof_handler->n_dofs() * 2; + this->sweep_info->get_data().cells += tria->n_active_cells(); + this->sweep_info->get_data().primal_dofs += dof_handler->n_dofs() * 2; const double time_step = get_backward_timestep (); @@ -7105,12 +7106,12 @@ if (parameters.extrapolate_old_solutions) template void TimeStep_Primal::solve_primal_problem () { - sweep_info->get_timers().primal_problem.start(); + this->sweep_info->get_timers().primal_problem.start(); if (timestep_no == 0) do_initial_step (); else do_timestep (); - sweep_info->get_timers().primal_problem.stop(); + this->sweep_info->get_timers().primal_problem.stop(); } @@ -7126,14 +7127,14 @@ void TimeStep_Primal::wake_up (const unsigned int wakeup_level) { TimeStep_Wave::wake_up (wakeup_level); - sweep_info->get_timers().primal_problem.start(); + this->sweep_info->get_timers().primal_problem.start(); if ((wakeup_level==0) && (next_action==primal_problem)) { Assert (system_sparsity.empty(), ExcInternalError()); create_matrices (); }; - sweep_info->get_timers().primal_problem.stop(); + this->sweep_info->get_timers().primal_problem.stop(); } -- 2.39.5