]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Corrected fill_fe_face_values so that it works for 3D and for 2D
authorangela.klewinghaus <angela.klewinghaus@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Mar 2013 10:30:42 +0000 (10:30 +0000)
committerangela.klewinghaus <angela.klewinghaus@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Mar 2013 10:30:42 +0000 (10:30 +0000)
-de, and those below, will be ignored--

M    deal.II/include/deal.II/fe/fe_poly_face.templates.h

git-svn-id: https://svn.dealii.org/branches/branch_face_elements@28747 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/fe/fe_poly_face.templates.h

index 8b5a28a792e62ab703046c73cfaa1c24ca538a00..39720be20b5e549cbaddd6fd5f21931449748a1b 100644 (file)
@@ -221,9 +221,6 @@ FE_PolyFace<POLY,dim,spacedim>::fill_fe_face_values (
                    for (unsigned int k=0; k<this->dofs_per_quad; ++k)
                      data.shape_values(foffset+k,i) = fe_data.shape_values[k+this->first_face_quad_index][i];
                  }
-             }
-           case 2:
-             {
                // Fill data for line shape functions
                if (this->dofs_per_line != 0)
                  {
@@ -234,16 +231,28 @@ FE_PolyFace<POLY,dim,spacedim>::fill_fe_face_values (
                          data.shape_values(foffset+GeometryInfo<dim>::face_to_cell_lines(face, line)+k,i) = fe_data.shape_values[k+(line*this->dofs_per_line)+this->first_face_line_index][i];
                      }
                  }
+               break;
+             }
+           case 2:
+             {
+               // Fill data for line shape functions
+               if (this->dofs_per_line != 0)
+                 {
+                   const unsigned int foffset = this->first_line_index + this->dofs_per_line * face;
+                   for (unsigned int k=0; k<this->dofs_per_line; ++k)
+                     data.shape_values(foffset+k,i) = fe_data.shape_values[k+this->first_face_line_index][i];
+                 }
+               break;
              }
            case 1:
              {
-               // Fill data for vertex shape functions
-               if (this->dofs_per_vertex != 0)
-                 for (unsigned int lvertex=0; lvertex<GeometryInfo<dim>::vertices_per_face; ++lvertex)
-                   data.shape_values(GeometryInfo<dim>::face_to_cell_vertices(face, lvertex),i) = fe_data.shape_values[lvertex][i];
                break;
              }
-         }
+         }     
+       // Fill data for vertex shape functions
+       if (this->dofs_per_vertex != 0)
+         for (unsigned int lvertex=0; lvertex<GeometryInfo<dim>::vertices_per_face; ++lvertex)
+           data.shape_values(GeometryInfo<dim>::face_to_cell_vertices(face, lvertex),i) = fe_data.shape_values[lvertex][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.