Reference documentation for deal.II version GIT c415589cf0 2022-08-14 18:50:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
fe_raviart_thomas.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2003 - 2021 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
22 #include <deal.II/base/table.h>
23 #include <deal.II/base/utilities.h>
24 
26 
27 #include <deal.II/fe/fe.h>
29 #include <deal.II/fe/fe_tools.h>
30 #include <deal.II/fe/fe_values.h>
31 #include <deal.II/fe/mapping.h>
32 
33 #include <deal.II/grid/tria.h>
35 
36 #include <iostream>
37 #include <memory>
38 #include <sstream>
39 
40 
42 
43 
44 template <int dim>
46  : FE_PolyTensor<dim>(
47  PolynomialsRaviartThomas<dim>(deg + 1, deg),
49  dim,
50  deg + 1,
51  FiniteElementData<dim>::Hdiv),
52  std::vector<bool>(PolynomialsRaviartThomas<dim>::n_polynomials(deg + 1,
53  deg),
54  true),
55  std::vector<ComponentMask>(
56  PolynomialsRaviartThomas<dim>::n_polynomials(deg + 1, deg),
57  std::vector<bool>(dim, true)))
58 {
59  Assert(dim >= 2, ExcImpossibleInDim(dim));
60  const unsigned int n_dofs = this->n_dofs_per_cell();
61 
63  // First, initialize the
64  // generalized support points and
65  // quadrature weights, since they
66  // are required for interpolation.
68 
69  // Now compute the inverse node matrix, generating the correct
70  // basis functions from the raw ones. For a discussion of what
71  // exactly happens here, see FETools::compute_node_matrix.
73  this->inverse_node_matrix.reinit(n_dofs, n_dofs);
74  this->inverse_node_matrix.invert(M);
75  // From now on, the shape functions provided by FiniteElement::shape_value
76  // and similar functions will be the correct ones, not
77  // the raw shape functions from the polynomial space anymore.
78 
79  // Reinit the vectors of
80  // restriction and prolongation
81  // matrices to the right sizes.
82  // Restriction only for isotropic
83  // refinement
85  // Fill prolongation matrices with embedding operators
88 
89  // TODO: the implementation makes the assumption that all faces have the
90  // same number of dofs
91  AssertDimension(this->n_unique_faces(), 1);
92  const unsigned int face_no = 0;
93 
94  // TODO[TL]: for anisotropic refinement we will probably need a table of
95  // submatrices with an array for each refine case
97  for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
98  face_embeddings[i].reinit(this->n_dofs_per_face(face_no),
99  this->n_dofs_per_face(face_no));
100  FETools::compute_face_embedding_matrices<dim, double>(*this,
101  face_embeddings,
102  0,
103  0);
104  this->interface_constraints.reinit((1 << (dim - 1)) *
105  this->n_dofs_per_face(face_no),
106  this->n_dofs_per_face(face_no));
107  unsigned int target_row = 0;
108  for (unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
109  for (unsigned int i = 0; i < face_embeddings[d].m(); ++i)
110  {
111  for (unsigned int j = 0; j < face_embeddings[d].n(); ++j)
112  this->interface_constraints(target_row, j) = face_embeddings[d](i, j);
113  ++target_row;
114  }
115 
116  // We need to initialize the dof permutation table and the one for the sign
117  // change.
119 }
120 
121 
122 
123 template <int dim>
124 std::string
126 {
127  // note that the
128  // FETools::get_fe_by_name
129  // function depends on the
130  // particular format of the string
131  // this function returns, so they
132  // have to be kept in synch
133 
134  // note that this->degree is the maximal
135  // polynomial degree and is thus one higher
136  // than the argument given to the
137  // constructor
138  std::ostringstream namebuf;
139  namebuf << "FE_RaviartThomas<" << dim << ">(" << this->degree - 1 << ")";
140 
141  return namebuf.str();
142 }
143 
144 
145 template <int dim>
146 std::unique_ptr<FiniteElement<dim, dim>>
148 {
149  return std::make_unique<FE_RaviartThomas<dim>>(*this);
150 }
151 
152 
153 //---------------------------------------------------------------------------
154 // Auxiliary and internal functions
155 //---------------------------------------------------------------------------
156 
157 
158 template <int dim>
159 void
161 {
162  QGauss<dim> cell_quadrature(deg + 1);
163  const unsigned int n_interior_points = (deg > 0) ? cell_quadrature.size() : 0;
164 
165  // TODO: the implementation makes the assumption that all faces have the
166  // same number of dofs
167  AssertDimension(this->n_unique_faces(), 1);
168  const unsigned int face_no = 0;
169 
170  unsigned int n_face_points = (dim > 1) ? 1 : 0;
171  // compute (deg+1)^(dim-1)
172  for (unsigned int d = 1; d < dim; ++d)
173  n_face_points *= deg + 1;
174 
175 
176  this->generalized_support_points.resize(
177  GeometryInfo<dim>::faces_per_cell * n_face_points + n_interior_points);
178  this->generalized_face_support_points[face_no].resize(n_face_points);
179 
180  // Number of the point being entered
181  unsigned int current = 0;
182 
183  if (dim > 1)
184  {
185  QGauss<dim - 1> face_points(deg + 1);
188 
189  boundary_weights.reinit(n_face_points, legendre.n());
190 
191  for (unsigned int k = 0; k < n_face_points; ++k)
192  {
193  this->generalized_face_support_points[face_no][k] =
194  face_points.point(k);
195  // Compute its quadrature
196  // contribution for each
197  // moment.
198  for (unsigned int i = 0; i < legendre.n(); ++i)
199  {
200  boundary_weights(k, i) =
201  face_points.weight(k) *
202  legendre.compute_value(i, face_points.point(k));
203  }
204  }
205 
206  Quadrature<dim> faces =
208  face_points);
209  for (; current < GeometryInfo<dim>::faces_per_cell * n_face_points;
210  ++current)
211  {
212  // Enter the support point
213  // into the vector
214  this->generalized_support_points[current] = faces.point(
215  current +
217  this->reference_cell(), 0, true, false, false, n_face_points));
218  }
219  }
220 
221  if (deg == 0)
222  return;
223 
224  // Create Legendre basis for the space D_xi Q_k
225  std::unique_ptr<AnisotropicPolynomials<dim>> polynomials[dim];
226  for (unsigned int dd = 0; dd < dim; ++dd)
227  {
228  std::vector<std::vector<Polynomials::Polynomial<double>>> poly(dim);
229  for (unsigned int d = 0; d < dim; ++d)
232 
233  polynomials[dd] = std::make_unique<AnisotropicPolynomials<dim>>(poly);
234  }
235 
236  interior_weights.reinit(
237  TableIndices<3>(n_interior_points, polynomials[0]->n(), dim));
238 
239  for (unsigned int k = 0; k < cell_quadrature.size(); ++k)
240  {
241  this->generalized_support_points[current++] = cell_quadrature.point(k);
242  for (unsigned int i = 0; i < polynomials[0]->n(); ++i)
243  for (unsigned int d = 0; d < dim; ++d)
244  interior_weights(k, i, d) =
245  cell_quadrature.weight(k) *
246  polynomials[d]->compute_value(i, cell_quadrature.point(k));
247  }
248 
249  Assert(current == this->generalized_support_points.size(),
250  ExcInternalError());
251 }
252 
253 
254 template <int dim>
255 void
257 {
258  // For 1D do nothing.
259  //
260  // TODO: For 2D we simply keep the legacy behavior for now. This should be
261  // changed in the future and can be taken care of by similar means as the 3D
262  // case below. The legacy behavior can be found in fe_poly_tensor.cc in the
263  // function internal::FE_PolyTensor::get_dof_sign_change_h_div(...)
264  if (dim < 3)
265  return;
266 
267  // TODO: the implementation makes the assumption that all faces have the
268  // same number of dofs
269  AssertDimension(this->n_unique_faces(), 1);
270  const unsigned int face_no = 0;
271 
272  Assert(this->adjust_quad_dof_index_for_face_orientation_table[0]
273  .n_elements() == 8 * this->n_dofs_per_quad(face_no),
274  ExcInternalError());
275 
276  // The 3D RaviartThomas space has tensor_degree*tensor_degree face dofs
277  const unsigned int n = this->tensor_degree();
278  Assert(n * n == this->n_dofs_per_quad(face_no), ExcInternalError());
279 
280  // The vector of tables adjust_quad_dof_index_for_face_orientation_table
281  // contains offsets for local face_dofs and is being filled with zeros in
282  // fe.cc. We need to fill it with the correct values in case of non-standard,
283  // flipped (rotated by +180 degrees) or rotated (rotated by +90 degrees) faces
284 
285  // The dofs on a face are connected to a n x n matrix. for example, for
286  // tensor_degree==3 we have the following dofs on a quad:
287 
288  // ___________
289  // | |
290  // | 6 7 8 |
291  // | |
292  // | 3 4 5 |
293  // | |
294  // | 0 1 2 |
295  // |___________|
296  //
297  // We have dof_index=i+n*j with index i in x-direction and index j in
298  // y-direction running from 0 to n-1. to extract i and j we can use
299  // i=dof_index%n and j=dof_index/n. The indices i and j can then be used to
300  // compute the offset.
301 
302  // Example: if the switches are (true | true | true) that means we rotate the
303  // face first by + 90 degree(counterclockwise) then by another +180
304  // degrees but we do not flip it since the face has standard
305  // orientation. The flip axis is the diagonal from the lower left to the upper
306  // right corner of the face. With these flags the configuration above becomes:
307  // ___________
308  // | |
309  // | 2 5 8 |
310  // | |
311  // | 1 4 7 |
312  // | |
313  // | 0 3 6 |
314  // |___________|
315  //
316  // This is exactly what is realized by the formulas implemented below. Note
317  // that the necessity of a permuattion depends on the three flags.
318 
319  // There is also a pattern for the sign change of the mapped face_dofs
320  // depending on the switches. In the above example it would be
321  // ___________
322  // | |
323  // | + - + |
324  // | |
325  // | + - + |
326  // | |
327  // | + - + |
328  // |___________|
329  //
330 
331  for (unsigned int local_face_dof = 0;
332  local_face_dof < this->n_dofs_per_quad(face_no);
333  ++local_face_dof)
334  {
335  // Row and column
336  unsigned int i = local_face_dof % n;
337  unsigned int j = local_face_dof / n;
338 
339  // We have 8 cases that are all treated the same way. Note that the
340  // corresponding case to case_no is just its binary representation.
341  // The above example of (false | true | true) would be case_no=3
342  for (unsigned int case_no = 0; case_no < 8; ++case_no)
343  {
344  // Get the binary representation of the case
345  const bool face_orientation = Utilities::get_bit(case_no, 2);
346  const bool face_flip = Utilities::get_bit(case_no, 1);
347  const bool face_rotation = Utilities::get_bit(case_no, 0);
348 
349  if (((!face_orientation) && (!face_rotation)) ||
350  ((face_orientation) && (face_rotation)))
351  {
352  // We flip across the diagonal
353  // This is the local face dof offset
354  this->adjust_quad_dof_index_for_face_orientation_table[face_no](
355  local_face_dof, case_no) = j + i * n - local_face_dof;
356  }
357  else
358  {
359  // Offset is zero
360  this->adjust_quad_dof_index_for_face_orientation_table[face_no](
361  local_face_dof, case_no) = 0;
362  } // if face needs dof permutation
363 
364  // Get new local face_dof by adding offset
365  const unsigned int new_local_face_dof =
366  local_face_dof +
367  this->adjust_quad_dof_index_for_face_orientation_table[face_no](
368  local_face_dof, case_no);
369  // compute new row and column index
370  i = new_local_face_dof % n;
371  j = new_local_face_dof / n;
372 
373  /*
374  * Now compute if a sign change is necessary. This is done for the
375  * case of face_orientation==true
376  */
377  // flip = false, rotation=true
378  if (!face_flip && face_rotation)
379  {
380  this->adjust_quad_dof_sign_for_face_orientation_table[face_no](
381  local_face_dof, case_no) = ((j % 2) == 1);
382  }
383  // flip = true, rotation=false
384  else if (face_flip && !face_rotation)
385  {
386  // This case is symmetric (although row and column may be
387  // switched)
388  this->adjust_quad_dof_sign_for_face_orientation_table[face_no](
389  local_face_dof, case_no) = ((j % 2) == 1) != ((i % 2) == 1);
390  }
391  // flip = true, rotation=true
392  else if (face_flip && face_rotation)
393  {
394  this->adjust_quad_dof_sign_for_face_orientation_table[face_no](
395  local_face_dof, case_no) = ((i % 2) == 1);
396  }
397  /*
398  * flip = false, rotation=false => nothing to do
399  */
400 
401  /*
402  * If face_orientation==false the sign flip is exactly the opposite.
403  */
404  if (!face_orientation)
405  this->adjust_quad_dof_sign_for_face_orientation_table[face_no](
406  local_face_dof, case_no) =
407  !this->adjust_quad_dof_sign_for_face_orientation_table[face_no](
408  local_face_dof, case_no);
409  } // case_no
410  } // local_face_dof
411 }
412 
413 
414 template <>
415 void
417 {
418  // there is only one refinement case in 1d,
419  // which is the isotropic one (first index of
420  // the matrix array has to be 0)
421  for (unsigned int i = 0; i < GeometryInfo<1>::max_children_per_cell; ++i)
422  this->restriction[0][i].reinit(0, 0);
423 }
424 
425 
426 
427 // This function is the same Raviart-Thomas interpolation performed by
428 // interpolate. Still, we cannot use interpolate, since it was written
429 // for smooth functions. The functions interpolated here are not
430 // smooth, maybe even not continuous. Therefore, we must double the
431 // number of quadrature points in each direction in order to integrate
432 // only smooth functions.
433 
434 // Then again, the interpolated function is chosen such that the
435 // moments coincide with the function to be interpolated.
436 
437 template <int dim>
438 void
440 {
441  const unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
442 
443  QGauss<dim - 1> q_base(this->degree);
444  const unsigned int n_face_points = q_base.size();
445  // First, compute interpolation on
446  // subfaces
447  for (unsigned int face : GeometryInfo<dim>::face_indices())
448  {
449  // The shape functions of the
450  // child cell are evaluated
451  // in the quadrature points
452  // of a full face.
453  Quadrature<dim> q_face =
454  QProjector<dim>::project_to_face(this->reference_cell(), q_base, face);
455  // Store shape values, since the
456  // evaluation suffers if not
457  // ordered by point
458  Table<2, double> cached_values_on_face(this->n_dofs_per_cell(),
459  q_face.size());
460  for (unsigned int k = 0; k < q_face.size(); ++k)
461  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
462  cached_values_on_face(i, k) = this->shape_value_component(
463  i, q_face.point(k), GeometryInfo<dim>::unit_normal_direction[face]);
464 
465  for (unsigned int sub = 0; sub < GeometryInfo<dim>::max_children_per_face;
466  ++sub)
467  {
468  // The weight functions for
469  // the coarse face are
470  // evaluated on the subface
471  // only.
473  this->reference_cell(), q_base, face, sub);
474  const unsigned int child = GeometryInfo<dim>::child_cell_on_face(
476 
477  // On a certain face, we must
478  // compute the moments of ALL
479  // fine level functions with
480  // the coarse level weight
481  // functions belonging to
482  // that face. Due to the
483  // orthogonalization process
484  // when building the shape
485  // functions, these weights
486  // are equal to the
487  // corresponding shape
488  // functions.
489  for (unsigned int k = 0; k < n_face_points; ++k)
490  for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
491  ++i_child)
492  for (unsigned int i_face = 0;
493  i_face < this->n_dofs_per_face(face);
494  ++i_face)
495  {
496  // The quadrature
497  // weights on the
498  // subcell are NOT
499  // transformed, so we
500  // have to do it here.
501  this->restriction[iso][child](
502  face * this->n_dofs_per_face(face) + i_face, i_child) +=
503  Utilities::fixed_power<dim - 1>(.5) * q_sub.weight(k) *
504  cached_values_on_face(i_child, k) *
505  this->shape_value_component(
506  face * this->n_dofs_per_face(face) + i_face,
507  q_sub.point(k),
509  }
510  }
511  }
512 
513  if (this->degree == 1)
514  return;
515 
516  // Create Legendre basis for the space D_xi Q_k. Here, we cannot
517  // use the shape functions
518  std::unique_ptr<AnisotropicPolynomials<dim>> polynomials[dim];
519  for (unsigned int dd = 0; dd < dim; ++dd)
520  {
521  std::vector<std::vector<Polynomials::Polynomial<double>>> poly(dim);
522  for (unsigned int d = 0; d < dim; ++d)
523  poly[d] =
525  poly[dd] =
527 
528  polynomials[dd] = std::make_unique<AnisotropicPolynomials<dim>>(poly);
529  }
530 
531  // TODO: the implementation makes the assumption that all faces have the
532  // same number of dofs
533  AssertDimension(this->n_unique_faces(), 1);
534  const unsigned int face_no = 0;
535 
536  QGauss<dim> q_cell(this->degree);
537  const unsigned int start_cell_dofs =
538  GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face(face_no);
539 
540  // Store shape values, since the
541  // evaluation suffers if not
542  // ordered by point
543  Table<3, double> cached_values_on_cell(this->n_dofs_per_cell(),
544  q_cell.size(),
545  dim);
546  for (unsigned int k = 0; k < q_cell.size(); ++k)
547  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
548  for (unsigned int d = 0; d < dim; ++d)
549  cached_values_on_cell(i, k, d) =
550  this->shape_value_component(i, q_cell.point(k), d);
551 
552  for (unsigned int child = 0; child < GeometryInfo<dim>::max_children_per_cell;
553  ++child)
554  {
555  Quadrature<dim> q_sub =
557  q_cell,
558  child);
559 
560  for (unsigned int k = 0; k < q_sub.size(); ++k)
561  for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
562  ++i_child)
563  for (unsigned int d = 0; d < dim; ++d)
564  for (unsigned int i_weight = 0; i_weight < polynomials[d]->n();
565  ++i_weight)
566  {
567  this->restriction[iso][child](start_cell_dofs + i_weight * dim +
568  d,
569  i_child) +=
570  q_sub.weight(k) * cached_values_on_cell(i_child, k, d) *
571  polynomials[d]->compute_value(i_weight, q_sub.point(k));
572  }
573  }
574 }
575 
576 
577 
578 template <int dim>
579 std::vector<unsigned int>
581 {
582  // the element is face-based and we have
583  // (deg+1)^(dim-1) DoFs per face
584  unsigned int dofs_per_face = 1;
585  for (unsigned int d = 1; d < dim; ++d)
586  dofs_per_face *= deg + 1;
587 
588  // and then there are interior dofs
589  const unsigned int interior_dofs = dim * deg * dofs_per_face;
590 
591  std::vector<unsigned int> dpo(dim + 1);
592  dpo[dim - 1] = dofs_per_face;
593  dpo[dim] = interior_dofs;
594 
595  return dpo;
596 }
597 
598 
599 
600 template <int dim>
601 std::pair<Table<2, bool>, std::vector<unsigned int>>
603 {
604  Table<2, bool> constant_modes(dim, this->n_dofs_per_cell());
605  for (unsigned int d = 0; d < dim; ++d)
606  for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
607  constant_modes(d, i) = true;
608  std::vector<unsigned int> components;
609  for (unsigned int d = 0; d < dim; ++d)
610  components.push_back(d);
611  return std::pair<Table<2, bool>, std::vector<unsigned int>>(constant_modes,
612  components);
613 }
614 
615 
616 
617 //---------------------------------------------------------------------------
618 // Data field initialization
619 //---------------------------------------------------------------------------
620 
621 
622 template <int dim>
623 bool
624 FE_RaviartThomas<dim>::has_support_on_face(const unsigned int shape_index,
625  const unsigned int face_index) const
626 {
627  AssertIndexRange(shape_index, this->n_dofs_per_cell());
629 
630  // Return computed values if we
631  // know them easily. Otherwise, it
632  // is always safe to return true.
633  switch (this->degree)
634  {
635  case 1:
636  {
637  switch (dim)
638  {
639  case 2:
640  {
641  // only on the one
642  // non-adjacent face
643  // are the values
644  // actually zero. list
645  // these in a table
646  return (face_index !=
647  GeometryInfo<dim>::opposite_face[shape_index]);
648  }
649 
650  default:
651  return true;
652  }
653  }
654 
655  default: // other rt_order
656  return true;
657  }
658 
659  return true;
660 }
661 
662 
663 
664 template <int dim>
665 void
667  const std::vector<Vector<double>> &support_point_values,
668  std::vector<double> & nodal_values) const
669 {
670  Assert(support_point_values.size() == this->generalized_support_points.size(),
671  ExcDimensionMismatch(support_point_values.size(),
672  this->generalized_support_points.size()));
673  Assert(nodal_values.size() == this->n_dofs_per_cell(),
674  ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
675  Assert(support_point_values[0].size() == this->n_components(),
676  ExcDimensionMismatch(support_point_values[0].size(),
677  this->n_components()));
678 
679  std::fill(nodal_values.begin(), nodal_values.end(), 0.);
680 
681  const unsigned int n_face_points = boundary_weights.size(0);
682  for (unsigned int face : GeometryInfo<dim>::face_indices())
683  for (unsigned int k = 0; k < n_face_points; ++k)
684  for (unsigned int i = 0; i < boundary_weights.size(1); ++i)
685  {
686  nodal_values[i + face * this->n_dofs_per_face(face)] +=
687  boundary_weights(k, i) *
688  support_point_values[face * n_face_points + k](
690  }
691 
692  // TODO: the implementation makes the assumption that all faces have the
693  // same number of dofs
694  AssertDimension(this->n_unique_faces(), 1);
695  const unsigned int face_no = 0;
696 
697  const unsigned int start_cell_dofs =
698  GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face(face_no);
699  const unsigned int start_cell_points =
700  GeometryInfo<dim>::faces_per_cell * n_face_points;
701 
702  for (unsigned int k = 0; k < interior_weights.size(0); ++k)
703  for (unsigned int i = 0; i < interior_weights.size(1); ++i)
704  for (unsigned int d = 0; d < dim; ++d)
705  nodal_values[start_cell_dofs + i * dim + d] +=
706  interior_weights(k, i, d) *
707  support_point_values[k + start_cell_points](d);
708 }
709 
710 
711 
712 template <int dim>
713 std::size_t
715 {
716  Assert(false, ExcNotImplemented());
717  return 0;
718 }
719 
720 
721 
722 // explicit instantiations
723 #include "fe_raviart_thomas.inst"
724 
725 
FullMatrix< double > inverse_node_matrix
std::vector< MappingKind > mapping_kind
virtual std::size_t memory_consumption() const override
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double >> &support_point_values, std::vector< double > &nodal_values) const override
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
void initialize_quad_dof_index_permutation_and_sign_change()
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
friend class FE_RaviartThomas
void initialize_support_points(const unsigned int rt_degree)
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual std::string get_name() const override
unsigned int n_dofs_per_cell() const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_unique_faces() const
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
FullMatrix< double > interface_constraints
Definition: fe.h:2412
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2400
size_type n() const
void invert(const FullMatrix< number2 > &M)
size_type m() const
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int degree)
Definition: polynomial.cc:745
static Quadrature< dim > project_to_child(const ReferenceCell reference_cell, const Quadrature< dim > &quadrature, const unsigned int child_no)
Definition: qprojector.cc:1130
static void project_to_subface(const ReferenceCell reference_cell, 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 void project_to_face(const ReferenceCell reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, std::vector< Point< dim >> &q_points)
static Quadrature< dim > project_to_all_faces(const ReferenceCell reference_cell, const hp::QCollection< dim - 1 > &quadrature)
double weight(const unsigned int i) const
const Point< dim > & point(const unsigned int i) const
unsigned int size() const
Definition: vector.h:110
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
Definition: exceptions.h:1473
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1667
#define AssertIndexRange(index, range)
Definition: exceptions.h:1732
@ mapping_raviart_thomas
Definition: mapping.h:127
void compute_embedding_matrices(const FiniteElement< dim, spacedim > &fe, std::vector< std::vector< FullMatrix< number >>> &matrices, const bool isotropic_only=false, const double threshold=1.e-12)
FullMatrix< double > compute_node_matrix(const FiniteElement< dim, spacedim > &fe)
std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
bool get_bit(const unsigned char number, const unsigned int n)
Definition: utilities.h:1707
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
Definition: matrix_block.h:618
double legendre(unsigned int l, double x)
Definition: cmath.h:75
static unsigned int child_cell_on_face(const RefinementCase< dim > &ref_case, const unsigned int face, const unsigned int subface, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false, const RefinementCase< dim - 1 > &face_refinement_case=RefinementCase< dim - 1 >::isotropic_refinement)