From 0a53124b6ec1ea69f354f753a4b28450f85ccdf8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 9 Jan 2022 10:19:55 -0700 Subject: [PATCH] Add some assertions. --- include/deal.II/fe/fe_tools_extrapolate.templates.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/deal.II/fe/fe_tools_extrapolate.templates.h b/include/deal.II/fe/fe_tools_extrapolate.templates.h index 96c5a92484..18617b8fac 100644 --- a/include/deal.II/fe/fe_tools_extrapolate.templates.h +++ b/include/deal.II/fe/fe_tools_extrapolate.templates.h @@ -1747,6 +1747,9 @@ namespace FETools const AffineConstraints &constraints, OutVector & u2) { + Assert(dof1.get_fe_collection().size() == 1, ExcNotImplemented()); + Assert(dof2.get_fe_collection().size() == 1, ExcNotImplemented()); + Assert(dof1.get_fe(0).n_components() == dof2.get_fe(0).n_components(), ExcDimensionMismatch(dof1.get_fe(0).n_components(), dof2.get_fe(0).n_components())); @@ -1769,6 +1772,13 @@ namespace FETools if (dynamic_cast *>(&dof2.get_triangulation()) != nullptr) { + Assert(dof1.get_fe()[0].reference_cell() == + ReferenceCells::get_hypercube(), + ExcNotImplemented()); + Assert(dof2.get_fe()[0].reference_cell() == + ReferenceCells::get_hypercube(), + ExcNotImplemented()); + interpolate(dof1, u1, dof2, constraints, u3); internal::BlockType u3_relevant; -- 2.39.5