]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
First round of eliminating calls to FEValues that expose internal data structures.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 May 2002 12:48:11 +0000 (12:48 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 May 2002 12:48:11 +0000 (12:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@5936 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-13/step-13.cc

index 79439634460daa85561594152c16444c6a9ca1da..4c3bf0dfdbf8a0872073dd0fac77c708c6ec8f83 100644 (file)
@@ -1283,17 +1283,13 @@ namespace LaplaceSolver
        cell_matrix.clear ();
 
        fe_values.reinit (cell);
-       const std::vector<std::vector<Tensor<1,dim> > >
-         & shape_grads  = fe_values.get_shape_grads();
-       const std::vector<double>
-         & JxW_values   = fe_values.get_JxW_values();
 
        for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
          for (unsigned int i=0; i<dofs_per_cell; ++i)
            for (unsigned int j=0; j<dofs_per_cell; ++j)
-             cell_matrix(i,j) += (shape_grads[i][q_point] *
-                                  shape_grads[j][q_point] *
-                                  JxW_values[q_point]);
+             cell_matrix(i,j) += (fe_values.shape_grad(i,q_point) *
+                                  fe_values.shape_grad(j,q_point) *
+                                  fe_values.JxW(q_point));
 
 
        cell->get_dof_indices (local_dof_indices);
@@ -1529,22 +1525,15 @@ namespace LaplaceSolver
     for (; cell!=endc; ++cell)
       {
        cell_rhs.clear ();
-
        fe_values.reinit (cell);
-       const FullMatrix<double> 
-         & shape_values = fe_values.get_shape_values();
-       const std::vector<double>
-         & JxW_values   = fe_values.get_JxW_values();
-       const std::vector<Point<dim> >
-         & q_points     = fe_values.get_quadrature_points();
-
-       rhs_function->value_list (q_points, rhs_values);
+       rhs_function->value_list (fe_values.get_quadrature_points(),
+                                 rhs_values);
       
        for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
          for (unsigned int i=0; i<dofs_per_cell; ++i)
-           cell_rhs(i) += (shape_values (i,q_point) *
+           cell_rhs(i) += (fe_values.shape_value(i,q_point) *
                            rhs_values[q_point] *
-                           JxW_values[q_point]);
+                           fe_values.JxW(q_point));
 
        cell->get_dof_indices (local_dof_indices);
        for (unsigned int i=0; i<dofs_per_cell; ++i)

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.