std::ostrstream namebuf;
#endif
- namebuf << "FE_DGQ<" << dim << ">(" << degree << ")";
+ namebuf << "FE_DGQ<" << dim << ">(" << this->degree << ")";
#ifndef HAVE_STD_STRINGSTREAM
namebuf << std::ends;
FiniteElement<dim> *
FE_DGQ<dim>::clone() const
{
- return new FE_DGQ<dim>(degree);
+ return new FE_DGQ<dim>(this->degree);
}
FE_DGQ<dim>::rotate_indices (std::vector<unsigned int> &numbers,
const char direction) const
{
- const unsigned int n = degree+1;
+ const unsigned int n = this->degree+1;
unsigned int s = n;
for (unsigned int i=1;i<dim;++i)
s *= n;
for (unsigned int j=0; j<source_fe.dofs_per_cell; ++j)
sum += interpolation_matrix(i,j);
- Assert (std::fabs(sum-1) < 5e-14*std::max(degree,1U)*dim,
+ Assert (std::fabs(sum-1) < 5e-14*std::max(this->degree,1U)*dim,
ExcInternalError());
}
}
Assert (face_index < GeometryInfo<dim>::faces_per_cell,
ExcIndexRange (face_index, 0, GeometryInfo<dim>::faces_per_cell));
- unsigned int n = degree+1;
+ unsigned int n = this->degree+1;
unsigned int n2 = n*n;
switch (dim)
{
if (face_index==0 && shape_index < n)
return true;
- if (face_index==1 && (shape_index % n) == degree)
+ if (face_index==1 && (shape_index % n) == this->degree)
return true;
if (face_index==2 && shape_index >= this->dofs_per_cell-n)
return true;
std::ostrstream namebuf;
#endif
- namebuf << "FE_Q<" << dim << ">(" << degree << ")";
+ namebuf << "FE_Q<" << dim << ">(" << this->degree << ")";
#ifndef HAVE_STD_STRINGSTREAM
namebuf << std::ends;
FiniteElement<dim> *
FE_Q<dim>::clone() const
{
- return new FE_Q<dim>(degree);
+ return new FE_Q<dim>(this->degree);
}
for (unsigned int j=0; j<source_fe.dofs_per_cell; ++j)
sum += interpolation_matrix(i,j);
- Assert (std::fabs(sum-1) < 2e-14*degree*dim,
+ Assert (std::fabs(sum-1) < 2e-14*this->degree*dim,
ExcInternalError());
}
}
void FE_Q<dim>::initialize_unit_support_points ()
{
// number of points: (degree+1)^dim
- unsigned int n = degree+1;
+ unsigned int n = this->degree+1;
for (unsigned int i=1; i<dim; ++i)
- n *= degree+1;
+ n *= this->degree+1;
this->unit_support_points.resize(n);
const std::vector<unsigned int> &index_map_inverse=
this->poly_space.get_numbering_inverse();
- const double step = 1./degree;
+ const double step = 1./this->degree;
Point<dim> p;
unsigned int k=0;
- for (unsigned int iz=0; iz <= ((dim>2) ? degree : 0) ; ++iz)
- for (unsigned int iy=0; iy <= ((dim>1) ? degree : 0) ; ++iy)
- for (unsigned int ix=0; ix<=degree; ++ix)
+ for (unsigned int iz=0; iz <= ((dim>2) ? this->degree : 0) ; ++iz)
+ for (unsigned int iy=0; iy <= ((dim>1) ? this->degree : 0) ; ++iy)
+ for (unsigned int ix=0; ix<=this->degree; ++ix)
{
p(0) = ix * step;
if (dim>1)
const unsigned int codim = dim-1;
// number of points: (degree+1)^codim
- unsigned int n = degree+1;
+ unsigned int n = this->degree+1;
for (unsigned int i=1; i<codim; ++i)
- n *= degree+1;
+ n *= this->degree+1;
this->unit_face_support_points.resize(n);
const std::vector<unsigned int> &face_index_map_inverse=
FE_Q_Helper::invert_numbering(face_index_map);
- const double step = 1./degree;
+ const double step = 1./this->degree;
Point<codim> p;
unsigned int k=0;
- for (unsigned int iz=0; iz <= ((codim>2) ? degree : 0) ; ++iz)
- for (unsigned int iy=0; iy <= ((codim>1) ? degree : 0) ; ++iy)
- for (unsigned int ix=0; ix<=degree; ++ix)
+ for (unsigned int iz=0; iz <= ((codim>2) ? this->degree : 0) ; ++iz)
+ for (unsigned int iy=0; iy <= ((codim>1) ? this->degree : 0) ; ++iy)
+ for (unsigned int ix=0; ix<=this->degree; ++ix)
{
p(0) = ix * step;
if (codim>1)
// need inside deal.II
TensorProductPolynomials<dim-1>
face_polynomials (Polynomials::LagrangeEquidistant::
- generate_complete_basis (degree));
+ generate_complete_basis (this->degree));
Assert (face_polynomials.n() == this->dofs_per_face, ExcInternalError());
const unsigned int n_small_functions = this->interface_constraints_size()[0];
// constraint matrices, so make the
// check
if (dim == 3)
- if (degree < Matrices::n_constraint_matrices+1)
+ if (this->degree < Matrices::n_constraint_matrices+1)
{
FullMatrix<double> x;
x.TableBase<2,double>::reinit (this->interface_constraints_size());
- x.fill (Matrices::constraint_matrices[degree-1]);
+ x.fill (Matrices::constraint_matrices[this->degree-1]);
for (unsigned int i=0; i<x.m(); ++i)
for (unsigned int j=0; j<x.n(); ++j)
// well, but until this happens we
// rather prefer to go back to the
// precomputed matrices in 3d
- if (degree < Matrices::n_constraint_matrices+1)
+ if (this->degree < Matrices::n_constraint_matrices+1)
{
this->interface_constraints
.TableBase<2,double>::reinit (this->interface_constraints_size());
- this->interface_constraints.fill (Matrices::constraint_matrices[degree-1]);
+ this->interface_constraints.fill (Matrices::constraint_matrices[this->degree-1]);
}
}
// growth in
// degree*dim, times a
// small constant.
- if (std::fabs(cell_value) < 2e-14*degree*dim)
+ if (std::fabs(cell_value) < 2e-14*this->degree*dim)
cell_interpolation(j, i) = 0.;
else
cell_interpolation(j, i) = cell_value;
- if (std::fabs(subcell_value) < 2e-14*degree*dim)
+ if (std::fabs(subcell_value) < 2e-14*this->degree*dim)
subcell_interpolation(j, i) = 0.;
else
- if (std::fabs(subcell_value-1) < 2e-14*degree*dim)
+ if (std::fabs(subcell_value-1) < 2e-14*this->degree*dim)
subcell_interpolation(j, i) = 1.;
else
// we have put our
// here
for (unsigned int i=0; i<this->dofs_per_cell; ++i)
for (unsigned int j=0; j<this->dofs_per_cell; ++j)
- if (std::fabs(this->prolongation[child](i,j)) < 2e-14*degree*dim)
+ if (std::fabs(this->prolongation[child](i,j)) < 2e-14*this->degree*dim)
this->prolongation[child](i,j) = 0.;
// and make sure that the row
double sum = 0;
for (unsigned int col=0; col<this->dofs_per_cell; ++col)
sum += this->prolongation[child](row,col);
- Assert (std::fabs(sum-1.) < 2e-14*degree*dim,
+ Assert (std::fabs(sum-1.) < 2e-14*this->degree*dim,
ExcInternalError());
};
}
{
const double val
= this->poly_space.compute_value(mother_dof, p_cell);
- if (std::fabs (val-1.) < 2e-14*degree*dim)
+ if (std::fabs (val-1.) < 2e-14*this->degree*dim)
// ok, this is the right
// dof
break;
// make sure that all
// other shape functions
// are zero there
- Assert (std::fabs(val) < 2e-14*degree*dim,
+ Assert (std::fabs(val) < 2e-14*this->degree*dim,
ExcInternalError());
}
// check also the shape
// functions after tat
for (unsigned int j=mother_dof+1; j<this->dofs_per_cell; ++j)
Assert (std::fabs (this->poly_space.compute_value(j, p_cell))
- < 2e-14*degree*dim,
+ < 2e-14*this->degree*dim,
ExcInternalError());
// then find the children on
{
const double val
= this->poly_space.compute_value(child_dof, p_subcell);
- if (std::fabs (val-1.) < 2e-14*degree*dim)
+ if (std::fabs (val-1.) < 2e-14*this->degree*dim)
break;
else
- Assert (std::fabs(val) < 2e-14*degree*dim,
+ Assert (std::fabs(val) < 2e-14*this->degree*dim,
ExcInternalError());
}
for (unsigned int j=child_dof+1; j<this->dofs_per_cell; ++j)
Assert (std::fabs (this->poly_space.compute_value(j, p_subcell))
- < 2e-14*degree*dim,
+ < 2e-14*this->degree*dim,
ExcInternalError());
// so now that we have
std::ostrstream namebuf;
#endif
- namebuf << "FE_Q_Hierarchical<" << dim << ">(" << degree << ")";
+ namebuf << "FE_Q_Hierarchical<" << dim << ">(" << this->degree << ")";
#ifndef HAVE_STD_STRINGSTREAM
namebuf << std::ends;
FiniteElement<dim> *
FE_Q_Hierarchical<dim>::clone() const
{
- return new FE_Q_Hierarchical<dim>(degree);
+ return new FE_Q_Hierarchical<dim>(this->degree);
}
initialize_constraints (const std::vector<FullMatrix<double> > &dofs_subcell)
{
const unsigned int dofs_1d = 2*this->dofs_per_vertex + this->dofs_per_line;
+ const unsigned int degree=this->degree;
this->interface_constraints
.TableBase<2,double>::reinit (this->interface_constraints_size());
void FE_Q_Hierarchical<dim>::initialize_unit_support_points ()
{
// number of points: (degree+1)^dim
- unsigned int n = degree+1;
+ unsigned int n = this->degree+1;
for (unsigned int i=1; i<dim; ++i)
- n *= degree+1;
+ n *= this->degree+1;
this->unit_support_points.resize(n);
// FE_Q), so there's not much we
// can do here.
unsigned int k=0;
- for (unsigned int iz=0; iz <= ((dim>2) ? degree : 0) ; ++iz)
- for (unsigned int iy=0; iy <= ((dim>1) ? degree : 0) ; ++iy)
- for (unsigned int ix=0; ix<=degree; ++ix)
+ for (unsigned int iz=0; iz <= ((dim>2) ? this->degree : 0) ; ++iz)
+ for (unsigned int iy=0; iy <= ((dim>1) ? this->degree : 0) ; ++iy)
+ for (unsigned int ix=0; ix<=this->degree; ++ix)
{
if (ix==0)
p(0) = 0.;
const unsigned int codim = dim-1;
// number of points: (degree+1)^codim
- unsigned int n = degree+1;
+ unsigned int n = this->degree+1;
for (unsigned int i=1; i<codim; ++i)
- n *= degree+1;
+ n *= this->degree+1;
this->unit_face_support_points.resize(n);
Point<codim> p;
unsigned int k=0;
- for (unsigned int iz=0; iz <= ((codim>2) ? degree : 0) ; ++iz)
- for (unsigned int iy=0; iy <= ((codim>1) ? degree : 0) ; ++iy)
- for (unsigned int ix=0; ix<=degree; ++ix)
+ for (unsigned int iz=0; iz <= ((codim>2) ? this->degree : 0) ; ++iz)
+ for (unsigned int iy=0; iy <= ((codim>1) ? this->degree : 0) ; ++iy)
+ for (unsigned int ix=0; ix<=this->degree; ++ix)
{
if (ix==0)
p(0) = 0.;
std::vector<unsigned int>
FE_Q_Hierarchical<dim>::get_embedding_dofs (const unsigned int sub_degree) const
{
- Assert ((sub_degree>0) && (sub_degree<=degree),
- ExcIndexRange(sub_degree, 1, degree));
+ Assert ((sub_degree>0) && (sub_degree<=this->degree),
+ ExcIndexRange(sub_degree, 1, this->degree));
if (dim==1)
{
return embedding_dofs;
}
- else if (sub_degree==degree)
+ else if (sub_degree==this->degree)
{
std::vector<unsigned int> embedding_dofs (this->dofs_per_cell);
for (unsigned int i=0; i<this->dofs_per_cell; ++i)
const unsigned int line = (i - GeometryInfo<dim>::vertices_per_cell - j) / (sub_degree-1);
embedding_dofs[i] = GeometryInfo<dim>::vertices_per_cell +
- line * (degree-1) + j;
+ line * (this->degree-1) + j;
}
// quad
else if (i<(GeometryInfo<dim>::vertices_per_cell +
GeometryInfo<dim>::lines_per_cell * (sub_degree-1) - k * (sub_degree-1) - j) / ( (sub_degree-1) * (sub_degree-1) );
embedding_dofs[i] = GeometryInfo<dim>::vertices_per_cell +
- GeometryInfo<dim>::lines_per_cell * (degree-1) +
- face * (degree-1) * (degree-1) +
- k * (degree-1) + j;
+ GeometryInfo<dim>::lines_per_cell * (this->degree-1) +
+ face * (this->degree-1) * (this->degree-1) +
+ k * (this->degree-1) + j;
}
// hex
else if (i<(GeometryInfo<dim>::vertices_per_cell +
GeometryInfo<dim>::quads_per_cell * (sub_degree-1) * (sub_degree-1) - j - k * (sub_degree-1)) / ( (sub_degree-1) * (sub_degree-1) );
embedding_dofs[i] = GeometryInfo<dim>::vertices_per_cell +
- GeometryInfo<dim>::lines_per_cell * (degree-1) +
- GeometryInfo<dim>::quads_per_cell * (degree-1) * (degree-1) +
- l * (degree-1) * (degree-1) + k * (degree-1) + j;
+ GeometryInfo<dim>::lines_per_cell * (this->degree-1) +
+ GeometryInfo<dim>::quads_per_cell * (this->degree-1) * (this->degree-1) +
+ l * (this->degree-1) * (this->degree-1) + k * (this->degree-1) + j;
}
}