]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use the dummy constructor of the quadrature class with invalid weights.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 7 May 2001 09:02:43 +0000 (09:02 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 7 May 2001 09:02:43 +0000 (09:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@4547 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_tools.cc
deal.II/deal.II/source/fe/fe.cc
deal.II/deal.II/source/fe/fe_tools.cc
deal.II/deal.II/source/grid/grid_out.cc
deal.II/deal.II/source/numerics/vectors.cc

index d41c0ea1a6d5311b129ae122830fe4f1a4441b39..7133f80b2d04e76a56c331f2a7039c5f9c51fa2f 100644 (file)
@@ -2013,9 +2013,11 @@ DoFTools::map_dofs_to_support_points (const Mapping<dim>       &mapping,
                                   // the unit support points to
                                   // enquire the location of the
                                   // support points in real space
-  Quadrature<dim> q_dummy(dof_handler.get_fe().get_unit_support_points(),
-                         std::vector<double> (dofs_per_cell,
-                                              1./dofs_per_cell));
+                                  //
+                                  // the weights of the quadrature
+                                  // rule are set to invalid values
+                                  // by the used constructor.
+  Quadrature<dim> q_dummy(dof_handler.get_fe().get_unit_support_points());
   FEValues<dim> fe_values (mapping, dof_handler.get_fe(),
                           q_dummy, update_q_points);
   typename DoFHandler<dim>::active_cell_iterator
index ee67870c5c62f92af4399cdd62847245f3f81a98..5a2378127c932eca785d1674fc2a4828d003a86d 100644 (file)
@@ -53,7 +53,6 @@ InternalDataBase::initialize_2nd (const FiniteElement<dim> *element,
                                   // FEValues objects with slightly
                                   // shifted positions
   std::vector<Point<dim> > diff_points (quadrature.n_quadrature_points);
-  std::vector<double>      diff_weights (quadrature.n_quadrature_points, 0);
   
   differences.resize(2*dim);
   for (unsigned int d=0; d<dim; ++d)
@@ -69,14 +68,14 @@ InternalDataBase::initialize_2nd (const FiniteElement<dim> *element,
                                       // gradients, not more
       for (unsigned int i=0; i<diff_points.size(); ++i)
        diff_points[i] = quadrature.point(i) + shift;
-      const Quadrature<dim> plus_quad (diff_points, diff_weights);
+      const Quadrature<dim> plus_quad (diff_points);
       differences[d] = new FEValues<dim> (mapping, *element,
                                          plus_quad, update_gradients);
 
                                       // now same in minus-direction
       for (unsigned int i=0; i<diff_points.size(); ++i)
        diff_points[i] = quadrature.point(i) - shift;
-      const Quadrature<dim> minus_quad (diff_points, diff_weights);
+      const Quadrature<dim> minus_quad (diff_points);
       differences[d+dim] = new FEValues<dim> (mapping, *element,
                                              minus_quad, update_gradients); 
     }
index 2c6ba570f35ac34ad44f57e1575368f9bf9d045c..6c68063eba2cf27112f8c98000cb733841c6a323 100644 (file)
@@ -49,11 +49,9 @@ void FETools::get_interpolation_matrix(const FiniteElement<dim> &fe1,
                                   // Initialize FEValues for fe1 at
                                   // the unit support points of the
                                   // fe2 element.
-  std::vector<double> phantom_weights(fe2.dofs_per_cell,1.);
   const typename std::vector<Point<dim> > &
     fe2_support_points = fe2.get_unit_support_points ();
-  Quadrature<dim> fe2_support_points_quadrature(fe2_support_points,
-                                               phantom_weights);
+  Quadrature<dim> 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<dim> &fe1,
   GridGenerator::hyper_cube(tria);
   dof_handler.distribute_dofs(fe1);
   MappingQ1<dim> mapping_q1;
-  FEValues<dim> fe_values(mapping_q1, fe1, fe2_support_points_quadrature, update_values);
+  FEValues<dim> fe_values(mapping_q1, fe1, fe2_support_points_quadrature,
+                         update_values);
   fe_values.reinit(dof_handler.begin_active());
   
   for (unsigned int i=0; i<fe2.dofs_per_cell; ++i)     
index 88fb0757c41b6fc91af9547095d46df8242246be..00b1bb30c686a6acde7a9fdf849f41768caab4c1 100644 (file)
@@ -289,7 +289,7 @@ void GridOut::write_gnuplot (const Triangulation<dim> &tria,
       for (unsigned int i=0; i<n_points; ++i)
        boundary_points[i](0)= 1.*(i+1)/(n_points+1);
 
-      Quadrature<dim-1> quadrature(boundary_points, std::vector<double> (n_points, 1));
+      Quadrature<dim-1> quadrature(boundary_points);
       q_projector = new QProjector<dim> (quadrature, false);
     }
   
@@ -604,8 +604,7 @@ void GridOut::write_eps (const Triangulation<dim> &tria,
            for (unsigned int i=0; i<n_points; ++i)
              boundary_points[i](0) = 1.*(i+1)/(n_points+1);
            
-           Quadrature<dim-1> quadrature (boundary_points,
-                                         std::vector<double> (n_points, 1));
+           Quadrature<dim-1> quadrature (boundary_points);
            QProjector<dim> q_projector (quadrature, false);
 
                                             // next loop over all
index 43494b7ab270347f8e5e0fae9ca837b73a065c4c..5ad71bfa5f8acf11c88735493534da9833e4263d 100644 (file)
@@ -147,8 +147,6 @@ void VectorTools::interpolate (const Mapping<dim>    &mapping,
   Assert(dof_to_rep_index_table.size()==fe.dofs_per_cell, ExcInternalError());
 
   std::vector<unsigned int> dofs_on_cell (fe.dofs_per_cell);
-  std::vector<double>       dummy_weights (fe.dofs_per_cell);
-
   std::vector<Point<dim> >  rep_points (n_rep_points);
 
                                   // get space for the values of the
@@ -163,7 +161,7 @@ void VectorTools::interpolate (const Mapping<dim>    &mapping,
 
                                   // Make a quadrature rule from support points
                                   // to feed it into FEValues
-  Quadrature<dim> support_quadrature(unit_support_points, dummy_weights);
+  Quadrature<dim> support_quadrature(unit_support_points);
 
                                   // Transformed support points are computed by
                                   // FEValues
@@ -703,8 +701,7 @@ VectorTools::interpolate_boundary_values (const Mapping<dim>            &mapping
                                   // used in this function
   Assert (unit_support_points.size() != 0, ExcNonInterpolatingFE());
 
-  std::vector<double> dummy_weights (unit_support_points.size());
-  Quadrature<dim-1> aux_quad (unit_support_points, dummy_weights);
+  Quadrature<dim-1> aux_quad (unit_support_points);
   FEFaceValues<dim> fe_values (mapping, fe, aux_quad, update_q_points);
 
   typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active(),

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.