From: bangerth Date: Mon, 31 Jul 2006 15:11:06 +0000 (+0000) Subject: Un-hp-ify these codes to test the original functionality of step-1 through step-10 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32c374282477ec6e0c765cc7f0345a1c09daab04;p=dealii-svn.git Un-hp-ify these codes to test the original functionality of step-1 through step-10 git-svn-id: https://svn.dealii.org/trunk@13540 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/step-10.cc b/tests/bits/step-10.cc index 70740b4fb2..83f8e167dd 100644 --- a/tests/bits/step-10.cc +++ b/tests/bits/step-10.cc @@ -85,7 +85,7 @@ void compute_pi_by_area () deallog << "Computation of Pi by the area:" << std::endl << "==============================" << std::endl; - const hp::QCollection quadrature(QGauss(4)); + const QGauss quadrature (4); for (unsigned int degree=1; degree<5; ++degree) { @@ -97,14 +97,13 @@ void compute_pi_by_area () static const HyperBallBoundary boundary; triangulation.set_boundary (0, boundary); - MappingQ m(degree); - const hp::MappingCollection mapping (m); + MappingQ mapping(degree); - const hp::FECollection dummy_fe (FE_Q(1)); + const FE_Q dummy_fe (1); - hp::DoFHandler dof_handler (triangulation); + DoFHandler dof_handler (triangulation); - hp::FEValues x_fe_values (mapping, dummy_fe, quadrature, + FEValues x_fe_values (mapping, dummy_fe, quadrature, update_JxW_values); ConvergenceTable table; @@ -118,7 +117,7 @@ void compute_pi_by_area () long double area = 0; - typename hp::DoFHandler::active_cell_iterator + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -153,7 +152,7 @@ void compute_pi_by_perimeter () deallog << "Computation of Pi by the perimeter:" << std::endl << "===================================" << std::endl; - const hp::QCollection quadrature(QGauss(4)); + const QGauss quadrature (4); for (unsigned int degree=1; degree<5; ++degree) { @@ -164,13 +163,12 @@ void compute_pi_by_perimeter () static const HyperBallBoundary boundary; triangulation.set_boundary (0, boundary); - const MappingQ m (degree); - const hp::MappingCollection mapping(m); - const hp::FECollection fe (FE_Q(1)); + const MappingQ mapping (degree); + const FE_Q fe (1); - hp::DoFHandler dof_handler (triangulation); + DoFHandler dof_handler (triangulation); - hp::FEFaceValues x_fe_face_values (mapping, fe, quadrature, + FEFaceValues x_fe_face_values (mapping, fe, quadrature, update_JxW_values); ConvergenceTable table; @@ -181,7 +179,7 @@ void compute_pi_by_perimeter () dof_handler.distribute_dofs (fe); - typename hp::DoFHandler::active_cell_iterator + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); long double perimeter = 0; diff --git a/tests/bits/step-2.cc b/tests/bits/step-2.cc index 519c053ac1..2acbc9c453 100644 --- a/tests/bits/step-2.cc +++ b/tests/bits/step-2.cc @@ -72,9 +72,9 @@ void make_grid (Triangulation<2> &triangulation) } -void distribute_dofs (hp::DoFHandler<2> &dof_handler) +void distribute_dofs (DoFHandler<2> &dof_handler) { - static const hp::FECollection<2> finite_element(FE_Q<2>(1)); + static const FE_Q<2> finite_element(1); dof_handler.distribute_dofs (finite_element); SparsityPattern sparsity_pattern (dof_handler.n_dofs(), @@ -89,7 +89,7 @@ void distribute_dofs (hp::DoFHandler<2> &dof_handler) -void renumber_dofs (hp::DoFHandler<2> &dof_handler) +void renumber_dofs (DoFHandler<2> &dof_handler) { DoFRenumbering::Cuthill_McKee (dof_handler); SparsityPattern sparsity_pattern (dof_handler.n_dofs(), @@ -116,7 +116,7 @@ int main () Triangulation<2> triangulation; make_grid (triangulation); - hp::DoFHandler<2> dof_handler (triangulation); + DoFHandler<2> dof_handler (triangulation); distribute_dofs (dof_handler); renumber_dofs (dof_handler); diff --git a/tests/bits/step-3.cc b/tests/bits/step-3.cc index cf03776bb0..85815617f4 100644 --- a/tests/bits/step-3.cc +++ b/tests/bits/step-3.cc @@ -64,8 +64,8 @@ class LaplaceProblem void output_results () const; Triangulation<2> triangulation; - hp::FECollection<2> fe; - hp::DoFHandler<2> dof_handler; + FE_Q<2> fe; + DoFHandler<2> dof_handler; SparsityPattern sparsity_pattern; SparseMatrix system_matrix; @@ -76,7 +76,7 @@ class LaplaceProblem LaplaceProblem::LaplaceProblem () : - fe (FE_Q<2>(1)), + fe (1), dof_handler (triangulation) {} @@ -114,19 +114,19 @@ void LaplaceProblem::make_grid_and_dofs () void LaplaceProblem::assemble_system () { - hp::QCollection<2> quadrature_formula(QGauss<2>(2)); - hp::FEValues<2> x_fe_values (fe, quadrature_formula, + QGauss<2> quadrature_formula(2); + FEValues<2> x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_JxW_values); - const unsigned int dofs_per_cell = fe[0].dofs_per_cell; - const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points; + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.n_quadrature_points; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); std::vector local_dof_indices (dofs_per_cell); - hp::DoFHandler<2>::active_cell_iterator + DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -190,7 +190,7 @@ void LaplaceProblem::solve () void LaplaceProblem::output_results () const { - DataOut<2,hp::DoFHandler<2> > data_out; + DataOut<2,DoFHandler<2> > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); diff --git a/tests/bits/step-3a.cc b/tests/bits/step-3a.cc index 755fbcf9a4..80f076c133 100644 --- a/tests/bits/step-3a.cc +++ b/tests/bits/step-3a.cc @@ -67,7 +67,7 @@ class LaplaceProblem Triangulation<2> triangulation; hp::FECollection<2> fe; - hp::DoFHandler<2> dof_handler; + DoFHandler<2> dof_handler; SparsityPattern sparsity_pattern; SparseMatrix system_matrix; @@ -99,7 +99,7 @@ void LaplaceProblem::make_grid_and_dofs () << triangulation.n_cells() << std::endl; - hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (), + DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (), endc = dof_handler.end (); unsigned int cell_no = 0; @@ -149,7 +149,7 @@ void LaplaceProblem::make_grid_and_dofs () void LaplaceProblem::assemble_system () { hp::QCollection<2> quadrature_formula(QGauss<2>(6)); - hp::FEValues<2> x_fe_values (fe, quadrature_formula, + FEValues<2> x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_JxW_values); const unsigned int max_dofs_per_cell = fe.max_dofs_per_cell (); @@ -160,7 +160,7 @@ void LaplaceProblem::assemble_system () std::vector local_dof_indices (max_dofs_per_cell); - hp::DoFHandler<2>::active_cell_iterator + DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -234,7 +234,7 @@ void LaplaceProblem::solve () void LaplaceProblem::output_results () const { - DataOut<2,hp::DoFHandler<2> > data_out; + DataOut<2,DoFHandler<2> > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); diff --git a/tests/bits/step-3b.cc b/tests/bits/step-3b.cc index 10950992bd..01a271d561 100644 --- a/tests/bits/step-3b.cc +++ b/tests/bits/step-3b.cc @@ -67,7 +67,7 @@ class LaplaceProblem Triangulation<2> triangulation; hp::FECollection<2> fe; - hp::DoFHandler<2> dof_handler; + DoFHandler<2> dof_handler; SparsityPattern sparsity_pattern; SparseMatrix system_matrix; @@ -99,7 +99,7 @@ void LaplaceProblem::make_grid_and_dofs () << triangulation.n_cells() << std::endl; - hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (), + DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (), endc = dof_handler.end (); unsigned int cell_no = 0; @@ -146,7 +146,7 @@ void LaplaceProblem::make_grid_and_dofs () void LaplaceProblem::assemble_system () { hp::QCollection<2> quadrature_formula(QGauss<2>(6)); - hp::FEValues<2> x_fe_values (fe, quadrature_formula, + FEValues<2> x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_JxW_values); const unsigned int max_dofs_per_cell = fe.max_dofs_per_cell (); @@ -157,7 +157,7 @@ void LaplaceProblem::assemble_system () std::vector local_dof_indices (max_dofs_per_cell); - hp::DoFHandler<2>::active_cell_iterator + DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -231,7 +231,7 @@ void LaplaceProblem::solve () void LaplaceProblem::output_results () const { - DataOut<2,hp::DoFHandler<2> > data_out; + DataOut<2,DoFHandler<2> > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); diff --git a/tests/bits/step-3c.cc b/tests/bits/step-3c.cc index b2737bffc2..cc32b64cff 100644 --- a/tests/bits/step-3c.cc +++ b/tests/bits/step-3c.cc @@ -66,7 +66,7 @@ class LaplaceProblem Triangulation<2> triangulation; hp::FECollection<2> fe; - hp::DoFHandler<2> dof_handler; + DoFHandler<2> dof_handler; SparsityPattern sparsity_pattern; SparseMatrix system_matrix; @@ -98,7 +98,7 @@ void LaplaceProblem::make_grid_and_dofs () << triangulation.n_cells() << std::endl; - hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (), + DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (), endc = dof_handler.end (); unsigned int cell_no = 0; @@ -149,7 +149,7 @@ void LaplaceProblem::assemble_system () for (unsigned int p = 0; p < fe.size (); ++p) quadrature_formula.push_back (QGauss<2> (p + 2)); - hp::FEValues<2> x_fe_values (fe, quadrature_formula, + FEValues<2> x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_JxW_values); const unsigned int max_dofs_per_cell = fe.max_dofs_per_cell (); @@ -159,7 +159,7 @@ void LaplaceProblem::assemble_system () std::vector local_dof_indices (max_dofs_per_cell); - hp::DoFHandler<2>::active_cell_iterator + DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -233,7 +233,7 @@ void LaplaceProblem::solve () void LaplaceProblem::output_results () const { - DataOut<2,hp::DoFHandler<2> > data_out; + DataOut<2,DoFHandler<2> > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); diff --git a/tests/bits/step-4.cc b/tests/bits/step-4.cc index 07b6d55a8c..83a56964bd 100644 --- a/tests/bits/step-4.cc +++ b/tests/bits/step-4.cc @@ -61,8 +61,8 @@ class LaplaceProblem void output_results () const; Triangulation triangulation; - hp::FECollection fe; - hp::DoFHandler dof_handler; + FE_Q fe; + DoFHandler dof_handler; SparsityPattern sparsity_pattern; SparseMatrix system_matrix; @@ -125,7 +125,7 @@ double BoundaryValues::value (const Point &p, template LaplaceProblem::LaplaceProblem () : - fe (FE_Q(1)), + fe (1), dof_handler (triangulation) {} @@ -167,23 +167,23 @@ void LaplaceProblem::make_grid_and_dofs () template void LaplaceProblem::assemble_system () { - hp::QCollection quadrature_formula(QGauss(2)); + QGauss quadrature_formula (2); const RightHandSide right_hand_side; - hp::FEValues x_fe_values (fe, quadrature_formula, + FEValues x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_q_points | update_JxW_values); - const unsigned int dofs_per_cell = fe[0].dofs_per_cell; - const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points; + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.n_quadrature_points; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); std::vector local_dof_indices (dofs_per_cell); - typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) { @@ -251,7 +251,7 @@ void LaplaceProblem::solve () template void LaplaceProblem::output_results () const { - DataOut > data_out; + DataOut > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); diff --git a/tests/bits/step-5.cc b/tests/bits/step-5.cc index d951e334c7..96c7d3642f 100644 --- a/tests/bits/step-5.cc +++ b/tests/bits/step-5.cc @@ -63,8 +63,8 @@ class LaplaceProblem void output_results (const unsigned int cycle) const; Triangulation triangulation; - hp::FECollection fe; - hp::DoFHandler dof_handler; + FE_Q fe; + DoFHandler dof_handler; SparsityPattern sparsity_pattern; SparseMatrix system_matrix; @@ -131,7 +131,7 @@ void Coefficient::value_list (const std::vector > &points, template LaplaceProblem::LaplaceProblem () : - fe (FE_Q(1)), + fe (1), dof_handler (triangulation) {} @@ -165,14 +165,14 @@ void LaplaceProblem::setup_system () template void LaplaceProblem::assemble_system () { - hp::QCollection quadrature_formula(QGauss(2)); + QGauss quadrature_formula (2); - hp::FEValues x_fe_values (fe, quadrature_formula, + FEValues x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_q_points | update_JxW_values); - const unsigned int dofs_per_cell = fe[0].dofs_per_cell; - const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points; + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.n_quadrature_points; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); @@ -182,7 +182,7 @@ void LaplaceProblem::assemble_system () const Coefficient coefficient; std::vector coefficient_values (n_q_points); - typename hp::DoFHandler::active_cell_iterator + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -262,7 +262,7 @@ void LaplaceProblem::output_results (const unsigned int cycle) const if (cycle >= 2) return; - DataOut > data_out; + DataOut > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); diff --git a/tests/bits/step-6.cc b/tests/bits/step-6.cc index 5d74a891f6..8b01cec620 100644 --- a/tests/bits/step-6.cc +++ b/tests/bits/step-6.cc @@ -75,8 +75,8 @@ class LaplaceProblem Triangulation triangulation; - hp::DoFHandler dof_handler; - hp::FECollection fe; + DoFHandler dof_handler; + FE_Q fe; ConstraintMatrix hanging_node_constraints; @@ -146,7 +146,7 @@ void Coefficient::value_list (const std::vector > &points, template LaplaceProblem::LaplaceProblem () : dof_handler (triangulation), - fe (FE_Q(2)) + fe (2) {} @@ -190,14 +190,14 @@ void LaplaceProblem::setup_system () template void LaplaceProblem::assemble_system () { - const hp::QCollection quadrature_formula(QGauss(3)); + const QGauss quadrature_formula (3); - hp::FEValues x_fe_values (fe, quadrature_formula, + FEValues x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_q_points | update_JxW_values); - const unsigned int dofs_per_cell = fe[0].dofs_per_cell; - const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points; + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.n_quadrature_points; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); @@ -207,7 +207,7 @@ void LaplaceProblem::assemble_system () const Coefficient coefficient; std::vector coefficient_values (n_q_points); - typename hp::DoFHandler::active_cell_iterator + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -359,7 +359,7 @@ void LaplaceProblem::run () DataOutBase::EpsFlags eps_flags; eps_flags.z_scaling = 4; - DataOut > data_out; + DataOut > data_out; data_out.set_flags (eps_flags); data_out.attach_dof_handler (dof_handler); diff --git a/tests/bits/step-7.cc b/tests/bits/step-7.cc index 54fe31358b..98b322e515 100644 --- a/tests/bits/step-7.cc +++ b/tests/bits/step-7.cc @@ -179,7 +179,7 @@ class HelmholtzProblem global_refinement, adaptive_refinement }; - HelmholtzProblem (const hp::FECollection &fe, + HelmholtzProblem (const FiniteElement &fe, const RefinementMode refinement_mode); ~HelmholtzProblem (); @@ -194,9 +194,9 @@ class HelmholtzProblem void process_solution (const unsigned int cycle); Triangulation triangulation; - hp::DoFHandler dof_handler; + DoFHandler dof_handler; - SmartPointer > fe; + SmartPointer > fe; ConstraintMatrix hanging_node_constraints; @@ -215,7 +215,7 @@ class HelmholtzProblem template -HelmholtzProblem::HelmholtzProblem (const hp::FECollection &fe, +HelmholtzProblem::HelmholtzProblem (const FiniteElement &fe, const RefinementMode refinement_mode) : dof_handler (triangulation), fe (&fe), @@ -261,24 +261,24 @@ void HelmholtzProblem::setup_system () template void HelmholtzProblem::assemble_system () { - hp::QCollection quadrature_formula(QGauss(3)); - hp::QCollection face_quadrature_formula(QGauss(3)); + QGauss quadrature_formula (3); + QGauss face_quadrature_formula (3); - const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points; - const unsigned int n_face_q_points = face_quadrature_formula[0].n_quadrature_points; + const unsigned int n_q_points = quadrature_formula.n_quadrature_points; + const unsigned int n_face_q_points = face_quadrature_formula.n_quadrature_points; - const unsigned int dofs_per_cell = (*fe)[0].dofs_per_cell; + const unsigned int dofs_per_cell = (*fe).dofs_per_cell; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); std::vector local_dof_indices (dofs_per_cell); - hp::FEValues x_fe_values (*fe, quadrature_formula, + FEValues x_fe_values (*fe, quadrature_formula, update_values | update_gradients | update_q_points | update_JxW_values); - hp::FEFaceValues x_fe_face_values (*fe, face_quadrature_formula, + FEFaceValues x_fe_face_values (*fe, face_quadrature_formula, update_values | update_q_points | update_normal_vectors | update_JxW_values); @@ -287,7 +287,7 @@ void HelmholtzProblem::assemble_system () const Solution exact_solution; - typename hp::DoFHandler::active_cell_iterator + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) @@ -432,7 +432,7 @@ void HelmholtzProblem::process_solution (const unsigned int cycle) solution, Solution(), difference_per_cell, - hp::QCollection(QGauss(3)), + QGauss(3), VectorTools::L2_norm); const double L2_error = difference_per_cell.l2_norm(); @@ -440,7 +440,7 @@ void HelmholtzProblem::process_solution (const unsigned int cycle) solution, Solution(), difference_per_cell, - hp::QCollection(QGauss(3)), + QGauss(3), VectorTools::H1_seminorm); const double H1_error = difference_per_cell.l2_norm(); @@ -450,7 +450,7 @@ void HelmholtzProblem::process_solution (const unsigned int cycle) solution, Solution(), difference_per_cell, - hp::QCollection(q_iterated), + q_iterated, VectorTools::Linfty_norm); const double Linfty_error = difference_per_cell.linfty_norm(); @@ -526,7 +526,7 @@ void HelmholtzProblem::run () Assert (false, ExcNotImplemented()); } - switch ((*fe)[0].degree) + switch ((*fe).degree) { case 1: gmv_filename += "-q1"; @@ -541,11 +541,11 @@ void HelmholtzProblem::run () gmv_filename += ".gmv"; - DataOut > data_out; + DataOut > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); - data_out.build_patches ((*fe)[0].degree); + data_out.build_patches ((*fe).degree); data_out.write_gmv (deallog.get_file_stream()); } @@ -584,7 +584,7 @@ void HelmholtzProblem::run () Assert (false, ExcNotImplemented()); } - switch ((*fe)[0].degree) + switch ((*fe).degree) { case 1: error_filename += "-q1"; @@ -635,7 +635,7 @@ void HelmholtzProblem::run () default: Assert (false, ExcNotImplemented()); } - switch ((*fe)[0].degree) + switch ((*fe).degree) { case 1: conv_filename += "-q1"; @@ -673,7 +673,7 @@ int main () << "=============================================" << std::endl << std::endl; - hp::FECollection fe(FE_Q(1)); + FE_Q fe(1); HelmholtzProblem helmholtz_problem_2d (fe, HelmholtzProblem::adaptive_refinement); @@ -687,7 +687,7 @@ int main () << "===========================================" << std::endl << std::endl; - hp::FECollection fe(FE_Q(1)); + FE_Q fe(1); HelmholtzProblem helmholtz_problem_2d (fe, HelmholtzProblem::global_refinement); @@ -701,7 +701,7 @@ int main () << "===========================================" << std::endl << std::endl; - hp::FECollection fe(FE_Q(2)); + FE_Q fe(2); HelmholtzProblem helmholtz_problem_2d (fe, HelmholtzProblem::global_refinement); diff --git a/tests/bits/step-8.cc b/tests/bits/step-8.cc index 43b6c94dc1..b628ee38cd 100644 --- a/tests/bits/step-8.cc +++ b/tests/bits/step-8.cc @@ -68,9 +68,9 @@ class ElasticProblem void output_results (const unsigned int cycle) const; Triangulation triangulation; - hp::DoFHandler dof_handler; + DoFHandler dof_handler; - hp::FECollection fe; + FESystem fe; ConstraintMatrix hanging_node_constraints; @@ -154,7 +154,7 @@ template ElasticProblem::ElasticProblem () : dof_handler (triangulation), - fe (FESystem(FE_Q(1), dim)) + fe (FE_Q(1), dim) {} @@ -196,14 +196,14 @@ void ElasticProblem::setup_system () template void ElasticProblem::assemble_system () { - hp::QCollection quadrature_formula(QGauss(2)); + QGauss quadrature_formula (2); - hp::FEValues x_fe_values (fe, quadrature_formula, + FEValues x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_q_points | update_JxW_values); - const unsigned int dofs_per_cell = fe[0].dofs_per_cell; - const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points; + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.n_quadrature_points; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); @@ -220,7 +220,7 @@ void ElasticProblem::assemble_system () Vector(dim)); - typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell!=endc; ++cell) { @@ -239,12 +239,12 @@ void ElasticProblem::assemble_system () for (unsigned int i=0; i::assemble_system () for (unsigned int i=0; i::output_results (const unsigned int cycle) const filename += ".gmv"; - DataOut > data_out; + DataOut > data_out; data_out.attach_dof_handler (dof_handler); diff --git a/tests/bits/step-9.cc b/tests/bits/step-9.cc index c82cfd78a1..f45d9da226 100644 --- a/tests/bits/step-9.cc +++ b/tests/bits/step-9.cc @@ -73,17 +73,17 @@ class AdvectionProblem private: void setup_system (); void assemble_system (); - void assemble_system_interval (const typename hp::DoFHandler::active_cell_iterator &begin, - const typename hp::DoFHandler::active_cell_iterator &end); + void assemble_system_interval (const typename DoFHandler::active_cell_iterator &begin, + const typename DoFHandler::active_cell_iterator &end); void solve (); void refine_grid (); void output_results (const unsigned int cycle) const; Triangulation triangulation; - hp::DoFHandler dof_handler; + DoFHandler dof_handler; - hp::FECollection fe; + FE_Q fe; ConstraintMatrix hanging_node_constraints; @@ -255,7 +255,7 @@ class GradientEstimation { public: template - static void estimate (const hp::DoFHandler &dof, + static void estimate (const DoFHandler &dof, const Vector &solution, Vector &error_per_cell); @@ -269,7 +269,7 @@ class GradientEstimation typedef std::pair IndexInterval; template - static void estimate_interval (const hp::DoFHandler &dof, + static void estimate_interval (const DoFHandler &dof, const Vector &solution, const IndexInterval &index_interval, Vector &error_per_cell); @@ -282,7 +282,7 @@ class GradientEstimation template AdvectionProblem::AdvectionProblem () : dof_handler (triangulation), - fe(FE_Q(1)) + fe(1) {} @@ -328,7 +328,7 @@ void AdvectionProblem::assemble_system () const unsigned int n_threads = multithread_info.n_default_threads; Threads::ThreadGroup<> threads; - typedef typename hp::DoFHandler::active_cell_iterator active_cell_iterator; + typedef typename DoFHandler::active_cell_iterator active_cell_iterator; std::vector > thread_ranges = Threads::split_range (dof_handler.begin_active (), @@ -352,26 +352,26 @@ void AdvectionProblem::assemble_system () template void AdvectionProblem:: -assemble_system_interval (const typename hp::DoFHandler::active_cell_iterator &begin, - const typename hp::DoFHandler::active_cell_iterator &end) +assemble_system_interval (const typename DoFHandler::active_cell_iterator &begin, + const typename DoFHandler::active_cell_iterator &end) { const AdvectionField advection_field; const RightHandSide right_hand_side; const BoundaryValues boundary_values; - hp::QCollection quadrature_formula(QGauss(2)); - hp::QCollection face_quadrature_formula(QGauss(2)); + QGauss quadrature_formula (2); + QGauss face_quadrature_formula (2); - hp::FEValues x_fe_values (fe, quadrature_formula, + FEValues x_fe_values (fe, quadrature_formula, update_values | update_gradients | update_q_points | update_JxW_values); - hp::FEFaceValues x_fe_face_values (fe, face_quadrature_formula, + FEFaceValues x_fe_face_values (fe, face_quadrature_formula, update_values | update_q_points | update_JxW_values | update_normal_vectors); const unsigned int dofs_per_cell = fe[0].dofs_per_cell; - const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points; - const unsigned int n_face_q_points = face_quadrature_formula[0].n_quadrature_points; + const unsigned int n_q_points = quadrature_formula.n_quadrature_points; + const unsigned int n_face_q_points = face_quadrature_formula.n_quadrature_points; FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); @@ -383,7 +383,7 @@ assemble_system_interval (const typename hp::DoFHandler::active_cell_iterat std::vector face_boundary_values (n_face_q_points); std::vector > face_advection_directions (n_face_q_points); - typename hp::DoFHandler::active_cell_iterator cell; + typename DoFHandler::active_cell_iterator cell; for (cell=begin; cell!=end; ++cell) { cell_matrix = 0; @@ -546,7 +546,7 @@ void AdvectionProblem::run () output_results (cycle); }; - DataOut > data_out; + DataOut > data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); @@ -559,7 +559,7 @@ void AdvectionProblem::run () template void -GradientEstimation::estimate (const hp::DoFHandler &dof_handler, +GradientEstimation::estimate (const DoFHandler &dof_handler, const Vector &solution, Vector &error_per_cell) { @@ -573,7 +573,7 @@ GradientEstimation::estimate (const hp::DoFHandler &dof_handler, n_threads); Threads::ThreadGroup<> threads; - void (*estimate_interval_ptr) (const hp::DoFHandler &, + void (*estimate_interval_ptr) (const DoFHandler &, const Vector &, const IndexInterval &, Vector &) @@ -588,20 +588,19 @@ GradientEstimation::estimate (const hp::DoFHandler &dof_handler, template void -GradientEstimation::estimate_interval (const hp::DoFHandler &dof_handler, +GradientEstimation::estimate_interval (const DoFHandler &dof_handler, const Vector &solution, const IndexInterval &index_interval, Vector &error_per_cell) { - QMidpoint xmidpoint; - hp::QCollection midpoint_rule (xmidpoint); - hp::FEValues x_fe_midpoint_value (dof_handler.get_fe(), + QMidpoint midpoint_rule; + FEValues x_fe_midpoint_value (dof_handler.get_fe(), midpoint_rule, update_values | update_q_points); Tensor<2,dim> Y; - typename hp::DoFHandler::active_cell_iterator cell, endc; + typename DoFHandler::active_cell_iterator cell, endc; cell = dof_handler.begin_active(); advance (cell, static_cast(index_interval.first)); @@ -613,7 +612,7 @@ GradientEstimation::estimate_interval (const hp::DoFHandler &dof_handler, error_on_this_cell = error_per_cell.begin() + index_interval.first; - std::vector::active_cell_iterator> active_neighbors; + std::vector::active_cell_iterator> active_neighbors; active_neighbors.reserve (GeometryInfo::faces_per_cell * GeometryInfo::subfaces_per_face); @@ -631,9 +630,9 @@ GradientEstimation::estimate_interval (const hp::DoFHandler &dof_handler, for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) if (! cell->at_boundary(face_no)) { - const typename hp::DoFHandler::face_iterator + const typename DoFHandler::face_iterator face = cell->face(face_no); - const typename hp::DoFHandler::cell_iterator + const typename DoFHandler::cell_iterator neighbor = cell->neighbor(face_no); if (neighbor->active()) @@ -642,7 +641,7 @@ GradientEstimation::estimate_interval (const hp::DoFHandler &dof_handler, { if (dim == 1) { - typename hp::DoFHandler::cell_iterator + typename DoFHandler::cell_iterator neighbor_child = neighbor; while (neighbor_child->has_children()) neighbor_child = neighbor_child->child (face_no==0 ? 1 : 0); @@ -666,11 +665,11 @@ GradientEstimation::estimate_interval (const hp::DoFHandler &dof_handler, std::vector neighbor_midpoint_value(1); - typename std::vector::active_cell_iterator>::const_iterator + typename std::vector::active_cell_iterator>::const_iterator neighbor_ptr = active_neighbors.begin(); for (; neighbor_ptr!=active_neighbors.end(); ++neighbor_ptr) { - const typename hp::DoFHandler::active_cell_iterator + const typename DoFHandler::active_cell_iterator neighbor = *neighbor_ptr; x_fe_midpoint_value.reinit (neighbor); diff --git a/tests/bits/step-9/cmp/i686-pc-linux-gnu+gcc4.1 b/tests/bits/step-9/cmp/i686-pc-linux-gnu+gcc4.1 index 217f826392..01d0d43752 100644 --- a/tests/bits/step-9/cmp/i686-pc-linux-gnu+gcc4.1 +++ b/tests/bits/step-9/cmp/i686-pc-linux-gnu+gcc4.1 @@ -1045,7 +1045,7 @@ DEAL::Cycle 1: DEAL:: Number of active cells: 643 DEAL:: Number of degrees of freedom: 793 DEAL:Bicgstab::Starting value 0.26 -DEAL:Bicgstab::Convergence step 85 value 0 +DEAL:Bicgstab::Convergence step 88 value 0 %!PS-Adobe-2.0 EPSF-1.2 %%Title: deal.II Output %%Creator: the deal.II library @@ -3427,7 +3427,7 @@ DEAL::Cycle 2: DEAL:: Number of active cells: 1663 DEAL:: Number of degrees of freedom: 1946 DEAL:Bicgstab::Starting value 0.20 -DEAL:Bicgstab::Convergence step 117 value 0 +DEAL:Bicgstab::Convergence step 116 value 0 %!PS-Adobe-2.0 EPSF-1.2 %%Title: deal.II Output %%Creator: the deal.II library