]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
FE::prolongation_is_implemented
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Feb 2003 15:52:26 +0000 (15:52 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Feb 2003 15:52:26 +0000 (15:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@7230 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_base.h
deal.II/deal.II/source/fe/fe.cc
deal.II/doc/news/2002/c-3-4.html

index 56b46abde051c93dd0cb97f8b1db62a35e2c08b6..9a00eee92807ce1bca11da320bd6b935d7c01edb 100644 (file)
@@ -674,11 +674,46 @@ class FiniteElementBase : public Subscriptor,
                                      * implemented in the derived
                                      * finite element class, this
                                      * function aborts with
-                                     * @p{ExcEmbeddingVoid}.
+                                     * @p{ExcEmbeddingVoid}. You can
+                                     * check whether this is the case
+                                     * by calling the
+                                     * @ref{prolongation_is_implemented()}.
                                      */
     const FullMatrix<double> & prolongate (const unsigned int child) const;
 
-                                    /**
+                                     /**
+                                      * Return whether this element
+                                      * implements its prolongation
+                                      * matrices. The return value
+                                      * also indicates whether a call
+                                      * to the @p{prolongate} function
+                                      * will generate an error or not.
+                                      *
+                                      * This function is mostly here
+                                      * in order to allow us to write
+                                      * more efficient test programs
+                                      * which we run on all kinds of
+                                      * weird elements, and for which
+                                      * we simply need to exclude
+                                      * certain tests in case
+                                      * something is not
+                                      * implemented. It will in
+                                      * general probably not be a
+                                      * great help in applications,
+                                      * since there is not much one
+                                      * can do if one needs these
+                                      * features and they are not
+                                      * implemented. This function
+                                      * could be used to check whether
+                                      * a call to @p{prolongate()}
+                                      * will succeed; however, one
+                                      * then still needs to cope with
+                                      * the lack of information this
+                                      * just expresses.
+                                      */
+    bool prolongation_is_implemented () const;
+
+                                    /**
                                      * Return a readonly reference to
                                      * the matrix which describes the
                                      * constraints at the interface
@@ -717,7 +752,7 @@ class FiniteElementBase : public Subscriptor,
                                       * will generate an error or not.
                                       *
                                       * This function is mostly here
-                                      * in order to allow us write
+                                      * in order to allow us to write
                                       * more efficient test programs
                                       * which we run on all kinds of
                                       * weird elements, and for which
@@ -725,7 +760,7 @@ class FiniteElementBase : public Subscriptor,
                                       * certain tests in case hanging
                                       * node constraints are not
                                       * implemented. It will in
-                                      * general probablz not be a
+                                      * general probably not be a
                                       * great help in applications,
                                       * since there is not much one
                                       * can do if one needs hanging
index d830740156f6a358a4ff027e8ee883892ccf9383..5e892ad6c9b63c7d912f520525acf019dee1acde 100644 (file)
@@ -259,6 +259,26 @@ FiniteElementBase<dim>::prolongate (const unsigned int child) const
 }
 
 
+template <int dim>
+bool
+FiniteElementBase<dim>::prolongation_is_implemented () const
+{
+  for (unsigned int c=0; c<GeometryInfo<dim>::children_per_cell; ++c)
+    {
+      Assert ((prolongation[c].m() == dofs_per_cell) ||
+              (prolongation[c].m() == 0),
+              ExcInternalError());
+      Assert ((prolongation[c].n() == dofs_per_cell) ||
+              (prolongation[c].n() == 0),
+              ExcInternalError());
+      if ((prolongation[c].m() == 0) ||
+          (prolongation[c].n() == 0))
+        return false;
+    }
+  return true;
+}
+
+
 
 template <int dim>
 bool
index 6aff88d8198fdfbaaba379c3d24d3bdb34c1b30a..3eab5044c1e268ad2963bfb2a3568714dc242d6f 100644 (file)
@@ -764,10 +764,11 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
        </p>
 
   <li> <p>
-       New: There is now a function <code
-       class="member">FiniteElement::constraints_are_implemented</code> that
-       informs the caller about whether the finite element in question in fact
-       implements its hanging node constraints.
+       New: There are now functions <code
+       class="member">FiniteElement::prolongation_is_implemented</code> and
+       <code class="member">FiniteElement::constraints_are_implemented</code>
+       that inform the caller about whether the finite element in question in
+       fact implements its prolongation matrices and hanging node constraints.
        <br>
        (WB 2003/02/15)
        </p>

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.