From: Daniel Arndt Date: Thu, 21 May 2020 16:31:37 +0000 (-0400) Subject: Avoid unnecessary casts X-Git-Tag: v9.3.0-rc1~1594^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a4ad72c512891ab2d97b1f8e0074bc8e9620b3c;p=dealii.git Avoid unnecessary casts --- diff --git a/source/fe/fe_dgp_monomial.cc b/source/fe/fe_dgp_monomial.cc index f505bb986f..61477873f3 100644 --- a/source/fe/fe_dgp_monomial.cc +++ b/source/fe/fe_dgp_monomial.cc @@ -233,13 +233,10 @@ FE_DGPMonomial::get_interpolation_matrix( source_fe_matrix(k, j) = source_fe.shape_value(j, unit_points[k]); FullMatrix this_matrix(this->dofs_per_cell, this->dofs_per_cell); - auto *const polynomial_space_p = - dynamic_cast *>(this->poly_space.get()); - Assert(polynomial_space_p != nullptr, ExcInternalError()); for (unsigned int j = 0; j < this->dofs_per_cell; ++j) for (unsigned int k = 0; k < unit_points.size(); ++k) this_matrix(k, j) = - polynomial_space_p->compute_value(j, unit_points[k]); + this->poly_space->compute_value(j, unit_points[k]); this_matrix.gauss_jordan(); diff --git a/source/fe/fe_dgq.cc b/source/fe/fe_dgq.cc index ad26b3049d..85670d6e0e 100644 --- a/source/fe/fe_dgq.cc +++ b/source/fe/fe_dgq.cc @@ -303,14 +303,11 @@ FE_DGQ::get_interpolation_matrix( // cell and evaluate the // shape functions there const Point p = this->unit_support_points[j]; - auto *const polynomial_space_p = - dynamic_cast *>(this->poly_space.get()); - Assert(polynomial_space_p != nullptr, ExcInternalError()); for (unsigned int i = 0; i < this->dofs_per_cell; ++i) - cell_interpolation(j, i) = polynomial_space_p->compute_value(i, p); + cell_interpolation(j, i) = this->poly_space->compute_value(i, p); for (unsigned int i = 0; i < source_fe.dofs_per_cell; ++i) - source_interpolation(j, i) = polynomial_space_p->compute_value(i, p); + source_interpolation(j, i) = source_fe.poly_space->compute_value(i, p); } // then compute the