From: angela.klewinghaus Date: Mon, 25 Feb 2013 13:21:31 +0000 (+0000) Subject: added new hierachic_to_lexicographic_numbering function X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=066f51bc94359052ed143fa84a4d617ffbba9f77;p=dealii-svn.git added new hierachic_to_lexicographic_numbering function git-svn-id: https://svn.dealii.org/branches/branch_face_elements@28549 0785d39b-7218-0410-832d-ea1e28bc413d --- 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 513213aeed..61c6bfdd2d 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 @@ -205,14 +205,23 @@ FE_PolyFace::fill_fe_face_values ( const UpdateFlags flags(fe_data.update_once | fe_data.update_each); - const unsigned int foffset = fe_data.shape_values.size() * face; if (flags & update_values) for (unsigned int i=0; idofs_per_cell; ++k) data.shape_values(k,i) = 0.; + // Fill data for vertex shape functions + + // 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; kfirst_face_line_index][i]; + + // Fill data for quad shape functions } } diff --git a/deal.II/include/deal.II/fe/fe_tools.h b/deal.II/include/deal.II/fe/fe_tools.h index d0cb7482c6..b4b82667a1 100644 --- a/deal.II/include/deal.II/fe/fe_tools.h +++ b/deal.II/include/deal.II/fe/fe_tools.h @@ -1148,6 +1148,12 @@ namespace FETools * of degrees of freedom in the * finite element. */ + + template + void + hierarchic_to_lexicographic_numbering (unsigned int degree, + std::vector &h2l); + template void hierarchic_to_lexicographic_numbering (const FiniteElementData &fe_data, @@ -1171,7 +1177,8 @@ namespace FETools * numbering. All the remarks * made about the above function * are also valid here. - */ + */ + template void lexicographic_to_hierarchic_numbering (const FiniteElementData &fe_data, diff --git a/deal.II/source/fe/fe_tools.cc b/deal.II/source/fe/fe_tools.cc index 26ed3a42fa..dba1b97ff3 100644 --- a/deal.II/source/fe/fe_tools.cc +++ b/deal.II/source/fe/fe_tools.cc @@ -2602,30 +2602,21 @@ namespace FETools template void - hierarchic_to_lexicographic_numbering (const FiniteElementData &fe, - std::vector &h2l) - { - Assert (h2l.size() == fe.dofs_per_cell, - ExcDimensionMismatch (h2l.size(), fe.dofs_per_cell)); - h2l = hierarchic_to_lexicographic_numbering (fe); - } - - - - template - std::vector - hierarchic_to_lexicographic_numbering (const FiniteElementData &fe) + hierarchic_to_lexicographic_numbering (unsigned int degree, std::vector& h2l) { - Assert (fe.n_components() == 1, ExcInvalidFE()); - - std::vector h2l (fe.dofs_per_cell); - - const unsigned int dofs_per_cell = fe.dofs_per_cell; - // polynomial degree - const unsigned int degree = fe.dofs_per_line+1; - // number of grid points in each + // number of support points in each // direction const unsigned int n = degree+1; + + unsigned int dofs_per_cell = n; + for (unsigned int i=1;i + void + hierarchic_to_lexicographic_numbering (const FiniteElementData &fe, + std::vector &h2l) + { + Assert (h2l.size() == fe.dofs_per_cell, + ExcDimensionMismatch (h2l.size(), fe.dofs_per_cell)); + hierarchic_to_lexicographic_numbering (h21, fe.dofs_per_line+1); + } + + + + template + std::vector + hierarchic_to_lexicographic_numbering (const FiniteElementData &fe) + { + Assert (fe.n_components() == 1, ExcInvalidFE()); + std::vector h2l(fe.dofs_per_cell); + hierarchic_to_lexicographic_numbering (h2l, fe.dofs_per_line+1); + return (h2l); + } + template void lexicographic_to_hierarchic_numbering (const FiniteElementData &fe,