From 1d4f385ab6766eb0a89d054ea831d4523b8cb09c Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Mon, 20 Jun 2016 15:44:13 +0200 Subject: [PATCH] [NL] added assertion for dof table components --- .../LocalLinearLeastSquaresExtrapolator.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h b/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h index a2f2e363b96..6fd3066409d 100644 --- a/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h +++ b/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h @@ -63,8 +63,18 @@ public: #endif , _local_to_global(dof_table) - {} - + { + /* Note in case the following assertion fails. + * If you copied the extrapolation code, for your processes from + * somewhere, note that the code from the groundwater flow process might + * not suit your needs: It is a special case and is therefore most + * likely too simplistic. You better adapt the extrapolation code from + * some more advanced process, like the TES process. + */ + assert(dof_table.getNumComponents() == 1 && + "The d.o.f. table passed must be for one variable that has " + "only one component!"); + } void extrapolate(LocalAssemblers const& local_assemblers, PropertyTag const property) override; -- GitLab