From: Wolfgang Bangerth Date: Wed, 1 Jun 2022 19:25:00 +0000 (-0600) Subject: Optimize computation of Nedelec shape functions. X-Git-Tag: v9.5.0-rc1~1198^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6e7fb7b541d190c6c26a083c4f811c79212c9f4;p=dealii.git Optimize computation of Nedelec shape functions. --- diff --git a/source/fe/fe_nedelec.cc b/source/fe/fe_nedelec.cc index 677fa68973..b4ea2dbc41 100644 --- a/source/fe/fe_nedelec.cc +++ b/source/fe/fe_nedelec.cc @@ -84,19 +84,18 @@ FE_Nedelec::FE_Nedelec(const unsigned int order) Assert(dim >= 2, ExcImpossibleInDim(dim)); - const unsigned int n_dofs = this->n_dofs_per_cell(); - this->mapping_kind = {mapping_nedelec}; // First, initialize the // generalized support points and // quadrature weights, since they // are required for interpolation. initialize_support_points(order); - this->inverse_node_matrix.reinit(n_dofs, n_dofs); - this->inverse_node_matrix.fill(FullMatrix(IdentityMatrix(n_dofs))); - // From now on, the shape functions - // will be the correct ones, not - // the raw shape functions anymore. + + // We already use the correct basis, so no basis transformation is required + // from the polynomial space we have described above to the one that is dual + // to the node functionals. As documented in the base class, this is + // expressed by setting the inverse node matrix to the empty matrix. + this->inverse_node_matrix.clear(); // do not initialize embedding and restriction here. these matrices are // initialized on demand in get_restriction_matrix and