dofs_per_line =
accessor.get_fe(fe_index).dofs_per_line;
std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
- for (unsigned int vertex = 0; vertex < 2; ++vertex)
+ for (unsigned int vertex = 0; vertex < GeometryInfo<1>::vertices_per_cell;
+ ++vertex)
for (unsigned int d = 0; d < dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex, d, fe_index);
for (unsigned int d = 0; d < dofs_per_line; ++d)
dofs_per_quad =
accessor.get_fe(fe_index).dofs_per_quad;
std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
- for (unsigned int vertex = 0; vertex < 4; ++vertex)
+ for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_cell;
+ ++vertex)
for (unsigned int d = 0; d < dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex, d, fe_index);
// now copy dof numbers from the line. for
// to adjust the shape function indices that
// we see to correspond to the correct
// (face-local) ordering.
- for (unsigned int line = 0; line < 4; ++line)
+ for (unsigned int line = 0; line < GeometryInfo<2>::vertices_per_cell;
+ ++line)
for (unsigned int d = 0; d < dofs_per_line; ++d)
*next++ = accessor.line(line)->dof_index(
accessor.get_fe(fe_index)
accessor.get_fe(fe_index).dofs_per_quad,
dofs_per_hex = accessor.get_fe(fe_index).dofs_per_hex;
std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
- for (unsigned int vertex = 0; vertex < 8; ++vertex)
+ for (unsigned int vertex = 0; vertex < GeometryInfo<3>::vertices_per_cell;
+ ++vertex)
for (unsigned int d = 0; d < dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex, d, fe_index);
// now copy dof numbers from the line. for
// adjust the shape function indices that we
// see to correspond to the correct
// (cell-local) ordering.
- for (unsigned int line = 0; line < 12; ++line)
+ for (unsigned int line = 0; line < GeometryInfo<3>::lines_per_cell;
+ ++line)
for (unsigned int d = 0; d < dofs_per_line; ++d)
*next++ = accessor.line(line)->dof_index(
accessor.get_fe(fe_index)
// correct (cell-local) ordering. The same
// applies, if the face_rotation or
// face_orientation is non-standard
- for (unsigned int quad = 0; quad < 6; ++quad)
+ for (unsigned int quad = 0; quad < GeometryInfo<3>::faces_per_cell;
+ ++quad)
for (unsigned int d = 0; d < dofs_per_quad; ++d)
*next++ = accessor.quad(quad)->dof_index(
accessor.get_fe(fe_index)
{
case 1:
Assert(dof_indices.size() ==
- (2 * this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ (GeometryInfo<1>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
this->dof_handler->get_fe(fe_index).dofs_per_line),
ExcVectorDoesNotMatch());
break;
case 2:
Assert(dof_indices.size() ==
- (4 * this->dof_handler->get_fe(fe_index).dofs_per_vertex +
- 4 * this->dof_handler->get_fe(fe_index).dofs_per_line +
+ (GeometryInfo<2>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<2>::lines_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_line +
this->dof_handler->get_fe(fe_index).dofs_per_quad),
ExcVectorDoesNotMatch());
break;
case 3:
Assert(dof_indices.size() ==
- (8 * this->dof_handler->get_fe(fe_index).dofs_per_vertex +
- 12 * this->dof_handler->get_fe(fe_index).dofs_per_line +
- 6 * this->dof_handler->get_fe(fe_index).dofs_per_quad +
+ (GeometryInfo<3>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<3>::lines_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_line +
+ GeometryInfo<3>::faces_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_quad +
this->dof_handler->get_fe(fe_index).dofs_per_hex),
ExcVectorDoesNotMatch());
break;
case 1:
{
Assert(dof_indices.size() ==
- 2 * this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<1>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
this->dof_handler->get_fe(fe_index).dofs_per_line,
ExcVectorDoesNotMatch());
break;
case 2:
{
Assert(dof_indices.size() ==
- 4 * (this->dof_handler->get_fe(fe_index).dofs_per_vertex +
- this->dof_handler->get_fe(fe_index).dofs_per_line) +
+ GeometryInfo<2>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<2>::lines_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_line +
this->dof_handler->get_fe(fe_index).dofs_per_quad,
ExcVectorDoesNotMatch());
break;
case 3:
{
Assert(dof_indices.size() ==
- 8 * this->dof_handler->get_fe(fe_index).dofs_per_vertex +
- 12 * this->dof_handler->get_fe(fe_index).dofs_per_line +
- 6 * this->dof_handler->get_fe(fe_index).dofs_per_quad +
+ GeometryInfo<3>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<3>::lines_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_line +
+ GeometryInfo<3>::faces_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_quad +
this->dof_handler->get_fe(fe_index).dofs_per_hex,
ExcVectorDoesNotMatch());
break;
case 1:
{
Assert(dof_indices.size() ==
- 2 * this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<1>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
this->dof_handler->get_fe(fe_index).dofs_per_line,
ExcVectorDoesNotMatch());
break;
case 2:
{
Assert(dof_indices.size() ==
- 4 * (this->dof_handler->get_fe(fe_index).dofs_per_vertex +
- this->dof_handler->get_fe(fe_index).dofs_per_line) +
+ GeometryInfo<2>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<2>::lines_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_line +
this->dof_handler->get_fe(fe_index).dofs_per_quad,
ExcVectorDoesNotMatch());
break;
case 3:
{
Assert(dof_indices.size() ==
- 8 * this->dof_handler->get_fe(fe_index).dofs_per_vertex +
- 12 * this->dof_handler->get_fe(fe_index).dofs_per_line +
- 6 * this->dof_handler->get_fe(fe_index).dofs_per_quad +
+ GeometryInfo<3>::vertices_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ GeometryInfo<3>::lines_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_line +
+ GeometryInfo<3>::faces_per_cell *
+ this->dof_handler->get_fe(fe_index).dofs_per_quad +
this->dof_handler->get_fe(fe_index).dofs_per_hex,
ExcVectorDoesNotMatch());
break;
->cell_dof_indices_cache.begin() +
accessor.present_index * dofs_per_cell);
- for (unsigned int vertex = 0; vertex < 2; ++vertex)
+ for (unsigned int vertex = 0;
+ vertex < GeometryInfo<1>::vertices_per_cell;
+ ++vertex)
for (unsigned int d = 0; d < dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex, d);
for (unsigned int d = 0; d < dofs_per_line; ++d)
->cell_dof_indices_cache.begin() +
accessor.present_index * dofs_per_cell);
- for (unsigned int vertex = 0; vertex < 4; ++vertex)
+ for (unsigned int vertex = 0;
+ vertex < GeometryInfo<2>::vertices_per_cell;
+ ++vertex)
for (unsigned int d = 0; d < dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex, d);
- for (unsigned int line = 0; line < 4; ++line)
+ for (unsigned int line = 0; line < GeometryInfo<2>::lines_per_cell;
+ ++line)
for (unsigned int d = 0; d < dofs_per_line; ++d)
*next++ = accessor.line(line)->dof_index(d);
for (unsigned int d = 0; d < dofs_per_quad; ++d)
->cell_dof_indices_cache.begin() +
accessor.present_index * dofs_per_cell);
- for (unsigned int vertex = 0; vertex < 8; ++vertex)
+ for (unsigned int vertex = 0;
+ vertex < GeometryInfo<3>::vertices_per_cell;
+ ++vertex)
for (unsigned int d = 0; d < dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex, d);
// now copy dof numbers from the line. for
// adjust the shape function indices that we
// see to correspond to the correct
// (cell-local) ordering.
- for (unsigned int line = 0; line < 12; ++line)
+ for (unsigned int line = 0; line < GeometryInfo<3>::lines_per_cell;
+ ++line)
for (unsigned int d = 0; d < dofs_per_line; ++d)
*next++ = accessor.line(line)->dof_index(
accessor.dof_handler->get_fe()
// correct (cell-local) ordering. The same
// applies, if the face_rotation or
// face_orientation is non-standard
- for (unsigned int quad = 0; quad < 6; ++quad)
+ for (unsigned int quad = 0; quad < GeometryInfo<3>::faces_per_cell;
+ ++quad)
for (unsigned int d = 0; d < dofs_per_quad; ++d)
*next++ = accessor.quad(quad)->dof_index(
accessor.dof_handler->get_fe()
// quad to take it, b) which line
// therein it is if the face is
// oriented correctly
- static const unsigned int lookup_table[12][2] = {
- {4, 0}, // take first four lines from bottom face
- {4, 1},
- {4, 2},
- {4, 3},
-
- {5, 0}, // second four lines from top face
- {5, 1},
- {5, 2},
- {5, 3},
-
- {0, 0}, // the rest randomly
- {1, 0},
- {0, 1},
- {1, 1}};
+ static const unsigned int
+ lookup_table[GeometryInfo<3>::lines_per_cell][2] = {
+ {4, 0}, // take first four lines from bottom face
+ {4, 1},
+ {4, 2},
+ {4, 3},
+
+ {5, 0}, // second four lines from top face
+ {5, 1},
+ {5, 2},
+ {5, 3},
+
+ {0, 0}, // the rest randomly
+ {1, 0},
+ {0, 1},
+ {1, 1}};
// respect non-standard faces by calling the
// reordering function from GeometryInfo
// quad to take it, b) which line
// therein it is if the face is
// oriented correctly
- static const unsigned int lookup_table[12][2] = {
- {4, 0}, // take first four lines from bottom face
- {4, 1},
- {4, 2},
- {4, 3},
-
- {5, 0}, // second four lines from top face
- {5, 1},
- {5, 2},
- {5, 3},
-
- {0, 0}, // the rest randomly
- {1, 0},
- {0, 1},
- {1, 1}};
+ static const unsigned int
+ lookup_table[GeometryInfo<3>::lines_per_cell][2] = {
+ {4, 0}, // take first four lines from bottom face
+ {4, 1},
+ {4, 2},
+ {4, 3},
+
+ {5, 0}, // second four lines from top face
+ {5, 1},
+ {5, 2},
+ {5, 3},
+
+ {0, 0}, // the rest randomly
+ {1, 0},
+ {0, 1},
+ {1, 1}};
const unsigned int quad_index = lookup_table[line][0];
const unsigned int std_line_index = lookup_table[line][1];