]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
advection residuals fixed
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Sep 2013 08:58:02 +0000 (08:58 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Sep 2013 08:58:02 +0000 (08:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@30942 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/integrators/advection.h

index 8a1676220aeca0b73b38b16d45e88c4fd29553b0..1ab1e0c6f3f71ae934a21b4723d357c7f565ebe3 100644 (file)
@@ -120,10 +120,10 @@ namespace LocalIntegrators
     }
 
     /**
-     * Advection residual operator in weak form
+     * Advection residual operator in strong form
      *
      * \f[
-     * r_i = \int_Z  u\,(\mathbf w \cdot \nabla) v_i \, dx.
+     * r_i = \int_Z  (\mathbf w \cdot \nabla)u\, v_i \, dx.
      * \f]
      */
     template <int dim>
@@ -152,18 +152,18 @@ namespace LocalIntegrators
           const double dx = factor * fe.JxW(k);
           for (unsigned i=0; i<n_dofs; ++i)
             for (unsigned int d=0; d<dim; ++d)
-              result(i) += dx * input[k]
-                           * fe.shape_grad(i,k)[d] * velocity[d][k * v_increment];
+              result(i) += dx * input[k][d]
+                           * fe.shape_value(i,k) * velocity[d][k * v_increment];
         }
     }
 
 
     /**
-     * Vector-valued advection residual operator in weak form
+     * Vector-valued advection residual operator in strong form
      *
      *
      * \f[
-     * r_i = \int_Z  \mathbf u\cdot\bigl((\mathbf w \cdot \nabla) \mathbf v_i\bigr) \, dx.
+     * r_i = \int_Z \bigl((\mathbf w \cdot \nabla) \mathbf u\bigr) \cdot\mathbf v_i \, dx.
      * \f]
      */
     template <int dim>
@@ -195,8 +195,8 @@ namespace LocalIntegrators
           for (unsigned i=0; i<n_dofs; ++i)
             for (unsigned int c=0; c<n_comp; ++c)
               for (unsigned int d=0; d<dim; ++d)
-                result(i) += dx * input[c][k]
-                             * fe.shape_grad_component(i,k,c)[d] * velocity[d][k * v_increment];
+                result(i) += dx * input[c][k][d]
+                             * fe.shape_value_component(i,k,c) * velocity[d][k * v_increment];
         }
     }
 

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.