]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
corrected fill data for line shape values for 3D in fill_fe_face_values
authorangela.klewinghaus <angela.klewinghaus@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Mar 2013 13:25:39 +0000 (13:25 +0000)
committerangela.klewinghaus <angela.klewinghaus@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Mar 2013 13:25:39 +0000 (13:25 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_face_elements@28752 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 39720be20b5e549cbaddd6fd5f21931449748a1b..4afa67c2f5acc2138a8c55519714541d1c484445 100644 (file)
@@ -221,6 +221,9 @@ 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)
                  {
@@ -228,31 +231,19 @@ FE_PolyFace<POLY,dim,spacedim>::fill_fe_face_values (
                    for (unsigned int line=0; line<GeometryInfo<dim>::lines_per_face; ++line)
                      {
                        for (unsigned int k=0; k<this->dofs_per_line; ++k)
-                         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];
+                         data.shape_values(foffset+GeometryInfo<dim>::face_to_cell_lines(face, line)*this->dofs_per_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.