From: kanschat Date: Wed, 17 Dec 2008 21:17:45 +0000 (+0000) Subject: enable computation of embedding matrices for elements not supporting anisotropic... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd07699d802f6547bac3ff355bd58fab78b08fa1;p=dealii-svn.git enable computation of embedding matrices for elements not supporting anisotropic refinement git-svn-id: https://svn.dealii.org/trunk@17980 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_tools.h b/deal.II/deal.II/include/fe/fe_tools.h index 956b945acc..2b96003a85 100644 --- a/deal.II/deal.II/include/fe/fe_tools.h +++ b/deal.II/deal.II/include/fe/fe_tools.h @@ -358,10 +358,12 @@ class FETools * FiniteElement::prolongation * matrices. * - * @param fe The finite element + * @param fe The finite element * class for which we compute the - * embedding matrices. @param - * matrices A reference to + * embedding matrices. + * + * @param + * matrices A reference to * RefinementCase::isotropic_refinement * vectors of FullMatrix * objects. Each vector @@ -373,10 +375,17 @@ class FETools * is the format used in * FiniteElement, where we want * to use this function mostly. + * + * @param + * isotropic_only: set + * this true if you only + * want to compute matrices for + * isotropic refinement. */ template static void compute_embedding_matrices(const FiniteElement &fe, - std::vector > >& matrices); + std::vector > >& matrices, + const bool isotropic_only = false); /** * Compute the embedding matrices diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index 7fa616e2e5..0e17e536db 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -313,7 +313,7 @@ FiniteElement::reinit_restriction_and_prolongation_matrices ( const bool isotropic_prolongation_only) { for (unsigned int ref_case=RefinementCase::cut_x; - ref_case::isotropic_refinement+1; ++ref_case) + ref_case <= RefinementCase::isotropic_refinement; ++ref_case) { const unsigned int nc = GeometryInfo::n_children(RefinementCase(ref_case)); diff --git a/deal.II/deal.II/source/fe/fe_tools.cc b/deal.II/deal.II/source/fe/fe_tools.cc index 214f8d993a..e2a6d91b41 100644 --- a/deal.II/deal.II/source/fe/fe_tools.cc +++ b/deal.II/deal.II/source/fe/fe_tools.cc @@ -583,7 +583,8 @@ FETools::compute_embedding_matrices(const FiniteElement<2,3>&, template void FETools::compute_embedding_matrices(const FiniteElement& fe, - std::vector > >& matrices) + std::vector > >& matrices, + const bool isotropic_only) { const unsigned int n = fe.dofs_per_cell; @@ -591,8 +592,11 @@ FETools::compute_embedding_matrices(const FiniteElement& fe, const unsigned int degree = fe.degree; // loop over all possible refinement cases - for (unsigned int ref_case=RefinementCase::cut_x; - ref_case::isotropic_refinement+1; ++ref_case) + unsigned int ref_case = (isotropic_only) + ? RefinementCase::isotropic_refinement + : RefinementCase::cut_x; + + for (;ref_case <= RefinementCase::isotropic_refinement; ++ref_case) { const unsigned int nc = GeometryInfo::n_children(RefinementCase(ref_case)); for (unsigned int i=0;i template void FETools::compute_embedding_matrices -(const FiniteElement &, std::vector > >&); +(const FiniteElement &, std::vector > >&,bool); template void FETools::compute_face_embedding_matrices