From b19485a8d4808e74f185931cfe5c29aba2fb833e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 31 Jan 2017 09:59:23 +0100 Subject: [PATCH] FE_Enriched: code example for a constructor --- include/deal.II/fe/fe_enriched.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/deal.II/fe/fe_enriched.h b/include/deal.II/fe/fe_enriched.h index d61c498de7..527bc7a1eb 100644 --- a/include/deal.II/fe/fe_enriched.h +++ b/include/deal.II/fe/fe_enriched.h @@ -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 fe + * (&fe_base, + * {&fe_1, &fe_2}, + * {{[=] (const typename Triangulation::cell_iterator &) -> const Function * {return &fe_1_function1;}, + * [=] (const typename Triangulation::cell_iterator &) -> const Function * {return &fe_1_function2;}}, + * {[=] (const typename Triangulation::cell_iterator &) -> const Function * {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 -- 2.39.5