From 392f0a6b0363215844788c143c3363cb73e0579b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 27 Apr 2018 13:39:12 -0600 Subject: [PATCH] Make FiniteElement::operator== virtual. Also provide a bit more documentation about what it does. --- include/deal.II/fe/fe.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; /** -- 2.39.5