]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Allow using the copy constructor of FiniteElement.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Mar 2007 20:57:33 +0000 (20:57 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Mar 2007 20:57:33 +0000 (20:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@14535 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/source/fe/fe.cc

index 11ba6bdb102e87604422f9c30f6392b57542d503..c132c4f7b1d8bfecde04ecae8cc429cc29c9cb31 100644 (file)
@@ -378,22 +378,6 @@ class FiniteElement : public Subscriptor,
     };
 
   public:
-                                     /**
-                                      * Copy constructor. This one is declared
-                                      * as a public constructor to avoid
-                                      * certain compiler errors when a copy
-                                      * constructor is required even if it is
-                                      * not executed (for example when binding
-                                      * a temporary object to a constant
-                                      * reference). However, if you try to
-                                      * actually call it, it will throw an
-                                      * exception, since copying finite
-                                      * element objects is not really
-                                      * supported. If you want to copy such an
-                                      * object, use the @p clone function.
-                                      */
-    FiniteElement (const FiniteElement &);
-    
                                     /**
                                      * Constructor
                                      */
@@ -2128,12 +2112,15 @@ class FiniteElement : public Subscriptor,
     virtual UpdateFlags update_each (const UpdateFlags flags) const = 0;
   
                                     /**
-                                     * @p clone function instead of
-                                     * a copy constructor.
-                                     *
-                                     * This function is needed by the
-                                     * constructors of FESystem as well
-                                     * as by the hp::FECollection class.
+                                     * A sort of virtual copy
+                                     * constructor. Some places in
+                                     * the library, for example the
+                                     * constructors of FESystem as
+                                     * well as the hp::FECollection
+                                     * class, need to make copied of
+                                     * finite elements without
+                                     * knowing their exact type. They
+                                     * do so through this function.
                                      */
     virtual FiniteElement<dim> *clone() const = 0;    
     
index a1b0d8e4f3e55e13f6a008953e31b5805be47e2d..6def406a71bb6a49caa5dbe3f0f9d56b5f4d060a 100644 (file)
@@ -212,21 +212,6 @@ FiniteElement<dim>::FiniteElement (
 }
 
 
-template <int dim>
-FiniteElement<dim>::FiniteElement (const FiniteElement<dim> &)
-               :
-               Subscriptor(),
-               FiniteElementData<dim>(),
-                cached_primitivity (false)
-{
-  Assert (false,
-          ExcMessage ("Finite element objects don't support copying "
-                      "semantics through the copy constructor. If "
-                      "you want to copy a finite element, use the "
-                      "clone() function."));
-}
-
-
 
 template <int dim>
 FiniteElement<dim>::~FiniteElement ()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.