]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add warning to set_fe.
authorMarc Fehling <marc.fehling@gmx.net>
Mon, 11 Feb 2019 17:02:27 +0000 (18:02 +0100)
committerMarc Fehling <marc.fehling@gmx.net>
Thu, 28 Feb 2019 12:57:40 +0000 (13:57 +0100)
include/deal.II/dofs/dof_handler.h
include/deal.II/hp/dof_handler.h

index 1da5931739ac8b6f47d3119ed3d3890c2e77b2d9..d07ecf0738dd4a8c64b0986f83e8661894b6123b 100644 (file)
@@ -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<dim, spacedim> &fe);
index 3b73789941c6437b1f7867e36820bfc7a4d95d03..e16a524952834deb5d606bd031c4646010bd20ca 100644 (file)
@@ -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<dim, spacedim> &fe);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.