It's ocassionally useful to access the polynomials constructed in a basis directly.
static BarycentricPolynomials<dim>
get_fe_p_basis(const unsigned int degree);
- /*
+ /**
* Constructor taking the polynomial @p degree as input.
*/
BarycentricPolynomials(
const std::vector<BarycentricPolynomial<dim>> &polynomials);
+ /**
+ * Access operator.
+ */
+ const BarycentricPolynomial<dim> &operator[](const std::size_t i) const;
+
/**
* @copydoc ScalarPolynomialsBase::evaluate()
*/
}
return result;
}
+
+ template <int dim>
+ const BarycentricPolynomial<dim> &BarycentricPolynomials<dim>::
+ operator[](const std::size_t i) const
+ {
+ AssertIndexRange(i, polys.size());
+ return polys[i];
+ }
} // namespace Simplex
DEAL_II_NAMESPACE_CLOSE
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams