]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update indentation of assembly operations
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 11 May 2019 17:22:15 +0000 (19:22 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 11 May 2019 17:22:15 +0000 (19:22 +0200)
examples/step-44/step-44.cc

index 202ab92c33bcd9d20ce75d6b263bf05ee322d0fc..f831cde58e0b532dad8dca2761ed63993c4e4908 100644 (file)
@@ -2157,6 +2157,8 @@ namespace Step44
         const SymmetricTensor<4, dim> Jc  = lqph[q_point]->get_Jc();
         const double d2Psi_vol_dJ2        = lqph[q_point]->get_d2Psi_vol_dJ2();
         const double det_F                = lqph[q_point]->get_det_F();
+        const SymmetricTensor<2, dim> &I =
+          Physics::Elasticity::StandardTensors<dim>::I;
 
         // Next we define some aliases to make the assembly process easier to
         // follow
@@ -2185,11 +2187,12 @@ namespace Step44
                 // the local matrix diagonals:
                 if ((i_group == j_group) && (i_group == u_dof))
                   {
-                    data.cell_matrix(i, j) += symm_grad_Nx[i] *
-                                              Jc // The material contribution:
-                                              * symm_grad_Nx[j] * JxW;
-                    if (component_i ==
-                        component_j) // geometrical stress contribution
+                    // The material contribution:
+                    data.cell_matrix(i, j) += symm_grad_Nx[i] * Jc * //
+                                              symm_grad_Nx[j] * JxW; //
+
+                    // The geometrical stress contribution:
+                    if (component_i == component_j)
                       data.cell_matrix(i, j) += grad_Nx[i][component_i] * tau *
                                                 grad_Nx[j][component_j] * JxW;
                   }
@@ -2197,11 +2200,8 @@ namespace Step44
                 // contribution
                 else if ((i_group == p_dof) && (j_group == u_dof))
                   {
-                    data.cell_matrix(i, j) +=
-                      N[i] * det_F *
-                      (symm_grad_Nx[j] *
-                       Physics::Elasticity::StandardTensors<dim>::I) *
-                      JxW;
+                    data.cell_matrix(i, j) += N[i] * det_F *               //
+                                              (symm_grad_Nx[j] * I) * JxW; //
                   }
                 // and lastly the $\mathsf{\mathbf{k}}_{ \widetilde{J}
                 // \widetilde{p}}$ and $\mathsf{\mathbf{k}}_{ \widetilde{J}

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.