]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FE_Enriched: code example for a constructor 3876/head
authorDenis Davydov <davydden@gmail.com>
Tue, 31 Jan 2017 08:59:23 +0000 (09:59 +0100)
committerDenis Davydov <davydden@gmail.com>
Tue, 31 Jan 2017 13:31:37 +0000 (14:31 +0100)
include/deal.II/fe/fe_enriched.h

index d61c498de783d7b1299ca4fa26a7674beb30d369..527bc7a1eb72e537fdf70822b4c5b2acd6ab9c76 100644 (file)
@@ -244,6 +244,18 @@ public:
    * Otherwise one would have to use different instance of this class for each
    * disjoint enriched domain.
    *
+   * If you don't plan to use this feature, you can utilize C++11 lambdas to
+   * define dummy functions. Below is an example which uses two functions with
+   * the first element to be enriched and a single function with the second one.
+   * @code
+   * FE_Enriched<dim> fe
+   * (&fe_base,
+   * {&fe_1, &fe_2},
+   * {{[=] (const typename Triangulation<dim>::cell_iterator &) -> const Function<dim> * {return &fe_1_function1;},
+   *   [=] (const typename Triangulation<dim>::cell_iterator &) -> const Function<dim> * {return &fe_1_function2;}},
+   *  {[=] (const typename Triangulation<dim>::cell_iterator &) -> const Function<dim> * {return &fe_2_function;}}});
+   * @endcode
+   *
    * @note When using the same finite element for enrichment with N
    * different functions, it is advised to have the second argument of size 1
    * and the last argument of size 1 x N. The same can be achieved by providing

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.