/* clang-format off */
// find the least dominating FE from a set of FEs on faces (codim=1).
-// for this task we concatenate the two functions
-// FECollection::find_common_subspace() and FECollection::find_dominated_fe().
+// for this task we call FECollection::find_dominating_fe_extended(), which
+// concatenates the two functions FECollection::find_common_fes() and
+// FECollection::find_dominated_fe().
// we test the results for the following collections:
// {Q1, Q2, Q3, Q4} with {2,3} => Q3 2
// {Q1xQ1, Q2xQ2, Q3xQ4, Q4xQ3} with {2,3} => Q2xQ2 1
// {Q1xQ1, Q2xQ2, Q3xQ4, Q4xQ3}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(1), 1));
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(2), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
deallog << fe_collection.find_dominating_fe_extended(fes, /*codim=*/1)
// {Q1xQ1, Q3xQ4, Q4xQ3}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(1), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
std::set<unsigned int> fes;
// {0x0, 0x0, Q1x0, 0xQ1}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(), 1, FE_Nothing<dim>(), 1));
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(), 1, FE_Nothing<dim>(), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(), 2));
fe_collection.push_back(
FESystem<dim>(FE_Q<dim>(1), 1, FE_Nothing<dim>(), 1));
fe_collection.push_back(
// {0x0, 0x0, Q1x0, 0xQ1}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(1, true), 1, FE_Nothing<dim>(1, true), 1));
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(1, true), 1, FE_Nothing<dim>(1, true), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(1, true), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(1, true), 2));
fe_collection.push_back(
FESystem<dim>(FE_Q<dim>(1), 1, FE_Nothing<dim>(1, true), 1));
fe_collection.push_back(
// {Q1xQ1, Q1xQ1, Q2xQ1, Q1xQ2}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(1), 1));
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(1), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(1), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(2), 1));
deallog << fe_collection.find_dominating_fe_extended(fes, /*codim=*/1)
// {Q4xQ4, Q5xQ5, Q3xQ4, Q4xQ3}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(4), 1));
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(5), 1, FE_Q<dim>(5), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(5), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
const unsigned int ind =
/* clang-format off */
// find the most dominating FE from a set of FEs on faces (codim=1).
-// for this task we concatenate the two functions
-// FECollection::find_encapsulating_space() and FECollection::find_dominating_fe().
+// for this task we call FECollection::find_dominated_fe_extended(), which
+// concatenates the two functions FECollection::find_enclosing_fes() and
+// FECollection::find_dominating_fe().
// we test the results for the following collections:
// {Q1, Q2, Q3, Q4} with {2,3} => Q4 3
// {Q5xQ5, Q4xQ4, Q3xQ4, Q4xQ3} with {2,3} => Q4xQ4 1
// {Q5xQ5, Q4xQ4, Q3xQ4, Q4xQ3}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(5), 1, FE_Q<dim>(5), 1));
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(4), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(5), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
deallog << fe_collection.find_dominated_fe_extended(fes, /*codim=*/1)
// {Q5xQ5, Q3xQ4, Q4xQ3}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(5), 1, FE_Q<dim>(5), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(5), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
std::set<unsigned int> fes;
FESystem<dim>(FE_Q<dim>(1), 1, FE_Nothing<dim>(), 1));
fe_collection.push_back(
FESystem<dim>(FE_Nothing<dim>(), 1, FE_Q<dim>(1), 1));
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(), 1, FE_Nothing<dim>(), 1));
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(), 1, FE_Nothing<dim>(), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(), 2));
const unsigned int ind =
fe_collection.find_dominated_fe_extended(fes, /*codim=*/1);
if (ind == numbers::invalid_fe_index)
FESystem<dim>(FE_Q<dim>(1), 1, FE_Nothing<dim>(1, true), 1));
fe_collection.push_back(
FESystem<dim>(FE_Nothing<dim>(1, true), 1, FE_Q<dim>(1), 1));
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(1, true), 1, FE_Nothing<dim>(1, true), 1));
- fe_collection.push_back(
- FESystem<dim>(FE_Nothing<dim>(1, true), 1, FE_Nothing<dim>(1, true), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(1, true), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Nothing<dim>(1, true), 2));
deallog << fe_collection.find_dominated_fe_extended(fes, /*codim=*/1)
<< std::endl;
}
// {Q2xQ2, Q2xQ2, Q2xQ1, Q1xQ2}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(2), 1));
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(2), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(1), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(2), 1));
deallog << fe_collection.find_dominated_fe_extended(fes, /*codim=*/1)
// {Q2xQ2, Q3xQ3, Q3xQ4, Q4xQ3}
{
hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(2), 1));
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(3), 1));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 2));
+ fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 2));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
const unsigned int ind =
deallog << fe_collection.find_dominated_fe_extended(fes, /*codim=*/1)
<< std::endl;
}
-
- // Test compare_for_domination().
- // The test returns
- // FiniteElementDomination::Domination::either_element_can_dominate or 3.
- {
- hp::FECollection<dim> fe_collection;
- fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 3));
- fe_collection.push_back(
- FESystem<dim>(FE_Q<dim>(1), 2, FE_Nothing<dim>(), 1));
- deallog << "hello: "
- << fe_collection[0].compare_for_domination(fe_collection[1])
- << std::endl;
- }
}
int