Navigation Menu

Skip to content

Commit

Permalink
Fix another GCC11 warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
drwells committed Jun 7, 2021
1 parent 991518b commit c575b70
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions source/fe/fe_simplex_p.cc
Expand Up @@ -35,26 +35,38 @@ namespace
std::vector<unsigned int>
get_dpo_vector_fe_p(const unsigned int dim, const unsigned int degree)
{
std::vector<unsigned int> dpo(dim + 1, 0U);
Assert(degree == 1 || degree == 2, ExcNotImplemented());

if (degree == 1)
{
// one dof at each vertex
dpo[0] = 1;
}
else if (degree == 2)
{
// one dof at each vertex and in the middle of each line
dpo[0] = 1;
dpo[1] = 1;
dpo[2] = 0;
}
else
switch (dim)
{
Assert(false, ExcNotImplemented());
case 1:
switch (degree)
{
case 1:
return {1, 0};
case 2:
return {1, 1};
}
case 2:
switch (degree)
{
case 1:
return {1, 0, 0};
case 2:
return {1, 1, 0};
}
case 3:
switch (degree)
{
case 1:
return {1, 0, 0, 0};
case 2:
return {1, 1, 0, 0};
}
}

return dpo;
Assert(false, ExcNotImplemented());
return {};
}

/**
Expand Down

0 comments on commit c575b70

Please sign in to comment.