]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disallow copying FESystem objects.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 18 Apr 2017 01:51:28 +0000 (19:51 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 18 Apr 2017 01:58:19 +0000 (19:58 -0600)
include/deal.II/fe/fe_system.h

index 73029e2c912e6233b4a570c7277c28ccaf107865..20b7cb3c33d0e3ef7c75bed2ab92871a3d4ae51b 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2016 by the deal.II authors
+// Copyright (C) 1999 - 2017 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -419,6 +419,12 @@ public:
   FESystem (const std::vector<const FiniteElement<dim,spacedim>*> &fes,
             const std::vector<unsigned int>                   &multiplicities);
 
+  /**
+   * Copy constructor. This constructor is deleted, i.e., copying
+   * FESystem objects is not allowed.
+   */
+  FESystem (const FESystem<dim,spacedim> &) = delete;
+
   /**
    * Destructor.
    */
@@ -960,13 +966,6 @@ private:
    * This object contains a pointer to each contributing element of a mixed
    * discretization and its multiplicity. It is created by the constructor and
    * constant afterwards.
-   *
-   * The pointers are managed as shared pointers. This ensures that we can use
-   * the copy constructor of this class without having to manage cloning the
-   * elements themselves. Since finite element objects do not contain any
-   * state, this also allows multiple copies of an FESystem object to share
-   * pointers to the underlying base finite elements. The last one of these
-   * copies around will then delete the pointer to the base elements.
    */
   std::vector<std::pair<std::shared_ptr<const FiniteElement<dim,spacedim> >,
       unsigned int> >

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.