]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Take two fields out of FiniteElement::operator==() again. 6367/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 3 May 2018 00:27:14 +0000 (18:27 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 3 May 2018 00:27:14 +0000 (18:27 -0600)
include/deal.II/fe/fe.h
source/fe/fe.cc

index c519de1b0e4c216f3b95617184b2ad3d6f794d2c..dfb2b0692261f7f9e9d390a4749f67b42d439b42 100644 (file)
@@ -1342,14 +1342,25 @@ public:
    *   current object and of the given object,
    * - the name returned by get_name(),
    * - as all of the fields in FiniteElementData,
-   * - constraint matrices,
-   * - restriction matrices,
-   * - prolongation matrices of this object and the argument.
+   * - constraint matrices.
    *
    * This covers most cases where elements can differ, but there are
    * cases of derived elements that are different and for which the
    * current function still returns @p true. For these cases, derived
    * classes should overload this function.
+   *
+   * @note This operator specifically does not check the following
+   *   member variables of the current class:
+   *   - restriction matrices,
+   *   - prolongation matrices of this object and the argument.
+   *  This is because these member variables may be initialized only
+   *  on demand by derived classes, rather than being available immediately.
+   *  Consequently, comparing these members would not only be costly because
+   *  these are generall big arrays, but also because their computation may
+   *  be expensive. On the other hand, derived classes for which these
+   *  arrays may differ for two objects even though the above list compares
+   *  as equal, will probably want to implement their own operator==()
+   *  anyway.
    */
   virtual
   bool operator == (const FiniteElement<dim,spacedim> &fe) const;
index 6c658766ca17cafd6064f6c5026c19ac88633943..6110359bc786d15c51696935795cb212331fab09 100644 (file)
@@ -947,11 +947,7 @@ FiniteElement<dim,spacedim>::operator == (const FiniteElement<dim,spacedim> &f)
           (static_cast<const FiniteElementData<dim>&>(*this) ==
            static_cast<const FiniteElementData<dim>&>(f))
           &&
-          (interface_constraints == f.interface_constraints)
-          &&
-          (restriction == f.restriction)
-          &&
-          (prolongation == f.prolongation));
+          (interface_constraints == f.interface_constraints));
 }
 
 

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.