From: bangerth Date: Tue, 6 Mar 2007 20:58:51 +0000 (+0000) Subject: Allow using the copy constructor. Change clone() to use it. This avoids re-computing... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8efbe1c01f04be389ba27cd2ac1f905df99fc951;p=dealii-svn.git Allow using the copy constructor. Change clone() to use it. This avoids re-computing some of the matrices over and over again. git-svn-id: https://svn.dealii.org/trunk@14536 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_q.h b/deal.II/deal.II/include/fe/fe_q.h index 075439ce24..6b088e64db 100644 --- a/deal.II/deal.II/include/fe/fe_q.h +++ b/deal.II/deal.II/include/fe/fe_q.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2000, 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 @@ -462,7 +462,7 @@ class FE_Q : public FE_Poly,dim> * constructors of @p FESystem. */ virtual FiniteElement * clone() const; - + private: /** diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index 7de581d316..e2e8af836b 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -239,7 +239,7 @@ template FiniteElement * FE_Q::clone() const { - return new FE_Q(this->degree); + return new FE_Q(*this); }