From: Ralf Hartmann Date: Thu, 23 Feb 2006 14:36:03 +0000 (+0000) Subject: In the constructor create a FiniteElementData instead of a full FE_Q object to be... X-Git-Tag: v8.0.0~12208 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77904ec1f4b09ed0c082b8ceb200eb3bf5e13e4c;p=dealii.git In the constructor create a FiniteElementData instead of a full FE_Q object to be given to lexicographic_to_hierarchic_numbering. Add implementation of copy constructor. git-svn-id: https://svn.dealii.org/trunk@12474 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/mapping_q.cc b/deal.II/deal.II/source/fe/mapping_q.cc index 720d820146..c715dc1376 100644 --- a/deal.II/deal.II/source/fe/mapping_q.cc +++ b/deal.II/deal.II/source/fe/mapping_q.cc @@ -71,6 +71,18 @@ MappingQ<1>::MappingQ (const unsigned int): {} +template<> +MappingQ<1>::MappingQ (const MappingQ<1> &): + MappingQ1<1> (), + degree(1), + n_inner(0), + n_outer(0), + tensor_pols(0), + n_shape_functions(2), + renumber(0) +{} + + template<> MappingQ<1>::~MappingQ () {} @@ -126,8 +138,20 @@ MappingQ::MappingQ (const unsigned int p) // shape functions of the Qp // mapping. renumber.resize(n_shape_functions,0); - FETools::lexicographic_to_hierarchic_numbering (FE_Q(degree), - renumber); + // instead of creating a full FE_Q + // object to be passed to the + // lexicographic_to_hierarchic_numbering + // function we only create the + // underlying FiniteElementData + // object. We can't access + // FE_Q::get_dpo_vector as MappingQ + // is not friend of FE_Q. Create + // the dpo vector ourselve. + std::vector dpo(dim+1, 1U); + for (unsigned int i=1; i (dpo, 1, degree), renumber); // build laplace_on_quad_vector if (degree>1) @@ -140,6 +164,22 @@ MappingQ::MappingQ (const unsigned int p) } +template +MappingQ::MappingQ (const MappingQ &mapping): + MappingQ1(), + degree(mapping.degree), + n_inner(mapping.n_inner), + n_outer(n_outer), + tensor_pols(0), + n_shape_functions(mapping.n_shape_functions), + renumber(mapping.renumber) +{ + tensor_pols=new TensorProductPolynomials (*mapping.tensor_pols); + laplace_on_quad_vector=mapping.laplace_on_quad_vector; + laplace_on_hex_vector=mapping.laplace_on_hex_vector; +} + + template MappingQ::~MappingQ () {