]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Take over changes 1.58->1.60.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Apr 2001 14:30:17 +0000 (14:30 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Apr 2001 14:30:17 +0000 (14:30 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-3-1@4411 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/error_estimator.cc

index a026e12f070b8416ec86a78238220e606e339614..d635e607873e210c47fe152fca75fe2b1a2930cd 100644 (file)
@@ -302,9 +302,24 @@ void KellyErrorEstimator<1>::estimate (const DoFHandler<1>                 &dof_
                                               // if Neumann b.c., then fill
                                               // the gradients field which
                                               // will be used later on.
-             for (unsigned int s=0; s<n_solution_vectors; ++s)
-               neumann_bc.find(n)->second->vector_value(cell->vertex(0),
-                                                        grad_neighbor[s]);
+             {
+               if (n_components==1)
+                 {
+                   double v;
+                   neumann_bc.find(n)->second->value(cell->vertex(0), v);
+                   
+                   for (unsigned int s=0; s<n_solution_vectors; ++s)
+                     grad_neighbor[s](0) = v;
+                 }
+               else
+                 {
+                   Vector<double> v(n_components);
+                   neumann_bc.find(n)->second->vector_value(cell->vertex(0), v);
+                   
+                 for (unsigned int s=0; s<n_solution_vectors; ++s)
+                   grad_neighbor[s] = v;
+                 };
+             }
            else
                                               // fill with zeroes.
              for (unsigned int s=0; s<n_solution_vectors; ++s)
@@ -783,16 +798,28 @@ integrate_over_regular_face (Data                       &data,
                                       // get the values of the boundary
                                       // function at the quadrature
                                       // points
-      
-      std::vector<Vector<double> > g(n_q_points, Vector<double>(n_components));
-      data.neumann_bc.find(boundary_indicator)->second
-       ->vector_value_list (fe_face_values_cell.get_quadrature_points(),
-                            g);
-      
-      for (unsigned int n=0; n<n_solution_vectors; ++n)
-       for (unsigned int component=0; component<n_components; ++component)
-         for (unsigned int point=0; point<n_q_points; ++point)
-           data.phi[n][point][component] -= g[point](component);
+      if (n_components == 1)
+       {
+         std::vector<double> g(n_q_points);
+         data.neumann_bc.find(boundary_indicator)->second
+           ->value_list (fe_face_values_cell.get_quadrature_points(), g);
+         
+         for (unsigned int n=0; n<n_solution_vectors; ++n)
+           for (unsigned int point=0; point<n_q_points; ++point)
+             data.phi[n][point][0] -= g[point];
+       }
+      else
+       {
+         std::vector<Vector<double> > g(n_q_points, Vector<double>(n_components));
+         data.neumann_bc.find(boundary_indicator)->second
+           ->vector_value_list (fe_face_values_cell.get_quadrature_points(),
+                                g);
+         
+         for (unsigned int n=0; n<n_solution_vectors; ++n)
+           for (unsigned int component=0; component<n_components; ++component)
+             for (unsigned int point=0; point<n_q_points; ++point)
+               data.phi[n][point][component] -= g[point](component);
+       };
     };
 
 

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.