From 5f386ada5f2c44d4c4f6cc1a54ac3e00efc1c6f5 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Mon, 18 Jul 2005 16:16:41 +0000 Subject: [PATCH] compute additional restriction matrices git-svn-id: https://svn.dealii.org/trunk@11160 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_dgp.cc | 19 +++++-------------- deal.II/deal.II/source/fe/fe_dgp_monomial.cc | 12 ++++++------ deal.II/deal.II/source/fe/fe_dgq.cc | 5 +++++ 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_dgp.cc b/deal.II/deal.II/source/fe/fe_dgp.cc index 70d5ec4356..4f90ec8920 100644 --- a/deal.II/deal.II/source/fe/fe_dgp.cc +++ b/deal.II/deal.II/source/fe/fe_dgp.cc @@ -35,20 +35,11 @@ FE_DGP::FE_DGP (const unsigned int degree) this->prolongation[i].reinit (this->dofs_per_cell, this->dofs_per_cell); FETools::compute_embedding_matrices (*this, &this->prolongation[0]); - - // restriction can be defined - // through projection for - // discontinuous elements, but is - // presently not implemented for DGP - // elements. - -//TODO: Do the restriction - // if it were, then the following - // snippet would be the right code - // note further, that these - // elements have neither support - // nor face-support points, so - // leave these fields empty + // Fill restriction matrices with L2-projection + for (unsigned int i=0; i::children_per_cell; ++i) + this->restriction[i].reinit (this->dofs_per_cell, + this->dofs_per_cell); + FETools::compute_projection_matrices (*this, &this->restriction[0]); } diff --git a/deal.II/deal.II/source/fe/fe_dgp_monomial.cc b/deal.II/deal.II/source/fe/fe_dgp_monomial.cc index d5ed0b1ff7..32f0ea11c1 100644 --- a/deal.II/deal.II/source/fe/fe_dgp_monomial.cc +++ b/deal.II/deal.II/source/fe/fe_dgp_monomial.cc @@ -130,12 +130,11 @@ FE_DGPMonomial::FE_DGPMonomial (const unsigned int degree) this->prolongation[i].reinit (this->dofs_per_cell, this->dofs_per_cell); FETools::compute_embedding_matrices (*this, &this->prolongation[0]); -// initialize_restriction (); - - // note, that these elements have - // neither support nor face-support - // points, so leave these fields - // empty + // Fill restriction matrices with L2-projection + for (unsigned int i=0; i::children_per_cell; ++i) + this->restriction[i].reinit (this->dofs_per_cell, + this->dofs_per_cell); + FETools::compute_projection_matrices (*this, &this->restriction[0]); } @@ -176,6 +175,7 @@ FE_DGPMonomial::clone() const +//TODO: Remove this function and use the one in FETools, if needed template void FE_DGPMonomial:: diff --git a/deal.II/deal.II/source/fe/fe_dgq.cc b/deal.II/deal.II/source/fe/fe_dgq.cc index aa398c3398..81dfb6658a 100644 --- a/deal.II/deal.II/source/fe/fe_dgq.cc +++ b/deal.II/deal.II/source/fe/fe_dgq.cc @@ -214,6 +214,11 @@ FE_DGQ::FE_DGQ (const Quadrature<1>& points) this->prolongation[i].reinit (this->dofs_per_cell, this->dofs_per_cell); FETools::compute_embedding_matrices (*this, &this->prolongation[0]); + // Fill restriction matrices with L2-projection + for (unsigned int i=0; i::children_per_cell; ++i) + this->restriction[i].reinit (this->dofs_per_cell, + this->dofs_per_cell); + FETools::compute_projection_matrices (*this, &this->restriction[0]); // Compute support points, whivh // are the tensor product of the -- 2.39.5