* 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.
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,
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> *(
/**
* Total number of different colors in predicate_colors
*/
- unsigned int num_colors;
+ unsigned int n_colors;
/**
* A map of maps used to associate
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,
// 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
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 &)>>
++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])
{
, 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());
{
// 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
// 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,