17 #include <deal.II/base/quadrature.h> 18 #include <deal.II/base/qprojector.h> 19 #include <deal.II/base/template_constraints.h> 20 #include <deal.II/base/tensor_product_polynomials.h> 21 #include <deal.II/base/tensor_product_polynomials_const.h> 22 #include <deal.II/base/tensor_product_polynomials_bubbles.h> 23 #include <deal.II/base/polynomials_piecewise.h> 24 #include <deal.II/fe/fe_q_base.h> 25 #include <deal.II/fe/fe_dgq.h> 26 #include <deal.II/fe/fe_dgp.h> 27 #include <deal.II/fe/fe_nothing.h> 28 #include <deal.II/fe/fe_tools.h> 29 #include <deal.II/base/quadrature_lib.h> 34 DEAL_II_NAMESPACE_OPEN
44 std::vector<unsigned int>
45 face_lexicographic_to_hierarchic_numbering (
const unsigned int degree)
47 std::vector<unsigned int> dpo(dim, 1U);
48 for (
unsigned int i=1; i<dpo.size(); ++i)
49 dpo[i]=dpo[i-1]*(degree-1);
50 const ::FiniteElementData<dim-1> face_data(dpo,1,degree);
51 std::vector<unsigned int> face_renumber (face_data.dofs_per_cell);
59 std::vector<unsigned int>
60 face_lexicographic_to_hierarchic_numbering<1> (
const unsigned int)
62 return std::vector<unsigned int>();
73 zero_indices (
unsigned int (&indices)[dim])
75 for (
unsigned int d=0;
d<dim; ++
d)
87 increment_indices (
unsigned int (&indices)[dim],
88 const unsigned int dofs1d)
91 for (
int d=0;
d<dim-1; ++
d)
92 if (indices[d]==dofs1d)
107 template <
class PolynomialType,
int xdim,
int xspacedim>
114 template <
int spacedim>
123 template <
int spacedim>
128 const unsigned int dim = 2;
130 unsigned int q_deg = fe.
degree;
178 std::vector<
Point<dim-1> > constraint_points;
184 const unsigned int n=q_deg-1;
185 const double step=1./q_deg;
187 for (
unsigned int i=1; i<=n; ++i)
188 constraint_points.push_back (
191 for (
unsigned int i=1; i<=n; ++i)
192 constraint_points.push_back (
204 const std::vector<unsigned int> &index_map_inverse =
206 const std::vector<unsigned int> face_index_map =
207 FE_Q_Helper::face_lexicographic_to_hierarchic_numbering<dim>(q_deg);
212 for (
unsigned int i=0; i<constraint_points.size(); ++i)
213 for (
unsigned int j=0; j<q_deg+1; ++j)
216 p[0] = constraint_points[i](0);
218 fe.
poly_space.compute_value(index_map_inverse[j], p);
230 template <
int spacedim>
235 const unsigned int dim = 3;
237 unsigned int q_deg = fe.
degree;
256 std::vector<
Point<dim-1> > constraint_points;
269 const unsigned int n=q_deg-1;
270 const double step=1./q_deg;
271 std::vector<
Point<dim-2> > line_support_points(n);
272 for (
unsigned int i=0; i<n; ++i)
273 line_support_points[i](0)=(i+1)*step;
277 std::vector<
Point<dim-1> > p_line(n);
283 for (
unsigned int i=0; i<n; ++i)
284 constraint_points.push_back (p_line[i] +
Point<dim-1> (0.5, 0));
287 for (
unsigned int i=0; i<n; ++i)
288 constraint_points.push_back (p_line[i] +
Point<dim-1> (0.5, 0));
291 for (
unsigned int i=0; i<n; ++i)
292 constraint_points.push_back (p_line[i] +
Point<dim-1> (0, 0.5));
295 for (
unsigned int i=0; i<n; ++i)
296 constraint_points.push_back (p_line[i] +
Point<dim-1> (0, 0.5));
299 for (
unsigned int face=0; face<
GeometryInfo<dim-1>::faces_per_cell; ++face)
300 for (
unsigned int subface=0;
301 subface<
GeometryInfo<dim-1>::max_children_per_face; ++subface)
304 constraint_points.insert(constraint_points.end(),
305 p_line.begin(), p_line.end());
309 std::vector<
Point<dim-1> > inner_points(n*n);
310 for (
unsigned int i=0, iy=1; iy<=n; ++iy)
311 for (
unsigned int ix=1; ix<=n; ++ix)
315 for (
unsigned int child=0;
316 child<
GeometryInfo<dim-1>::max_children_per_cell; ++child)
317 for (
unsigned int i=0; i<inner_points.size(); ++i)
318 constraint_points.push_back (
324 const unsigned int pnts=(q_deg+1)*(q_deg+1);
328 const std::vector<unsigned int> &index_map_inverse =
330 const std::vector<unsigned int> face_index_map =
331 FE_Q_Helper::face_lexicographic_to_hierarchic_numbering<dim>(q_deg);
339 for (
unsigned int i=0; i<constraint_points.size(); ++i)
341 const double interval = (double) (q_deg * 2);
342 bool mirror[dim - 1];
354 for (
unsigned int k=0; k<dim-1; ++k)
356 const int coord_int =
357 static_cast<int> (constraint_points[i](k) * interval + 0.25);
358 constraint_point(k) = 1.*coord_int / interval;
380 mirror[k] = (constraint_point(k) > 0.5);
382 constraint_point(k) = 1.0 - constraint_point(k);
385 for (
unsigned int j=0; j<pnts; ++j)
387 unsigned int indices[2] = { j % (q_deg+1), j / (q_deg+1) };
389 for (
unsigned int k = 0; k<2; ++k)
391 indices[k] = q_deg - indices[k];
394 new_index = indices[1] * (q_deg + 1) + indices[0];
397 fe.
poly_space.compute_value (index_map_inverse[new_index],
413 template <
class PolynomialType,
int dim,
int spacedim>
415 (
const PolynomialType &poly_space,
417 const std::vector<bool> &restriction_is_additive_flags)
420 std::vector<ComponentMask>(1, std::vector<bool>(1,
true))),
428 template <
class PolynomialType,
int dim,
int spacedim>
432 Assert (points[0][0] == 0,
433 ExcMessage (
"The first support point has to be zero."));
434 Assert (points.back()[0] == 1,
435 ExcMessage (
"The last support point has to be one."));
440 const unsigned int q_dofs_per_cell = Utilities::fixed_power<dim>(q_degree+1);
441 Assert(q_dofs_per_cell == this->dofs_per_cell ||
442 q_dofs_per_cell+1 == this->dofs_per_cell ||
446 std::vector<unsigned int> renumber(q_dofs_per_cell);
450 for (
unsigned int i= q_dofs_per_cell; i<this->dofs_per_cell; ++i)
451 renumber.push_back(i);
452 this->poly_space.set_numbering(renumber);
456 initialize_unit_support_points (points);
457 initialize_unit_face_support_points (points);
460 initialize_constraints (points);
466 this->initialize_quad_dof_index_permutation();
471 template <
class PolynomialType,
int dim,
int spacedim>
482 Assert (interpolation_matrix.
m() == this->dofs_per_cell,
484 this->dofs_per_cell));
490 const unsigned int q_dofs_per_cell = Utilities::fixed_power<dim>(q_degree+1);
491 const unsigned int source_q_dofs_per_cell = Utilities::fixed_power<dim>(source_fe->degree+1);
497 for (
unsigned int j=0; j<q_dofs_per_cell; ++j)
500 const Point<dim> p = this->unit_support_points[j];
504 Assert(std::abs(this->poly_space.compute_value (j, p)-1.)<1e-13,
507 for (
unsigned int i=0; i<source_q_dofs_per_cell; ++i)
508 interpolation_matrix(j,i) = source_fe->poly_space.compute_value (i, p);
512 if (q_dofs_per_cell < this->dofs_per_cell)
515 for (
unsigned int i=0; i<source_q_dofs_per_cell; ++i)
516 interpolation_matrix(q_dofs_per_cell, i) = 0.;
517 for (
unsigned int j=0; j<q_dofs_per_cell; ++j)
518 interpolation_matrix(j, source_q_dofs_per_cell) = 0.;
519 interpolation_matrix(q_dofs_per_cell, source_q_dofs_per_cell) = 1.;
523 const double eps = 2e-13*q_degree*dim;
524 for (
unsigned int i=0; i<this->dofs_per_cell; ++i)
525 for (
unsigned int j=0; j<source_fe->dofs_per_cell; ++j)
526 if (std::fabs(interpolation_matrix(i,j)) < eps)
527 interpolation_matrix(i,j) = 0.;
531 for (
unsigned int i=0; i<this->dofs_per_cell; ++i)
534 for (
unsigned int j=0; j<source_fe->dofs_per_cell; ++j)
535 sum += interpolation_matrix(i,j);
565 template <
class PolynomialType,
int dim,
int spacedim>
573 interpolation_matrix);
578 template <
class PolynomialType,
int dim,
int spacedim>
582 const unsigned int subface,
595 Assert (interpolation_matrix.
n() == this->dofs_per_face,
597 this->dofs_per_face));
604 Assert (this->dofs_per_face <= source_fe->dofs_per_face,
606 ExcInterpolationNotImplemented ()));
610 quad_face_support (source_fe->get_unit_face_support_points ());
615 double eps = 2e-13*q_degree*(dim-1);
628 for (
unsigned int i=0; i<source_fe->dofs_per_face; ++i)
630 const Point<dim> &p = subface_quadrature.point (i);
632 for (
unsigned int j=0; j<this->dofs_per_face; ++j)
634 double matrix_entry = this->shape_value (this->face_to_cell_index(j, 0), p);
639 if (std::fabs (matrix_entry - 1.0) < eps)
641 if (std::fabs (matrix_entry) < eps)
644 interpolation_matrix(i,j) = matrix_entry;
650 for (
unsigned int j=0; j<source_fe->dofs_per_face; ++j)
654 for (
unsigned int i=0; i<this->dofs_per_face; ++i)
655 sum += interpolation_matrix(j,i);
666 ExcInterpolationNotImplemented()));
671 template <
class PolynomialType,
int dim,
int spacedim>
681 template <
class PolynomialType,
int dim,
int spacedim>
682 std::vector<std::pair<unsigned int, unsigned int> >
693 std::vector<std::pair<unsigned int, unsigned int> >
694 (1, std::make_pair (0U, 0U));
700 return std::vector<std::pair<unsigned int, unsigned int> > ();
711 return std::vector<std::pair<unsigned int, unsigned int> > ();
716 return std::vector<std::pair<unsigned int, unsigned int> > ();
722 template <
class PolynomialType,
int dim,
int spacedim>
723 std::vector<std::pair<unsigned int, unsigned int> >
740 const unsigned int p = this->degree;
741 const unsigned int q = fe_q_other->degree;
743 std::vector<std::pair<unsigned int, unsigned int> > identities;
745 const std::vector<unsigned int> &index_map_inverse=
746 this->poly_space.get_numbering_inverse();
747 const std::vector<unsigned int> &index_map_inverse_other=
748 fe_q_other->poly_space.get_numbering_inverse();
750 for (
unsigned int i=0; i<p-1; ++i)
751 for (
unsigned int j=0; j<q-1; ++j)
752 if (std::fabs(this->unit_support_points[index_map_inverse[i+1]][0]-
753 fe_q_other->unit_support_points[index_map_inverse_other[j+1]][0])
755 identities.push_back (std::make_pair(i,j));
763 return std::vector<std::pair<unsigned int, unsigned int> > ();
774 return std::vector<std::pair<unsigned int, unsigned int> > ();
779 return std::vector<std::pair<unsigned int, unsigned int> > ();
785 template <
class PolynomialType,
int dim,
int spacedim>
786 std::vector<std::pair<unsigned int, unsigned int> >
800 const unsigned int p = this->degree;
801 const unsigned int q = fe_q_other->degree;
803 std::vector<std::pair<unsigned int, unsigned int> > identities;
805 const std::vector<unsigned int> &index_map_inverse=
806 this->poly_space.get_numbering_inverse();
807 const std::vector<unsigned int> &index_map_inverse_other=
808 fe_q_other->poly_space.get_numbering_inverse();
810 for (
unsigned int i1=0; i1<p-1; ++i1)
811 for (
unsigned int i2=0; i2<p-1; ++i2)
812 for (
unsigned int j1=0; j1<q-1; ++j1)
813 for (
unsigned int j2=0; j2<q-1; ++j2)
814 if ((std::fabs(this->unit_support_points[index_map_inverse[i1+1]][0]-
815 fe_q_other->unit_support_points[index_map_inverse_other[j1+1]][0])
818 (std::fabs(this->unit_support_points[index_map_inverse[i2+1]][0]-
819 fe_q_other->unit_support_points[index_map_inverse_other[j2+1]][0])
821 identities.push_back (std::make_pair(i1*(p-1)+i2,
830 return std::vector<std::pair<unsigned int, unsigned int> > ();
841 return std::vector<std::pair<unsigned int, unsigned int> > ();
846 return std::vector<std::pair<unsigned int, unsigned int> > ();
852 template <
class PolynomialType,
int dim,
int spacedim>
860 if (this->degree < fe_q_other->degree)
862 else if (this->degree == fe_q_other->degree)
870 if (fe_nothing->is_dominating())
901 template <
class PolynomialType,
int dim,
int spacedim>
905 const std::vector<unsigned int> &index_map_inverse=
906 this->poly_space.get_numbering_inverse();
910 this->unit_support_points.resize(support_quadrature.
size());
912 for (
unsigned int k=0; k<support_quadrature.
size(); k++)
913 this->unit_support_points[index_map_inverse[k]] = support_quadrature.
point(k);
918 template <
class PolynomialType,
int dim,
int spacedim>
926 const unsigned int codim = dim-1;
927 this->unit_face_support_points.resize(Utilities::fixed_power<codim>(q_degree+1));
930 std::vector<unsigned int> face_index_map =
931 FE_Q_Helper::face_lexicographic_to_hierarchic_numbering<dim>(q_degree);
934 this->unit_face_support_points.resize(support_quadrature.
size());
936 for (
unsigned int k=0; k<support_quadrature.
size(); k++)
937 this->unit_face_support_points[face_index_map[k]] = support_quadrature.
point(k);
942 template <
class PolynomialType,
int dim,
int spacedim>
950 Assert (this->adjust_quad_dof_index_for_face_orientation_table.n_elements()==8*this->dofs_per_quad,
953 const unsigned int n=q_degree-1;
957 Table<2,int> &data=this->adjust_quad_dof_index_for_face_orientation_table;
977 for (
unsigned int local=0; local<this->dofs_per_quad; ++local)
981 unsigned int i=local%n,
985 data(local,0)=j + i *n - local;
987 data(local,1)=i + (n-1-j)*n - local;
989 data(local,2)=(n-1-j) + (n-1-i)*n - local;
991 data(local,3)=(n-1-i) + j *n - local;
995 data(local,5)=j + (n-1-i)*n - local;
997 data(local,6)=(n-1-i) + (n-1-j)*n - local;
999 data(local,7)=(n-1-j) + i *n - local;
1003 for (
unsigned int i=0; i<this->dofs_per_line; ++i)
1004 this->adjust_line_dof_index_for_line_orientation_table[i]=this->dofs_per_line-1-i - i;
1009 template <
class PolynomialType,
int dim,
int spacedim>
1013 const unsigned int face,
1014 const bool face_orientation,
1015 const bool face_flip,
1016 const bool face_rotation)
const 1018 Assert (face_index < this->dofs_per_face,
1034 if (face_index < this->first_face_line_index)
1039 const unsigned int face_vertex = face_index / this->dofs_per_vertex;
1040 const unsigned int dof_index_on_vertex = face_index % this->dofs_per_vertex;
1048 * this->dofs_per_vertex
1050 dof_index_on_vertex);
1052 else if (face_index < this->first_face_quad_index)
1057 const unsigned int index = face_index - this->first_face_line_index;
1059 const unsigned int face_line = index / this->dofs_per_line;
1060 const unsigned int dof_index_on_line = index % this->dofs_per_line;
1064 unsigned int adjusted_dof_index_on_line;
1073 if (face_flip ==
false)
1074 adjusted_dof_index_on_line = dof_index_on_line;
1076 adjusted_dof_index_on_line = this->dofs_per_line - dof_index_on_line - 1;
1087 Assert ((this->dofs_per_line <= 1) ||
1088 ((face_orientation ==
true) &&
1089 (face_flip ==
false) &&
1090 (face_rotation ==
false)),
1092 adjusted_dof_index_on_line = dof_index_on_line;
1096 return (this->first_line_index
1101 * this->dofs_per_line
1103 adjusted_dof_index_on_line);
1111 const unsigned int index = face_index - this->first_face_quad_index;
1116 Assert ((this->dofs_per_quad <= 1) ||
1117 ((face_orientation ==
true) &&
1118 (face_flip ==
false) &&
1119 (face_rotation ==
false)),
1121 return (this->first_quad_index
1122 + face * this->dofs_per_quad
1130 template <
class PolynomialType,
int dim,
int spacedim>
1131 std::vector<unsigned int>
1135 AssertThrow(degree>0,
typename FEQ::ExcFEQCannotHaveDegree0());
1136 std::vector<unsigned int> dpo(dim+1, 1U);
1137 for (
unsigned int i=1; i<dpo.size(); ++i)
1138 dpo[i]=dpo[i-1]*(degree-1);
1144 template <
class PolynomialType,
int dim,
int spacedim>
1149 Implementation::initialize_constraints (points, *
this);
1154 template <
class PolynomialType,
int dim,
int spacedim>
1163 ExcMessage(
"Prolongation matrices are only available for refined cells!"));
1168 if (this->prolongation[refinement_case-1][child].n() == 0)
1173 if (this->prolongation[refinement_case-1][child].n() ==
1174 this->dofs_per_cell)
1175 return this->prolongation[refinement_case-1][child];
1178 const unsigned int q_dofs_per_cell = Utilities::fixed_power<dim>(q_degree+1);
1186 const double eps = 1e-15*q_degree*dim;
1191 for (
unsigned int i=0; i<q_dofs_per_cell; ++i)
1193 Assert (std::fabs (1.-this->poly_space.compute_value
1194 (i, this->unit_support_points[i])) < eps,
1196 "to one or zero in a nodal point. " 1197 "This typically indicates that the " 1198 "polynomial interpolation is " 1199 "ill-conditioned such that round-off " 1200 "prevents the sum to be one."));
1201 for (
unsigned int j=0; j<q_dofs_per_cell; ++j)
1203 Assert (std::fabs (this->poly_space.compute_value
1204 (i, this->unit_support_points[j])) < eps,
1206 "to one or zero in a nodal point. " 1207 "This typically indicates that the " 1208 "polynomial interpolation is " 1209 "ill-conditioned such that round-off " 1210 "prevents the sum to be one."));
1218 const unsigned int dofs1d = q_degree+1;
1219 std::vector<Table<2,double> >
1221 const std::vector<unsigned int> &index_map_inverse =
1222 this->poly_space.get_numbering_inverse();
1226 unsigned int step_size_diag = 0;
1228 unsigned int factor = 1;
1229 for (
unsigned int d=0; d<dim; ++d)
1231 step_size_diag += factor;
1240 for (
unsigned int j=0; j<dofs1d; ++j)
1242 const unsigned int diag_comp = index_map_inverse[j*step_size_diag];
1243 const Point<dim> p_subcell = this->unit_support_points[diag_comp];
1247 for (
unsigned int i=0; i<dofs1d; ++i)
1248 for (
unsigned int d=0; d<dim; ++d)
1252 point[0] = p_cell[d];
1253 const double cell_value =
1254 this->poly_space.compute_value(index_map_inverse[i], point);
1273 if (std::fabs(cell_value) < eps)
1274 subcell_evaluations[d](j,i) = 0;
1276 subcell_evaluations[d](j,i) = cell_value;
1282 unsigned int j_indices[dim];
1283 FE_Q_Helper::zero_indices<dim> (j_indices);
1284 for (
unsigned int j=0; j<q_dofs_per_cell; j+=dofs1d)
1286 unsigned int i_indices[dim];
1287 FE_Q_Helper::zero_indices<dim> (i_indices);
1288 for (
unsigned int i=0; i<q_dofs_per_cell; i+=dofs1d)
1290 double val_extra_dim = 1.;
1291 for (
unsigned int d=1; d<dim; ++d)
1292 val_extra_dim *= subcell_evaluations[d](j_indices[d-1],
1297 for (
unsigned int jj=0; jj<dofs1d; ++jj)
1299 const unsigned int j_ind = index_map_inverse[j+jj];
1300 for (
unsigned int ii=0; ii<dofs1d; ++ii)
1301 prolongate(j_ind,index_map_inverse[i+ii])
1302 = val_extra_dim * subcell_evaluations[0](jj,ii);
1307 FE_Q_Helper::increment_indices<dim> (i_indices, dofs1d);
1310 FE_Q_Helper::increment_indices<dim> (j_indices, dofs1d);
1315 if (q_dofs_per_cell < this->dofs_per_cell)
1316 prolongate(q_dofs_per_cell,q_dofs_per_cell) = 1.;
1321 for (
unsigned int row=0; row<this->dofs_per_cell; ++row)
1324 for (
unsigned int col=0; col<this->dofs_per_cell; ++col)
1325 sum += prolongate(row,col);
1327 std::max(eps, 5e-16*std::sqrt(this->dofs_per_cell)),
1329 "prolongation matrix do not add to one. " 1330 "This typically indicates that the " 1331 "polynomial interpolation is " 1332 "ill-conditioned such that round-off " 1333 "prevents the sum to be one."));
1339 (this->prolongation[refinement_case-1][child]));
1343 return this->prolongation[refinement_case-1][child];
1348 template <
class PolynomialType,
int dim,
int spacedim>
1357 ExcMessage(
"Restriction matrices are only available for refined cells!"));
1362 if (this->restriction[refinement_case-1][child].n() == 0)
1367 if (this->restriction[refinement_case-1][child].n() ==
1368 this->dofs_per_cell)
1369 return this->restriction[refinement_case-1][child];
1373 const unsigned int q_dofs_per_cell = Utilities::fixed_power<dim>(q_degree+1);
1393 const double eps = 1e-15*q_degree*dim;
1394 const std::vector<unsigned int> &index_map_inverse =
1395 this->poly_space.get_numbering_inverse();
1397 const unsigned int dofs1d = q_degree+1;
1398 std::vector<Tensor<1,dim> > evaluations1d (dofs1d);
1400 my_restriction.
reinit(this->dofs_per_cell, this->dofs_per_cell);
1402 for (
unsigned int i=0; i<q_dofs_per_cell; ++i)
1404 unsigned int mother_dof = index_map_inverse[i];
1405 const Point<dim> p_cell = this->unit_support_points[mother_dof];
1418 for (
unsigned int j=0; j<dofs1d; ++j)
1419 for (
unsigned int d=0; d<dim; ++d)
1422 point[0] = p_subcell[d];
1423 evaluations1d[j][d] =
1424 this->poly_space.compute_value(index_map_inverse[j], point);
1426 unsigned int j_indices[dim];
1427 FE_Q_Helper::zero_indices<dim> (j_indices);
1428 double sum_check = 0;
1429 for (
unsigned int j = 0; j<q_dofs_per_cell; j += dofs1d)
1431 double val_extra_dim = 1.;
1432 for (
unsigned int d=1; d<dim; ++d)
1433 val_extra_dim *= evaluations1d[j_indices[d-1]][d];
1434 for (
unsigned int jj=0; jj<dofs1d; ++jj)
1444 = val_extra_dim * evaluations1d[jj][0];
1445 const unsigned int child_dof =
1446 index_map_inverse[j+jj];
1447 if (std::fabs (val-1.) < eps)
1448 my_restriction(mother_dof,child_dof)=1.;
1449 else if (std::fabs(val) > eps)
1450 my_restriction(mother_dof,child_dof)=val;
1453 FE_Q_Helper::increment_indices<dim> (j_indices, dofs1d);
1455 Assert (std::fabs(sum_check-1) <
1456 std::max(eps, 5e-16*std::sqrt(this->dofs_per_cell)),
1458 "restriction matrix do not add to one. " 1459 "This typically indicates that the " 1460 "polynomial interpolation is " 1461 "ill-conditioned such that round-off " 1462 "prevents the sum to be one."));
1466 if (q_dofs_per_cell < this->dofs_per_cell)
1467 my_restriction(this->dofs_per_cell-1,this->dofs_per_cell-1) =
1474 (this->restriction[refinement_case-1][child]));
1477 return this->restriction[refinement_case-1][child];
1487 template <
class PolynomialType,
int dim,
int spacedim>
1490 (
const unsigned int shape_index,
1491 const unsigned int face_index)
const 1493 Assert (shape_index < this->dofs_per_cell,
1502 return (((shape_index == 0) && (face_index == 0)) ||
1503 ((shape_index == 1) && (face_index == 1)));
1507 if (((dim==2) && (shape_index>=this->first_quad_index))
1509 ((dim==3) && (shape_index>=this->first_hex_index)))
1513 if (shape_index < this->first_line_index)
1518 const unsigned int vertex_no = shape_index;
1522 for (
unsigned int v=0; v<GeometryInfo<dim>::vertices_per_face; ++v)
1528 else if (shape_index < this->first_quad_index)
1531 const unsigned int line_index
1532 = (shape_index - this->first_line_index) / this->dofs_per_line;
1538 return (line_index == face_index);
1542 const unsigned int lines_per_face =
1545 for (
unsigned int l=0; l<lines_per_face; ++l)
1554 else if (shape_index < this->first_hex_index)
1557 const unsigned int quad_index
1558 = (shape_index - this->first_quad_index) / this->dofs_per_quad;
1559 Assert (static_cast<signed int>(quad_index) <
1569 return (quad_index == face_index);
1588 template <
typename PolynomialType,
int dim,
int spacedim>
1589 std::pair<Table<2,bool>, std::vector<unsigned int> >
1597 for (
unsigned int i=0; i<Utilities::fixed_power<dim>(q_degree+1); ++i)
1598 constant_modes(0, i) =
true;
1599 return std::pair<Table<2,bool>, std::vector<unsigned int> >
1600 (constant_modes, std::vector<unsigned int>(1, 0));
1605 #include "fe_q_base.inst" 1607 DEAL_II_NAMESPACE_CLOSE
static Point< dim > child_to_cell_coordinates(const Point< dim > &p, const unsigned int child_index, const RefinementCase< dim > refine_case=RefinementCase< dim >::isotropic_refinement)
FE_Q_Base(const PolynomialType &poly_space, const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags)
static const unsigned int invalid_unsigned_int
#define AssertDimension(dim1, dim2)
void swap(TableBase< N, T > &v)
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
FullMatrix< double > interface_constraints
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
const unsigned int degree
const Point< dim > & point(const unsigned int i) const
static Point< dim > cell_to_child_coordinates(const Point< dim > &p, const unsigned int child_index, const RefinementCase< dim > refine_case=RefinementCase< dim >::isotropic_refinement)
#define AssertThrow(cond, exc)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
static unsigned int n_children(const RefinementCase< dim > &refinement_case)
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
void reinit(const TableIndices< N > &new_size, const bool omit_default_initialization=false)
#define Assert(cond, exc)
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
static void project_to_subface(const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, std::vector< Point< dim > > &q_points, const RefinementCase< dim-1 > &ref_case=RefinementCase< dim-1 >::isotropic_refinement)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
virtual bool hp_constraints_are_implemented() const
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
SymmetricTensor< rank, dim, Number > sum(const SymmetricTensor< rank, dim, Number > &local, const MPI_Comm &mpi_communicator)
unsigned int size() const
const unsigned int dofs_per_cell
void initialize(const std::vector< Point< 1 > > &support_points_1d)
void initialize_unit_face_support_points(const std::vector< Point< 1 > > &points)
void initialize_constraints(const std::vector< Point< 1 > > &points)
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
static void initialize_constraints(const std::vector< Point< 1 > > &, FE_Q_Base< PolynomialType, 1, spacedim > &)
void initialize_quad_dof_index_permutation()
static void project_to_face(const SubQuadrature &quadrature, const unsigned int face_no, std::vector< Point< dim > > &q_points)
void initialize_unit_support_points(const std::vector< Point< 1 > > &points)
const unsigned int dofs_per_face
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
static ::ExceptionBase & ExcNotImplemented()
PolynomialType poly_space
TableIndices< 2 > interface_constraints_size() const
static ::ExceptionBase & ExcInternalError()