const auto &fe = this->dof_handler->get_fe(active_fe_index());
Assert(this->reference_cell() == fe.reference_cell(),
- ExcMessage(
- "The reference-cell type of the cell does not match the one of the "
- "finite element!"));
+ internal::ExcNonMatchingReferenceCellTypes(this->reference_cell(),
+ fe.reference_cell()));
return fe;
}
*/
const ArrayView<const T> vertices_1;
};
+
+ /**
+ * This exception is raised whenever the types of two reference cell objects
+ * were assumed to be equal, but were not.
+ *
+ * Parameters to the constructor are the first and second reference cells,
+ * both of type <tt>ReferenceCell</tt>.
+ */
+ DeclException2(
+ ExcNonMatchingReferenceCellTypes,
+ ReferenceCell,
+ ReferenceCell,
+ << "The reference-cell type used on this cell (" << arg1.to_string()
+ << ") does not match the reference-cell type of the finite element "
+ << "associated with this cell (" << arg2.to_string() << "). "
+ << "Did you accidentally use simplex elements on hypercube meshes "
+ << "(or the other way around), or are you using a mixed mesh and "
+ << "assigned a simplex element to a hypercube cell (or the other "
+ << "way around) via the active_fe_index?");
} // namespace internal
// We now store the type of cell in the XDMFEntry:
(void)reference_cell;
Assert(cell_type == reference_cell,
- ExcMessage("Incorrect ReferenceCell type passed in."));
+ internal::ExcNonMatchingReferenceCellTypes(cell_type, reference_cell));
return get_xdmf_content(indent_level);
}