*/
bool is_dominating() const;
+ /**
+ * Comparison operator. In addition to the fields already checked by
+ * FiniteElement::operator==(), this operator also checks for equality
+ * of the arguments passed to the constructors of the current object
+ * as well as the object against which the comparison is done (which
+ * for this purpose obviously also needs to be of type FE_Nothing).
+ */
+ virtual
+ bool operator == (const FiniteElement<dim,spacedim> &fe) const override;
+
private:
/**
}
+
+template <int dim, int spacedim>
+bool
+FE_Nothing<dim,spacedim>::operator == (const FiniteElement<dim,spacedim> &f) const
+{
+ // Compare fields stored in the base class
+ if (! (this->FiniteElement<dim,spacedim>::operator== (f)))
+ return false;
+
+ // Then make sure the other object is really of type FE_Nothing,
+ // and compare the data that has been passed to both objects'
+ // constructors.
+ if (const FE_Nothing<dim,spacedim> *f_nothing
+ = dynamic_cast<const FE_Nothing<dim,spacedim> *>(&f))
+ return ((dominate == f_nothing->dominate)
+ &&
+ (this->components == f_nothing->components));
+ else
+ return false;
+}
+
+
+
template <int dim, int spacedim>
FiniteElementDomination::Domination
FE_Nothing<dim,spacedim> ::