33 result.dofs_per_object_exclusive.resize(4, std::vector<unsigned int>(1));
34 result.dofs_per_object_inclusive.resize(4, std::vector<unsigned int>(1));
35 result.object_index.resize(4, std::vector<unsigned int>(1));
36 result.first_object_index_on_face.resize(3, std::vector<unsigned int>(1));
40 result.dofs_per_object_exclusive[0][0] = dofs_per_vertex;
44 result.dofs_per_object_exclusive[1][0] = dofs_per_line;
48 result.dofs_per_object_exclusive[2][0] = dofs_per_quad;
52 result.dofs_per_object_exclusive[3][0] = dofs_per_hex;
56 const unsigned int first_line_index =
58 result.object_index[1][0] = first_line_index;
61 const unsigned int first_quad_index =
62 (first_line_index + cell_type.
n_lines() * dofs_per_line);
63 result.object_index[2][0] = first_quad_index;
66 result.object_index[3][0] =
68 (dim == 2 ? 1 : (dim == 3 ? cell_type.
n_faces() : 0)) * dofs_per_quad);
71 result.first_object_index_on_face[1][0] =
75 result.first_object_index_on_face[2][0] =
82 result.dofs_per_object_inclusive[dim - 1][0] =
85 (dim == 3 ? 1 : 0) * dofs_per_quad);
89 result.dofs_per_object_inclusive[dim][0] =
91 cell_type.
n_lines() * dofs_per_line +
92 (dim == 2 ? 1 : (dim == 3 ? cell_type.
n_faces() : 0)) * dofs_per_quad +
93 (dim == 3 ? 1 : 0) * dofs_per_hex);
155 const unsigned int n_components,
156 const unsigned int degree,
159 : reference_cell_kind(reference_cell)
160 , number_of_unique_2d_subobjects(
161 internal::number_unique_entries(data.dofs_per_object_inclusive[2]))
162 , number_unique_faces(
163 internal::number_unique_entries(data.dofs_per_object_inclusive[dim - 1]))
164 , dofs_per_vertex(data.dofs_per_object_exclusive[0][0])
165 , dofs_per_line(data.dofs_per_object_exclusive[1][0])
166 , n_dofs_on_quad(data.dofs_per_object_exclusive[2])
167 , dofs_per_quad(n_dofs_on_quad[0])
169 *
max_element(n_dofs_on_quad.begin(), n_dofs_on_quad.end()))
170 , dofs_per_hex(data.dofs_per_object_exclusive[3][0])
171 , first_line_index(data.object_index[1][0])
172 , first_index_of_quads(data.object_index[2])
173 , first_quad_index(first_index_of_quads[0])
174 , first_hex_index(data.object_index[3][0])
175 , first_line_index_of_faces(data.first_object_index_on_face[1])
176 , first_face_line_index(first_line_index_of_faces[0])
177 , first_quad_index_of_faces(data.first_object_index_on_face[2])
178 , first_face_quad_index(first_quad_index_of_faces[0])
179 , n_dofs_on_face(data.dofs_per_object_inclusive[dim - 1])
180 , dofs_per_face(n_dofs_on_face[0])
182 *
max_element(n_dofs_on_face.begin(), n_dofs_on_face.end()))
183 , dofs_per_cell(data.dofs_per_object_inclusive[dim][0])
184 , components(n_components)
187 , block_indices_data(block_indices.size() == 0 ?
FiniteElementData(const std::vector< unsigned int > &dofs_per_object, const unsigned int n_components, const unsigned int degree, const Conformity conformity=unknown, const BlockIndices &block_indices=BlockIndices())