From b58efb6b0f50d4fe03cb48426b79a08b93d3017a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 14 Aug 2024 10:18:02 -0600 Subject: [PATCH] Improve an error message. --- source/fe/fe_system.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 8a4bcc7aca..a54f8cf290 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -2422,7 +2422,14 @@ FESystem::compare_for_domination( dynamic_cast *>(&fe_other)) { Assert(this->n_components() == fe_sys_other->n_components(), - ExcNotImplemented()); + ExcMessage("You can only compare two elements for domination " + "that have the same number of vector components. The " + "current element has " + + std::to_string(this->n_components()) + + " vector components, and you are comparing it " + "against an element with " + + std::to_string(fe_sys_other->n_components()) + + " vector components.")); Assert(this->n_base_elements() == fe_sys_other->n_base_elements(), ExcNotImplemented()); -- 2.39.5