From: Denis Davydov Date: Fri, 24 Aug 2018 13:31:12 +0000 (+0200) Subject: replace num_colors by n_colors X-Git-Tag: v9.1.0-rc1~780^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7115%2Fhead;p=dealii.git replace num_colors by n_colors --- diff --git a/include/deal.II/fe/fe_enriched.h b/include/deal.II/fe/fe_enriched.h index 32cf2cf0e9..a7e903819d 100644 --- a/include/deal.II/fe/fe_enriched.h +++ b/include/deal.II/fe/fe_enriched.h @@ -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 void make_colorwise_enrichment_functions( - const unsigned int & num_colors, + const unsigned int & n_colors, const std::vector>> &enrichments, const std::map> &cellwise_color_predicate_map, @@ -916,7 +916,7 @@ namespace ColorEnriched template void make_fe_collection_from_colored_enrichments( - const unsigned int &num_colors, + const unsigned int &n_colors, const std::vector> &fe_sets, // total list of color sets possible const std::vector *( @@ -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 diff --git a/source/fe/fe_enriched.cc b/source/fe/fe_enriched.cc index 6be53063c9..4eaa94646b 100644 --- a/source/fe/fe_enriched.cc +++ b/source/fe/fe_enriched.cc @@ -1334,7 +1334,7 @@ namespace ColorEnriched template void make_colorwise_enrichment_functions( - const unsigned int & num_colors, + const unsigned int & n_colors, const std::vector>> &enrichments, const std::map> &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::cell_iterator @@ -1382,7 +1382,7 @@ namespace ColorEnriched template void make_fe_collection_from_colored_enrichments( - const unsigned int & num_colors, + const unsigned int & n_colors, const std::vector> &fe_sets, const std::vector *( const typename Triangulation::cell_iterator &)>> @@ -1411,10 +1411,10 @@ namespace ColorEnriched ++color_set_id) { std::vector *> vec_fe_enriched( - num_colors, &fe_nothing); + n_colors, &fe_nothing); std::vector *( const typename Triangulation::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( - 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,