From 6149d5acc0731d26b3ec3c9d1652e7640a1a32c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 7 May 2001 09:02:43 +0000 Subject: [PATCH] Use the dummy constructor of the quadrature class with invalid weights. git-svn-id: https://svn.dealii.org/trunk@4547 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/dof_tools.cc | 8 +++++--- deal.II/deal.II/source/fe/fe.cc | 5 ++--- deal.II/deal.II/source/fe/fe_tools.cc | 7 +++---- deal.II/deal.II/source/grid/grid_out.cc | 5 ++--- deal.II/deal.II/source/numerics/vectors.cc | 7 ++----- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index d41c0ea1a6..7133f80b2d 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -2013,9 +2013,11 @@ DoFTools::map_dofs_to_support_points (const Mapping &mapping, // the unit support points to // enquire the location of the // support points in real space - Quadrature q_dummy(dof_handler.get_fe().get_unit_support_points(), - std::vector (dofs_per_cell, - 1./dofs_per_cell)); + // + // the weights of the quadrature + // rule are set to invalid values + // by the used constructor. + Quadrature q_dummy(dof_handler.get_fe().get_unit_support_points()); FEValues fe_values (mapping, dof_handler.get_fe(), q_dummy, update_q_points); typename DoFHandler::active_cell_iterator diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index ee67870c5c..5a2378127c 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -53,7 +53,6 @@ InternalDataBase::initialize_2nd (const FiniteElement *element, // FEValues objects with slightly // shifted positions std::vector > diff_points (quadrature.n_quadrature_points); - std::vector diff_weights (quadrature.n_quadrature_points, 0); differences.resize(2*dim); for (unsigned int d=0; d *element, // gradients, not more for (unsigned int i=0; i plus_quad (diff_points, diff_weights); + const Quadrature plus_quad (diff_points); differences[d] = new FEValues (mapping, *element, plus_quad, update_gradients); // now same in minus-direction for (unsigned int i=0; i minus_quad (diff_points, diff_weights); + const Quadrature minus_quad (diff_points); differences[d+dim] = new FEValues (mapping, *element, minus_quad, update_gradients); } diff --git a/deal.II/deal.II/source/fe/fe_tools.cc b/deal.II/deal.II/source/fe/fe_tools.cc index 2c6ba570f3..6c68063eba 100644 --- a/deal.II/deal.II/source/fe/fe_tools.cc +++ b/deal.II/deal.II/source/fe/fe_tools.cc @@ -49,11 +49,9 @@ void FETools::get_interpolation_matrix(const FiniteElement &fe1, // Initialize FEValues for fe1 at // the unit support points of the // fe2 element. - std::vector phantom_weights(fe2.dofs_per_cell,1.); const typename std::vector > & fe2_support_points = fe2.get_unit_support_points (); - Quadrature fe2_support_points_quadrature(fe2_support_points, - phantom_weights); + Quadrature fe2_support_points_quadrature(fe2_support_points); // This is a bad workaround as we // can't ask the FEs for their @@ -67,7 +65,8 @@ void FETools::get_interpolation_matrix(const FiniteElement &fe1, GridGenerator::hyper_cube(tria); dof_handler.distribute_dofs(fe1); MappingQ1 mapping_q1; - FEValues fe_values(mapping_q1, fe1, fe2_support_points_quadrature, update_values); + FEValues fe_values(mapping_q1, fe1, fe2_support_points_quadrature, + update_values); fe_values.reinit(dof_handler.begin_active()); for (unsigned int i=0; i &tria, for (unsigned int i=0; i quadrature(boundary_points, std::vector (n_points, 1)); + Quadrature quadrature(boundary_points); q_projector = new QProjector (quadrature, false); } @@ -604,8 +604,7 @@ void GridOut::write_eps (const Triangulation &tria, for (unsigned int i=0; i quadrature (boundary_points, - std::vector (n_points, 1)); + Quadrature quadrature (boundary_points); QProjector q_projector (quadrature, false); // next loop over all diff --git a/deal.II/deal.II/source/numerics/vectors.cc b/deal.II/deal.II/source/numerics/vectors.cc index 43494b7ab2..5ad71bfa5f 100644 --- a/deal.II/deal.II/source/numerics/vectors.cc +++ b/deal.II/deal.II/source/numerics/vectors.cc @@ -147,8 +147,6 @@ void VectorTools::interpolate (const Mapping &mapping, Assert(dof_to_rep_index_table.size()==fe.dofs_per_cell, ExcInternalError()); std::vector dofs_on_cell (fe.dofs_per_cell); - std::vector dummy_weights (fe.dofs_per_cell); - std::vector > rep_points (n_rep_points); // get space for the values of the @@ -163,7 +161,7 @@ void VectorTools::interpolate (const Mapping &mapping, // Make a quadrature rule from support points // to feed it into FEValues - Quadrature support_quadrature(unit_support_points, dummy_weights); + Quadrature support_quadrature(unit_support_points); // Transformed support points are computed by // FEValues @@ -703,8 +701,7 @@ VectorTools::interpolate_boundary_values (const Mapping &mapping // used in this function Assert (unit_support_points.size() != 0, ExcNonInterpolatingFE()); - std::vector dummy_weights (unit_support_points.size()); - Quadrature aux_quad (unit_support_points, dummy_weights); + Quadrature aux_quad (unit_support_points); FEFaceValues fe_values (mapping, fe, aux_quad, update_q_points); typename DoFHandler::active_cell_iterator cell = dof.begin_active(), -- 2.39.5