From: Wolfgang Bangerth Date: Fri, 27 Apr 2018 19:39:12 +0000 (-0600) Subject: Make FiniteElement::operator== virtual. X-Git-Tag: v9.0.0-rc1~30^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=392f0a6b0363215844788c143c3363cb73e0579b;p=dealii.git Make FiniteElement::operator== virtual. Also provide a bit more documentation about what it does. --- diff --git a/include/deal.II/fe/fe.h b/include/deal.II/fe/fe.h index fac7ca852b..273be3c05e 100644 --- a/include/deal.II/fe/fe.h +++ b/include/deal.II/fe/fe.h @@ -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 &) const; /**