From: bangerth Date: Tue, 6 Mar 2007 21:50:56 +0000 (+0000) Subject: Use the copy constructors to make copies of finite elements, rather than creating... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=958c894c87838e21e2a13cc599e60066e8c7049a;p=dealii-svn.git Use the copy constructors to make copies of finite elements, rather than creating all the matrices anew. git-svn-id: https://svn.dealii.org/trunk@14540 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_dgp.cc b/deal.II/deal.II/source/fe/fe_dgp.cc index ffd381a2a4..d7c119fbc3 100644 --- a/deal.II/deal.II/source/fe/fe_dgp.cc +++ b/deal.II/deal.II/source/fe/fe_dgp.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -64,7 +64,7 @@ template FiniteElement * FE_DGP::clone() const { - return new FE_DGP(this->degree); + return new FE_DGP(*this); } 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 3321f574df..0a3fcd2f12 100644 --- a/deal.II/deal.II/source/fe/fe_dgp_monomial.cc +++ b/deal.II/deal.II/source/fe/fe_dgp_monomial.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -167,7 +167,7 @@ template FiniteElement * FE_DGPMonomial::clone() const { - return new FE_DGPMonomial(this->degree); + return new FE_DGPMonomial(*this); } diff --git a/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc b/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc index 618aea00fd..f3bc12df53 100644 --- a/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc +++ b/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -98,7 +98,7 @@ template FiniteElement * FE_DGPNonparametric::clone() const { - return new FE_DGPNonparametric(degree); + return new FE_DGPNonparametric(*this); } diff --git a/deal.II/deal.II/source/fe/fe_dgq.cc b/deal.II/deal.II/source/fe/fe_dgq.cc index 47d6365c09..7ffdc58085 100644 --- a/deal.II/deal.II/source/fe/fe_dgq.cc +++ b/deal.II/deal.II/source/fe/fe_dgq.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -219,6 +219,8 @@ FE_DGQ::FE_DGQ (const Quadrature<1>& points) this->unit_support_points = support_quadrature.get_points(); } + + template std::string FE_DGQ::get_name () const @@ -242,7 +244,7 @@ template FiniteElement * FE_DGQ::clone() const { - return new FE_DGQ(this->degree); + return new FE_DGQ(*this); } diff --git a/deal.II/deal.II/source/fe/fe_nedelec.cc b/deal.II/deal.II/source/fe/fe_nedelec.cc index 355942b21e..81f08ceeea 100644 --- a/deal.II/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/deal.II/source/fe/fe_nedelec.cc @@ -103,7 +103,7 @@ template FiniteElement * FE_Nedelec::clone() const { - return new FE_Nedelec(degree); + return new FE_Nedelec(*this); } diff --git a/deal.II/deal.II/source/fe/fe_q_hierarchical.cc b/deal.II/deal.II/source/fe/fe_q_hierarchical.cc index 0ebed3355e..7a4810a9d9 100644 --- a/deal.II/deal.II/source/fe/fe_q_hierarchical.cc +++ b/deal.II/deal.II/source/fe/fe_q_hierarchical.cc @@ -116,7 +116,7 @@ template FiniteElement * FE_Q_Hierarchical::clone() const { - return new FE_Q_Hierarchical(this->degree); + return new FE_Q_Hierarchical(*this); } diff --git a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc index 7b89c2ac5d..5dba3929a8 100644 --- a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc +++ b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc @@ -119,7 +119,7 @@ template FiniteElement * FE_RaviartThomas::clone() const { - return new FE_RaviartThomas(rt_order); + return new FE_RaviartThomas(*this); } diff --git a/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc b/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc index 084ae9b768..6d3c488574 100644 --- a/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc +++ b/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc @@ -118,7 +118,7 @@ template FiniteElement * FE_RaviartThomasNodal::clone() const { - return new FE_RaviartThomasNodal(this->degree-1); + return new FE_RaviartThomasNodal(*this); }