* FiniteElement::prolongation
* matrices.
*
- * @param fe The finite element
+ * @param <tt>fe</tt> The finite element
* class for which we compute the
- * embedding matrices. @param
- * matrices A reference to
+ * embedding matrices.
+ *
+ * @param
+ * <tt>matrices</tt> A reference to
* <tt>RefinementCase<dim>::isotropic_refinement</tt>
* vectors of FullMatrix
* objects. Each vector
* is the format used in
* FiniteElement, where we want
* to use this function mostly.
+ *
+ * @param
+ * <tt>isotropic_only</tt>: set
+ * this <tt>true</tt> if you only
+ * want to compute matrices for
+ * isotropic refinement.
*/
template <int dim, typename number, int spacedim>
static void compute_embedding_matrices(const FiniteElement<dim,spacedim> &fe,
- std::vector<std::vector<FullMatrix<number> > >& matrices);
+ std::vector<std::vector<FullMatrix<number> > >& matrices,
+ const bool isotropic_only = false);
/**
* Compute the embedding matrices
const bool isotropic_prolongation_only)
{
for (unsigned int ref_case=RefinementCase<dim>::cut_x;
- ref_case<RefinementCase<dim>::isotropic_refinement+1; ++ref_case)
+ ref_case <= RefinementCase<dim>::isotropic_refinement; ++ref_case)
{
const unsigned int nc = GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
template <int dim, typename number, int spacedim>
void
FETools::compute_embedding_matrices(const FiniteElement<dim,spacedim>& fe,
- std::vector<std::vector<FullMatrix<number> > >& matrices)
+ std::vector<std::vector<FullMatrix<number> > >& matrices,
+ const bool isotropic_only)
{
const unsigned int n = fe.dofs_per_cell;
const unsigned int degree = fe.degree;
// loop over all possible refinement cases
- for (unsigned int ref_case=RefinementCase<dim>::cut_x;
- ref_case<RefinementCase<dim>::isotropic_refinement+1; ++ref_case)
+ unsigned int ref_case = (isotropic_only)
+ ? RefinementCase<dim>::isotropic_refinement
+ : RefinementCase<dim>::cut_x;
+
+ for (;ref_case <= RefinementCase<dim>::isotropic_refinement; ++ref_case)
{
const unsigned int nc = GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
for (unsigned int i=0;i<nc;++i)
template
void FETools::compute_embedding_matrices<deal_II_dimension>
-(const FiniteElement<deal_II_dimension> &, std::vector<std::vector<FullMatrix<double> > >&);
+(const FiniteElement<deal_II_dimension> &, std::vector<std::vector<FullMatrix<double> > >&,bool);
template
void FETools::compute_face_embedding_matrices<deal_II_dimension,double>