const unsigned int n1 = (dim > 0) ? n : 1;
const unsigned int n2 = (dim > 1) ? n : 1;
const unsigned int n3 = (dim > 2) ? n : 1;
+ const unsigned int x_minus = (dim > 0) ? 0 : 0;
+ const unsigned int x_plus = (dim > 0) ? 1 : 0;
+ const unsigned int y_minus = (dim > 1) ? 2 : 0;
+ const unsigned int y_plus = (dim > 1) ? 3 : 0;
+ const unsigned int z_minus = (dim > 2) ? 4 : 0;
+ const unsigned int z_plus = (dim > 2) ? 5 : 0;
unsigned int cells_per_patch = Utilities::fixed_power<dim>(n);
unsigned int dx = 1;
unsigned int dy = n;
// Direction -x Last cell in row of other patch
if (i1 == 0)
{
- const unsigned int nn = patch.neighbors[0];
+ const unsigned int nn = patch.neighbors[x_minus];
out << '\t';
if (nn != patch.no_neighbor)
out
// Direction +x First cell in row of other patch
if (i1 == n - 1)
{
- const unsigned int nn = patch.neighbors[1];
+ const unsigned int nn = patch.neighbors[x_plus];
out << '\t';
if (nn != patch.no_neighbor)
out << (nn * cells_per_patch + ny + nz);
// Direction -y
if (i2 == 0)
{
- const unsigned int nn = patch.neighbors[2];
+ const unsigned int nn = patch.neighbors[y_minus];
out << '\t';
if (nn != patch.no_neighbor)
out
// Direction +y
if (i2 == n - 1)
{
- const unsigned int nn = patch.neighbors[3];
+ const unsigned int nn = patch.neighbors[y_plus];
out << '\t';
if (nn != patch.no_neighbor)
out << (nn * cells_per_patch + nx + nz);
// Direction -z
if (i3 == 0)
{
- const unsigned int nn = patch.neighbors[4];
+ const unsigned int nn = patch.neighbors[z_minus];
out << '\t';
if (nn != patch.no_neighbor)
out
// Direction +z
if (i3 == n - 1)
{
- const unsigned int nn = patch.neighbors[5];
+ const unsigned int nn = patch.neighbors[z_plus];
out << '\t';
if (nn != patch.no_neighbor)
out << (nn * cells_per_patch + nx + ny);
double monoval_jplus[dim][n_derivatives + 1];
unsigned int start = n_sub;
-
+#ifdef DEAL_II_HAVE_CXX17
+ if constexpr (dim == 2)
+#else
if (dim == 2)
+#endif
{
// In 2d the curl part of the space is spanned by the vectors
// of two types. The first one is
}
Assert(start == this->n() - my_degree - 1, ExcInternalError());
}
+#ifdef DEAL_II_HAVE_CXX17
+ else if constexpr (dim == 3)
+#else
else if (dim == 3)
+#endif
{
// In 3d the first type of basis vector is
// [ x^i * y^j * z^k * (j+k+2) ]