From: Marc Fehling Date: Mon, 11 Feb 2019 17:02:27 +0000 (+0100) Subject: Add warning to set_fe. X-Git-Tag: v9.1.0-rc1~310^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2be46094200872ffa8cc9f63d20d20926cb392eb;p=dealii.git Add warning to set_fe. --- diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index 1da5931739..d07ecf0738 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -487,6 +487,11 @@ public: * main class and refer to it directly whenever you need to access * properties of the finite element (such as * FiniteElementData::dofs_per_cell). This is what all tutorial programs do. + * + * @warning This function only sets a FiniteElement. Degrees of freedom have + * either not been distributed yet, or are distributed using a previously set + * element. In both cases, accessing degrees of freedom will lead to invalid + * results. To restore consistency, call distribute_dofs(). */ virtual void set_fe(const FiniteElement &fe); diff --git a/include/deal.II/hp/dof_handler.h b/include/deal.II/hp/dof_handler.h index 3b73789941..e16a524952 100644 --- a/include/deal.II/hp/dof_handler.h +++ b/include/deal.II/hp/dof_handler.h @@ -426,6 +426,12 @@ namespace hp * * @note In accordance with dealii::DoFHandler::set_fe(), * this function also makes a copy of the object given as argument. + * + * @warning This function only sets a hp::FECollection. Degrees of freedom + * have either not been distributed yet, or are distributed using a + * previously set collection. In both cases, accessing degrees of freedom + * will lead to invalid results. To restore consistency, call + * distribute_dofs(). */ virtual void set_fe(const hp::FECollection &fe);