* @param fe The finite element for which to compute these matrices.
*
* @param matrices An array of <i>GeometryInfo<dim>::subfaces_per_face =
- * 2<sup>dim-1</sup></i> FullMatrix objects,holding the embedding matrix for
+ * 2<sup>dim-1</sup></i> FullMatrix objects, holding the embedding matrix for
* each subface.
*
* @param face_coarse The number of the face on the coarse side of the face
*/
template <int dim, typename number, int spacedim>
void
- compute_face_embedding_matrices(
- const FiniteElement<dim, spacedim> &fe,
- FullMatrix<number> (&matrices)[GeometryInfo<dim>::max_children_per_face],
- const unsigned int face_coarse,
- const unsigned int face_fine,
- const double threshold = 1.e-12);
+ compute_face_embedding_matrices(const FiniteElement<dim, spacedim> &fe,
+ const ArrayView<FullMatrix<number>> &matrices,
+ const unsigned int face_coarse,
+ const unsigned int face_fine,
+ const double threshold = 1.e-12);
/**
* For all possible (isotropic and anisotropic) refinement cases compute the
template <int dim, typename number, int spacedim>
void
- compute_face_embedding_matrices(
- const FiniteElement<dim, spacedim> &fe,
- FullMatrix<number> (&matrices)[GeometryInfo<dim>::max_children_per_face],
- const unsigned int face_coarse,
- const unsigned int face_fine,
- const double threshold)
+ compute_face_embedding_matrices(const FiniteElement<dim, spacedim> &fe,
+ const ArrayView<FullMatrix<number>> &matrices,
+ const unsigned int face_coarse,
+ const unsigned int face_fine,
+ const double threshold)
{
+ AssertDimension(matrices.size(), GeometryInfo<dim>::max_children_per_face);
const unsigned int face_no = face_coarse;
Assert(face_coarse == 0, ExcNotImplemented());
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
face_embeddings[i].reinit(this->n_dofs_per_face(face_no),
this->n_dofs_per_face(face_no));
- FETools::compute_face_embedding_matrices(*this, face_embeddings, 0, 0, 1.);
+ FETools::compute_face_embedding_matrices(
+ *this, make_array_view(face_embeddings), 0, 0, 1.);
this->interface_constraints.reinit((1 << (dim - 1)) *
this->n_dofs_per_face(face_no),
this->n_dofs_per_face(face_no));
// TODO[TL]: for anisotropic refinement we will probably need a table of
// submatrices with an array for each refine case
FullMatrix<double> face_embeddings[GeometryInfo<dim>::max_children_per_face];
- for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
- face_embeddings[i].reinit(this->n_dofs_per_face(face_no),
- this->n_dofs_per_face(face_no));
- FETools::compute_face_embedding_matrices<dim, double>(*this,
- face_embeddings,
- 0,
- 0);
+ for (auto &face_embedding : face_embeddings)
+ face_embedding.reinit(this->n_dofs_per_face(face_no),
+ this->n_dofs_per_face(face_no));
+ FETools::compute_face_embedding_matrices(*this,
+ make_array_view(face_embeddings),
+ 0,
+ 0);
this->interface_constraints.reinit((1 << (dim - 1)) *
this->n_dofs_per_face(face_no),
this->n_dofs_per_face(face_no));
template void
compute_face_embedding_matrices<deal_II_dimension, double>(
const FiniteElement<deal_II_dimension> &,
- FullMatrix<double> (
- &)[GeometryInfo<deal_II_dimension>::max_children_per_face],
- unsigned int,
- unsigned int,
+ const ArrayView<FullMatrix<double>> &,
+ const unsigned int,
+ const unsigned int,
const double);
template void