* Given a vector of <i>n</i> one-dimensional polynomials
* <i>P<sub>0</sub></i> to <i>P<sub>n</sub></i>, where
* <i>P<sub>i</sub></i> has degree <i>i</i>, this class generates all
- * multi-dimensional polynomials of the form <i>
+ * dim-dimensional polynomials of the form <i>
* P<sub>ijk</sub>(x,y,z) =
* P<sub>i</sub>(x)P<sub>j</sub>(y)P<sub>k</sub>(z)</i>, where the sum
* of <i>i</i>, <i>j</i> and <i>k</i> is less than or equal <i>n</i>.
*
* The @ref{output_indices} function prints the ordering of the
- * polynomials, i.e. for each multi-dimensional polynomial in the
+ * polynomials, i.e. for each dim-dimensional polynomial in the
* polynomial space it gives the indices i,j,k of the one-dimensional
* polynomials in x,y and z direction. The ordering of the
- * multi-dimensional polynomials can be changed by using the
+ * dim-dimensional polynomials can be changed by using the
* @p{set_polynomial_ordering} function.
*
* @author Guido Kanschat, 2002, Wolfgang Bangerth, 2003, Ralf Hartmann 2004
* <tt>index_map.size()==n()</tt>. Stores
* a copy of <tt>index_map</tt>.
*/
- void set_polynomial_ordering(const std::vector<unsigned int> &index_map);
+ void set_renumbering(const std::vector<unsigned int> &index_map);
/**
* Computes the value and the
* Index map for reordering the
* polynomials.
*/
- std::vector<unsigned int> reverse_index_map;
+ std::vector<unsigned int> index_map_inverse;
/**
* Static function used in the
polynomials (pols.begin(), pols.end()),
n_pols (compute_n_pols(polynomials.size())),
index_map(n_pols),
- reverse_index_map(n_pols)
+ index_map_inverse(n_pols)
{
// per default set this index map
// to identity. This map can be
// changed by the user through the
- // set_polynomial_ordering function
+ // set_renumbering function
for (unsigned int i=0; i<n_pols; ++i)
{
index_map[i]=i;
- reverse_index_map[i]=i;
+ index_map_inverse[i]=i;
}
}
template <int dim>
void
-PolynomialSpace<dim>::set_polynomial_ordering(
- const std::vector<unsigned int> &imap)
+PolynomialSpace<dim>::set_renumbering(
+ const std::vector<unsigned int> &renumber)
{
- Assert(imap.size()==index_map.size(),
- ExcDimensionMismatch(imap.size(), index_map.size()));
+ Assert(renumber.size()==index_map.size(),
+ ExcDimensionMismatch(renumber.size(), index_map.size()));
- index_map=imap;
+ index_map=renumber;
for (unsigned int i=0; i<index_map.size(); ++i)
- reverse_index_map[index_map[i]]=i;
+ index_map_inverse[index_map[i]]=i;
}
for (unsigned int iz=0;iz<((dim>2) ? n_1d : 1);++iz)
for (unsigned int iy=0;iy<((dim>1) ? n_1d-iz : 1);++iy)
for (unsigned int ix=0; ix<n_1d-iy-iz; ++ix)
- values[reverse_index_map[k++]] =
+ values[index_map_inverse[k++]] =
v[0][ix][0]
* ((dim>1) ? v[1][iy][0] : 1.)
* ((dim>2) ? v[2][iz][0] : 1.);
for (unsigned int iy=0;iy<((dim>1) ? n_1d-iz : 1);++iy)
for (unsigned int ix=0; ix<n_1d-iy-iz; ++ix)
{
- const unsigned int k2=reverse_index_map[k++];
+ const unsigned int k2=index_map_inverse[k++];
for (unsigned int d=0;d<dim;++d)
grads[k2][d] = v[0][ix][(d==0) ? 1 : 0]
* ((dim>1) ? v[1][iy][(d==1) ? 1 : 0] : 1.)
for (unsigned int iy=0;iy<((dim>1) ? n_1d-iz : 1);++iy)
for (unsigned int ix=0; ix<n_1d-iy-iz; ++ix)
{
- const unsigned int k2=reverse_index_map[k++];
+ const unsigned int k2=index_map_inverse[k++];
for (unsigned int d1=0; d1<dim; ++d1)
for (unsigned int d2=0; d2<dim; ++d2)
{