--- /dev/null
+Fixed: In FE_Enriched element, avoid evaluating quadrature points if no dofs are
+assigned. This happens when FE_Nothing is used together with other FE
+(i.e. FE_Q) as enrichments in FE_Enriched constructor.
+<br>
+(Nivesh Dommaraju, 2018/01/15)
fe_data.enrichment[base_no].size()));
for (unsigned int m=0; m < base_no_mult_local_enriched_dofs[base_no].size(); m++)
{
+ //Avoid evaluating quadrature points if no dofs are assigned. This
+ //happens when FE_Nothing is used together with other FE (i.e. FE_Q) as enrichments.
+ if (base_no_mult_local_enriched_dofs[base_no][m].size()==0)
+ continue;
+
Assert (enrichments[base_no-1][m](cell) != nullptr,
ExcMessage("The pointer to the enrichment function is NULL"));
p2[0] = 10.0;
p3[0] = 5.0;
EnrichmentFunction<dim> fun1(p1), fun2(p2),fun3(p3);
- std::vector<const FiniteElement<dim> *> fe_enrichements(2);
+ std::vector<const FiniteElement<dim> *> fe_enrichements(3);
fe_enrichements[0] = &fe_en1;
fe_enrichements[1] = &fe_en2;
- std::vector<std::vector<std::function<const Function<dim> *(const typename Triangulation<dim, dim>::cell_iterator &) > > > functions(2);
+ FE_Nothing<dim> fe_nothing(1,true);
+ fe_enrichements[2] = &fe_nothing; //should be ignored
+ std::vector<std::vector<std::function<const Function<dim> *(const typename Triangulation<dim, dim>::cell_iterator &) > > > functions(3);
functions[0].resize(1);
functions[0][0] = [&](const typename Triangulation<dim, dim>::cell_iterator &)
{
{
return &fun3;
};
+ functions[2].resize(1);
+ functions[2][0] = [&](const typename Triangulation<dim, dim>::cell_iterator &)
+ {
+ AssertThrow(false, ExcMessage("Called enrichment function for FE_Nothing"));
+ return nullptr;
+ };
FE_Enriched<dim> fe_enriched(&fe_base,
fe_enrichements,