]> https://gitweb.dealii.org/ - dealii.git/commitdiff
replace num_colors by n_colors 7115/head
authorDenis Davydov <davydden@gmail.com>
Fri, 24 Aug 2018 13:31:12 +0000 (15:31 +0200)
committerDenis Davydov <davydden@gmail.com>
Fri, 24 Aug 2018 13:31:12 +0000 (15:31 +0200)
include/deal.II/fe/fe_enriched.h
source/fe/fe_enriched.cc

index 32cf2cf0e99bf33a9eb2efa20791e6079334d52c..a7e903819d3fab0e7cbd9f301b723639f8c5c25d 100644 (file)
@@ -880,7 +880,7 @@ namespace ColorEnriched
      * this function we translate a vector of user provided enrichment
      * functions into a vector of functions suitable for FE_Enriched class.
      *
-     * @param[in] num_colors number of colors for predicates
+     * @param[in] n_colors number of colors for predicates
      * @param[in] enrichments vector of enrichment functions
      * @param[in] cellwise_color_predicate_map A map of maps used to associate
      * predicate colors in cells with predicate ids.
@@ -890,7 +890,7 @@ namespace ColorEnriched
     template <int dim, int spacedim>
     void
     make_colorwise_enrichment_functions(
-      const unsigned int &                                    num_colors,
+      const unsigned int &                                    n_colors,
       const std::vector<std::shared_ptr<Function<spacedim>>> &enrichments,
       const std::map<unsigned int, std::map<unsigned int, unsigned int>>
         &cellwise_color_predicate_map,
@@ -916,7 +916,7 @@ namespace ColorEnriched
     template <int dim, int spacedim>
     void
     make_fe_collection_from_colored_enrichments(
-      const unsigned int &num_colors,
+      const unsigned int &n_colors,
       const std::vector<std::set<unsigned int>>
         &fe_sets, // total list of color sets possible
       const std::vector<std::function<const Function<spacedim> *(
@@ -1202,7 +1202,7 @@ namespace ColorEnriched
     /**
      * Total number of different colors in predicate_colors
      */
-    unsigned int num_colors;
+    unsigned int n_colors;
 
     /**
      * A map of maps used to associate
index 6be53063c945be9ef9f8c17c96b8d4b4270c5b61..4eaa94646b63bdba04602763bce65e2ed0b8bc5b 100644 (file)
@@ -1334,7 +1334,7 @@ namespace ColorEnriched
     template <int dim, int spacedim>
     void
     make_colorwise_enrichment_functions(
-      const unsigned int &                                    num_colors,
+      const unsigned int &                                    n_colors,
       const std::vector<std::shared_ptr<Function<spacedim>>> &enrichments,
       const std::map<unsigned int, std::map<unsigned int, unsigned int>>
         &cellwise_color_predicate_map,
@@ -1358,8 +1358,8 @@ namespace ColorEnriched
       // In other words, using the previously collected information in
       // this function we translate a vector of user provided enrichment
       // functions into a vector of functions suitable for FE_Enriched class.
-      color_enrichments.resize(num_colors);
-      for (unsigned int i = 0; i < num_colors; ++i)
+      color_enrichments.resize(n_colors);
+      for (unsigned int i = 0; i < n_colors; ++i)
         {
           color_enrichments[i] =
             [&, i](const typename Triangulation<dim, spacedim>::cell_iterator
@@ -1382,7 +1382,7 @@ namespace ColorEnriched
     template <int dim, int spacedim>
     void
     make_fe_collection_from_colored_enrichments(
-      const unsigned int &                       num_colors,
+      const unsigned int &                       n_colors,
       const std::vector<std::set<unsigned int>> &fe_sets,
       const std::vector<std::function<const Function<spacedim> *(
         const typename Triangulation<dim, spacedim>::cell_iterator &)>>
@@ -1411,10 +1411,10 @@ namespace ColorEnriched
            ++color_set_id)
         {
           std::vector<const FiniteElement<dim, spacedim> *> vec_fe_enriched(
-            num_colors, &fe_nothing);
+            n_colors, &fe_nothing);
           std::vector<std::vector<std::function<const Function<spacedim> *(
             const typename Triangulation<dim, spacedim>::cell_iterator &)>>>
-            functions(num_colors, {dummy_function});
+            functions(n_colors, {dummy_function});
 
           for (const auto it : fe_sets[color_set_id])
             {
@@ -1461,7 +1461,7 @@ namespace ColorEnriched
     , fe_nothing(fe_base.n_components(), true)
     , predicates(predicates)
     , enrichments(enrichments)
-    , num_colors(numbers::invalid_unsigned_int)
+    , n_colors(numbers::invalid_unsigned_int)
   {
     AssertDimension(predicates.size(), enrichments.size());
     AssertDimension(fe_base.n_components(), fe_enriched.n_components());
@@ -1478,7 +1478,7 @@ namespace ColorEnriched
   {
     // color the predicates based on connections between corresponding
     // subdomains
-    num_colors =
+    n_colors =
       internal::color_predicates(dof_handler, predicates, predicate_colors);
 
     // create color maps and color list for each cell
@@ -1490,10 +1490,10 @@ namespace ColorEnriched
     // setup color wise enrichment functions
     // i'th function corresponds to (i+1) color!
     internal::make_colorwise_enrichment_functions<dim, spacedim>(
-      num_colors, enrichments, cellwise_color_predicate_map, color_enrichments);
+      n_colors, enrichments, cellwise_color_predicate_map, color_enrichments);
 
     // make FE_Collection
-    internal::make_fe_collection_from_colored_enrichments(num_colors,
+    internal::make_fe_collection_from_colored_enrichments(n_colors,
                                                           fe_sets,
                                                           color_enrichments,
                                                           fe_base,

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.