From 105fd3bd3910af1ab55f7a7e4c7e85273cdd311d Mon Sep 17 00:00:00 2001 From: "angela.klewinghaus" Date: Wed, 27 Feb 2013 12:06:26 +0000 Subject: [PATCH] modified fill_fe_face_values so that it works for 3D git-svn-id: https://svn.dealii.org/branches/branch_face_elements@28606 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/fe/fe_poly_face.templates.h | 52 +++++++++++++------ deal.II/source/fe/fe_tools.cc | 8 --- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/deal.II/include/deal.II/fe/fe_poly_face.templates.h b/deal.II/include/deal.II/fe/fe_poly_face.templates.h index 043ca943bd..8b5a28a792 100644 --- a/deal.II/include/deal.II/fe/fe_poly_face.templates.h +++ b/deal.II/include/deal.II/fe/fe_poly_face.templates.h @@ -208,24 +208,42 @@ FE_PolyFace::fill_fe_face_values ( if (flags & update_values) for (unsigned int i=0; idofs_per_cell; ++k) + for (unsigned int k=0; kdofs_per_cell; ++k) data.shape_values(k,i) = 0.; - // Fill data for vertex shape functions - if (this->n_dofs_per_vertex() != 0) - for (unsigned int lvertex=0; lvertex::vertices_per_face; ++lvertex) - data.shape_values(GeometryInfo::face_to_cell_vertices(face, lvertex),i) = fe_data.shape_values[lvertex][i]; - - - // Fill data for line shape functions - - // in 3D, this should be a loop over all lines of the face, - // and the multiplier should not be the face itself - const unsigned int foffset = this->first_line_index + this->dofs_per_line * face; - - for (unsigned int k=0; kdofs_per_line; ++k) - data.shape_values(foffset+k,i) = fe_data.shape_values[k+this->first_face_line_index][i]; - - // Fill data for quad shape functions + switch (dim) + { + case 3: + { + // Fill data for quad shape functions + if (this->dofs_per_quad !=0) + { + const unsigned int foffset = this->first_quad_index + this->dofs_per_quad * face; + for (unsigned int k=0; kdofs_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) + { + const unsigned int foffset = this->first_line_index; + for (unsigned int line=0; line::lines_per_face; ++line) + { + for (unsigned int k=0; kdofs_per_line; ++k) + data.shape_values(foffset+GeometryInfo::face_to_cell_lines(face, line)+k,i) = fe_data.shape_values[k+(line*this->dofs_per_line)+this->first_face_line_index][i]; + } + } + } + case 1: + { + // Fill data for vertex shape functions + if (this->dofs_per_vertex != 0) + for (unsigned int lvertex=0; lvertex::vertices_per_face; ++lvertex) + data.shape_values(GeometryInfo::face_to_cell_vertices(face, lvertex),i) = fe_data.shape_values[lvertex][i]; + break; + } + } } } diff --git a/deal.II/source/fe/fe_tools.cc b/deal.II/source/fe/fe_tools.cc index 79fc4159aa..9c13ed2bc5 100644 --- a/deal.II/source/fe/fe_tools.cc +++ b/deal.II/source/fe/fe_tools.cc @@ -2668,8 +2668,6 @@ namespace FETools h2l[next_index++] = n*(n-1)+i+1; // inside quad - // Assert (fe.dofs_per_quad == fe.dofs_per_line*fe.dofs_per_line, - // ExcInternalError()); for (unsigned int i=0; i