]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make FiniteElement::operator== virtual.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 27 Apr 2018 19:39:12 +0000 (13:39 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 27 Apr 2018 19:39:12 +0000 (13:39 -0600)
Also provide a bit more documentation about what it does.

include/deal.II/fe/fe.h

index fac7ca852bf1ec102e8fb7ba80b2c32f1ff70777..273be3c05ec5be1340ff9e80e86e425ae744c6ab 100644 (file)
@@ -1333,13 +1333,18 @@ public:
   //@}
 
   /**
-   * Comparison operator. We also check for equality of the name returned by
-   * get_name() and for equality of the constraint matrix, which is quite an
-   * expensive operation.  Do therefore use this function with care, if
-   * possible only for debugging purposes.
+   * Comparison operator.
+   *
+   * The implementation in the current class checks for equality of the name
+   * returned by get_name() and for equality of the constraint matrix, as well
+   * as all of the fields in FiniteElementData. 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.
    *
    * We do not compare the matrix arrays #restriction and #prolongation.
    */
+  virtual
   bool operator == (const FiniteElement<dim,spacedim> &) const;
 
   /**

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.