Reference documentation for deal.II version GIT 35969cdc9b 2023-12-09 01:10: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.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2023 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 
19 
21 
22 #include <deal.II/fe/fe.h>
23 #include <deal.II/fe/fe_values.h>
24 #include <deal.II/fe/mapping.h>
25 
26 #include <deal.II/grid/tria.h>
29 
30 #include <algorithm>
31 #include <functional>
32 #include <numeric>
33 #include <typeinfo>
34 
36 
37 
38 /*------------------------------- FiniteElement ----------------------*/
39 #ifndef DOXYGEN
40 
41 template <int dim, int spacedim>
43  : update_each(update_default)
44 {}
45 
46 
47 
48 template <int dim, int spacedim>
49 std::size_t
51 {
52  return sizeof(*this);
53 }
54 
55 
56 
57 template <int dim, int spacedim>
59  const FiniteElementData<dim> &fe_data,
60  const std::vector<bool> &r_i_a_f,
61  const std::vector<ComponentMask> &nonzero_c)
62  : FiniteElementData<dim>(fe_data)
63  , adjust_line_dof_index_for_line_orientation_table(this->n_dofs_per_line())
64  , system_to_base_table(this->n_dofs_per_cell())
65  , component_to_base_table(this->components,
66  std::make_pair(std::make_pair(0U, 0U), 0U))
67  ,
68 
69  // Special handling of vectors of length one: in this case, we
70  // assume that all entries were supposed to be equal
71  restriction_is_additive_flags(
72  r_i_a_f.size() == 1 ?
73  std::vector<bool>(fe_data.n_dofs_per_cell(), r_i_a_f[0]) :
74  r_i_a_f)
75  , nonzero_components(
76  nonzero_c.size() == 1 ?
77  std::vector<ComponentMask>(fe_data.n_dofs_per_cell(), nonzero_c[0]) :
78  nonzero_c)
79  , n_nonzero_components_table(compute_n_nonzero_components(nonzero_components))
80  , cached_primitivity(std::find_if(n_nonzero_components_table.begin(),
81  n_nonzero_components_table.end(),
82  [](const unsigned int n_components) {
83  return n_components != 1U;
84  }) == n_nonzero_components_table.end())
85 {
86  Assert(restriction_is_additive_flags.size() == this->n_dofs_per_cell(),
87  ExcDimensionMismatch(restriction_is_additive_flags.size(),
88  this->n_dofs_per_cell()));
89  AssertDimension(nonzero_components.size(), this->n_dofs_per_cell());
90  for (unsigned int i = 0; i < nonzero_components.size(); ++i)
91  {
92  Assert(nonzero_components[i].size() == this->n_components(),
94  Assert(nonzero_components[i].n_selected_components() >= 1,
96  Assert(n_nonzero_components_table[i] >= 1, ExcInternalError());
97  Assert(n_nonzero_components_table[i] <= this->n_components(),
99  }
100 
101  // initialize some tables in the default way, i.e. if there is only one
102  // (vector-)component; if the element is not primitive, leave these tables
103  // empty.
104  if (this->is_primitive())
105  {
106  system_to_component_table.resize(this->n_dofs_per_cell());
107  for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
108  system_to_component_table[j] = std::pair<unsigned, unsigned>(0, j);
109 
110  face_system_to_component_table.resize(this->n_unique_faces());
111  for (unsigned int f = 0; f < this->n_unique_faces(); ++f)
112  {
113  face_system_to_component_table[f].resize(this->n_dofs_per_face(f));
114  for (unsigned int j = 0; j < this->n_dofs_per_face(f); ++j)
115  face_system_to_component_table[f][j] =
116  std::pair<unsigned, unsigned>(0, j);
117  }
118  }
119 
120  for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
121  system_to_base_table[j] = std::make_pair(std::make_pair(0U, 0U), j);
122 
123  face_system_to_base_table.resize(this->n_unique_faces());
124  for (unsigned int f = 0; f < this->n_unique_faces(); ++f)
125  {
126  face_system_to_base_table[f].resize(this->n_dofs_per_face(f));
127  for (unsigned int j = 0; j < this->n_dofs_per_face(f); ++j)
128  face_system_to_base_table[f][j] =
129  std::make_pair(std::make_pair(0U, 0U), j);
130  }
131 
132  // Fill with default value; may be changed by constructor of derived class.
133  base_to_block_indices.reinit(1, 1);
134 
135  // initialize the restriction and prolongation matrices. the default
136  // constructor of FullMatrix<dim> initializes them with size zero
137  prolongation.resize(RefinementCase<dim>::isotropic_refinement);
138  restriction.resize(RefinementCase<dim>::isotropic_refinement);
139  for (const unsigned int ref_case :
141  if (ref_case != RefinementCase<dim>::no_refinement)
142  {
143  prolongation[ref_case - 1].resize(GeometryInfo<dim>::n_children(
144  RefinementCase<dim>(ref_case)),
146  restriction[ref_case - 1].resize(GeometryInfo<dim>::n_children(
147  RefinementCase<dim>(ref_case)),
149  }
150 
151 
152  if (dim == 3)
153  {
154  adjust_quad_dof_index_for_face_orientation_table.resize(
155  this->n_unique_2d_subobjects());
156 
157  for (unsigned int f = 0; f < this->n_unique_2d_subobjects(); ++f)
158  {
159  adjust_quad_dof_index_for_face_orientation_table[f] =
160  Table<2, int>(this->n_dofs_per_quad(f),
161  this->reference_cell().n_face_orientations(f));
162  adjust_quad_dof_index_for_face_orientation_table[f].fill(0);
163  }
164  }
165 
166  unit_face_support_points.resize(this->n_unique_faces());
167  generalized_face_support_points.resize(this->n_unique_faces());
168 }
169 
170 
171 
172 template <int dim, int spacedim>
173 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>
174 FiniteElement<dim, spacedim>::operator^(const unsigned int multiplicity) const
175 {
176  return {this->clone(), multiplicity};
177 }
178 
179 
180 
181 template <int dim, int spacedim>
182 double
184  const Point<dim> &) const
185 {
187  return 0.;
188 }
189 
190 
191 
192 template <int dim, int spacedim>
193 double
195  const Point<dim> &,
196  const unsigned int) const
197 {
199  return 0.;
200 }
201 
202 
203 
204 template <int dim, int spacedim>
207  const Point<dim> &) const
208 {
210  return Tensor<1, dim>();
211 }
212 
213 
214 
215 template <int dim, int spacedim>
218  const Point<dim> &,
219  const unsigned int) const
220 {
222  return Tensor<1, dim>();
223 }
224 
225 
226 
227 template <int dim, int spacedim>
230  const Point<dim> &) const
231 {
233  return Tensor<2, dim>();
234 }
235 
236 
237 
238 template <int dim, int spacedim>
241  const unsigned int,
242  const Point<dim> &,
243  const unsigned int) const
244 {
246  return Tensor<2, dim>();
247 }
248 
249 
250 
251 template <int dim, int spacedim>
254  const Point<dim> &) const
255 {
257  return Tensor<3, dim>();
258 }
259 
260 
261 
262 template <int dim, int spacedim>
265  const unsigned int,
266  const Point<dim> &,
267  const unsigned int) const
268 {
270  return Tensor<3, dim>();
271 }
272 
273 
274 
275 template <int dim, int spacedim>
278  const Point<dim> &) const
279 {
281  return Tensor<4, dim>();
282 }
283 
284 
285 
286 template <int dim, int spacedim>
289  const unsigned int,
290  const Point<dim> &,
291  const unsigned int) const
292 {
294  return Tensor<4, dim>();
295 }
296 
297 
298 template <int dim, int spacedim>
299 void
301  const bool isotropic_restriction_only,
302  const bool isotropic_prolongation_only)
303 {
304  for (const unsigned int ref_case :
306  if (ref_case != RefinementCase<dim>::no_refinement)
307  {
308  const unsigned int nc =
310 
311  for (unsigned int i = 0; i < nc; ++i)
312  {
313  if (this->restriction[ref_case - 1][i].m() !=
314  this->n_dofs_per_cell() &&
315  (!isotropic_restriction_only ||
317  this->restriction[ref_case - 1][i].reinit(
318  this->n_dofs_per_cell(), this->n_dofs_per_cell());
319  if (this->prolongation[ref_case - 1][i].m() !=
320  this->n_dofs_per_cell() &&
321  (!isotropic_prolongation_only ||
323  this->prolongation[ref_case - 1][i].reinit(
324  this->n_dofs_per_cell(), this->n_dofs_per_cell());
325  }
326  }
327 }
328 
329 
330 template <int dim, int spacedim>
331 const FullMatrix<double> &
333  const unsigned int child,
334  const RefinementCase<dim> &refinement_case) const
335 {
336  AssertIndexRange(refinement_case,
338  Assert(refinement_case != RefinementCase<dim>::no_refinement,
339  ExcMessage(
340  "Restriction matrices are only available for refined cells!"));
342  child, GeometryInfo<dim>::n_children(RefinementCase<dim>(refinement_case)));
343  // we use refinement_case-1 here. the -1 takes care of the origin of the
344  // vector, as for RefinementCase<dim>::no_refinement (=0) there is no data
345  // available and so the vector indices are shifted
346  Assert(restriction[refinement_case - 1][child].n() == this->n_dofs_per_cell(),
348  return restriction[refinement_case - 1][child];
349 }
350 
351 
352 
353 template <int dim, int spacedim>
354 const FullMatrix<double> &
356  const unsigned int child,
357  const RefinementCase<dim> &refinement_case) const
358 {
359  AssertIndexRange(refinement_case,
361  Assert(refinement_case != RefinementCase<dim>::no_refinement,
362  ExcMessage(
363  "Prolongation matrices are only available for refined cells!"));
365  child, GeometryInfo<dim>::n_children(RefinementCase<dim>(refinement_case)));
366  // we use refinement_case-1 here. the -1 takes care
367  // of the origin of the vector, as for
368  // RefinementCase::no_refinement (=0) there is no
369  // data available and so the vector indices
370  // are shifted
371  Assert(prolongation[refinement_case - 1][child].n() ==
372  this->n_dofs_per_cell(),
373  ExcEmbeddingVoid());
374  return prolongation[refinement_case - 1][child];
375 }
376 
377 
378 // TODO:[GK] This is probably not the most efficient way of doing this.
379 template <int dim, int spacedim>
380 unsigned int
382  const unsigned int index) const
383 {
384  AssertIndexRange(index, this->n_components());
385 
386  return first_block_of_base(component_to_base_table[index].first.first) +
388 }
389 
390 
391 template <int dim, int spacedim>
394  const FEValuesExtractors::Scalar &scalar) const
395 {
396  AssertIndexRange(scalar.component, this->n_components());
397 
398  // TODO: it would be nice to verify that it is indeed possible
399  // to select this scalar component, i.e., that it is not part
400  // of a non-primitive element. unfortunately, there is no simple
401  // way to write such a condition...
402 
403  std::vector<bool> mask(this->n_components(), false);
404  mask[scalar.component] = true;
405  return ComponentMask(mask);
406 }
407 
408 
409 template <int dim, int spacedim>
412  const FEValuesExtractors::Vector &vector) const
413 {
414  AssertIndexRange(vector.first_vector_component + dim - 1,
415  this->n_components());
416 
417  // TODO: it would be nice to verify that it is indeed possible
418  // to select these vector components, i.e., that they don't span
419  // beyond the beginning or end of anon-primitive element.
420  // unfortunately, there is no simple way to write such a condition...
421 
422  std::vector<bool> mask(this->n_components(), false);
423  for (unsigned int c = vector.first_vector_component;
424  c < vector.first_vector_component + dim;
425  ++c)
426  mask[c] = true;
427  return ComponentMask(mask);
428 }
429 
430 
431 template <int dim, int spacedim>
434  const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const
435 {
438  this->n_components());
439 
440  // TODO: it would be nice to verify that it is indeed possible
441  // to select these vector components, i.e., that they don't span
442  // beyond the beginning or end of anon-primitive element.
443  // unfortunately, there is no simple way to write such a condition...
444 
445  std::vector<bool> mask(this->n_components(), false);
446  for (unsigned int c = sym_tensor.first_tensor_component;
447  c < sym_tensor.first_tensor_component +
449  ++c)
450  mask[c] = true;
451  return ComponentMask(mask);
452 }
453 
454 
455 
456 template <int dim, int spacedim>
459 {
460  // if we get a block mask that represents all blocks, then
461  // do the same for the returned component mask
463  return {};
464 
465  AssertDimension(block_mask.size(), this->n_blocks());
466 
467  std::vector<bool> component_mask(this->n_components(), false);
468  for (unsigned int c = 0; c < this->n_components(); ++c)
469  if (block_mask[component_to_block_index(c)] == true)
470  component_mask[c] = true;
471 
473 }
474 
475 
476 
477 template <int dim, int spacedim>
478 BlockMask
480  const FEValuesExtractors::Scalar &scalar) const
481 {
482  // simply create the corresponding component mask (a simpler
483  // process) and then convert it to a block mask
484  return block_mask(component_mask(scalar));
485 }
486 
487 
488 template <int dim, int spacedim>
489 BlockMask
491  const FEValuesExtractors::Vector &vector) const
492 {
493  // simply create the corresponding component mask (a simpler
494  // process) and then convert it to a block mask
495  return block_mask(component_mask(vector));
496 }
497 
498 
499 template <int dim, int spacedim>
500 BlockMask
502  const FEValuesExtractors::SymmetricTensor<2> &sym_tensor) const
503 {
504  // simply create the corresponding component mask (a simpler
505  // process) and then convert it to a block mask
506  return block_mask(component_mask(sym_tensor));
507 }
508 
509 
510 
511 template <int dim, int spacedim>
512 BlockMask
514  const ComponentMask &component_mask) const
515 {
516  // if we get a component mask that represents all component, then
517  // do the same for the returned block mask
519  return {};
520 
521  AssertDimension(component_mask.size(), this->n_components());
522 
523  // walk over all of the components
524  // of this finite element and see
525  // if we need to set the
526  // corresponding block. inside the
527  // block, walk over all the
528  // components that correspond to
529  // this block and make sure the
530  // component mask is set for all of
531  // them
532  std::vector<bool> block_mask(this->n_blocks(), false);
533  for (unsigned int c = 0; c < this->n_components();)
534  {
535  const unsigned int block = component_to_block_index(c);
536  if (component_mask[c] == true)
537  block_mask[block] = true;
538 
539  // now check all of the other
540  // components that correspond
541  // to this block
542  ++c;
543  while ((c < this->n_components()) &&
544  (component_to_block_index(c) == block))
545  {
546  Assert(component_mask[c] == block_mask[block],
547  ExcMessage(
548  "The component mask argument given to this function "
549  "is not a mask where the individual components belonging "
550  "to one block of the finite element are either all "
551  "selected or not selected. You can't call this function "
552  "with a component mask that splits blocks."));
553  ++c;
554  }
555  }
556 
557 
558  return BlockMask(block_mask);
559 }
560 
561 
562 
563 template <int dim, int spacedim>
564 unsigned int
565 FiniteElement<dim, spacedim>::face_to_cell_index(const unsigned int face_index,
566  const unsigned int face,
567  const bool face_orientation,
568  const bool face_flip,
569  const bool face_rotation) const
570 {
571  AssertIndexRange(face_index, this->n_dofs_per_face(face));
572  AssertIndexRange(face, this->reference_cell().n_faces());
573 
574  // TODO: we could presumably solve the 3d case below using the
575  // adjust_quad_dof_index_for_face_orientation_table field. For the 2d case, we
576  // can't use adjust_line_dof_index_for_line_orientation_table since that array
577  // is not populated for elements with quadrilateral reference cells
578  // (presumably because we thought that there are no flipped edges in 2d, but
579  // these can happen in DoFTools::make_periodicity_constraints(), for example).
580  // so we would need to either fill this field, or rely on derived classes
581  // implementing this function, as we currently do
582 
583  // see the function's documentation for an explanation of this
584  // assertion -- in essence, derived classes have to implement
585  // an overloaded version of this function if we are to use any
586  // other than standard orientation
587  if ((face_orientation != true) || (face_flip != false) ||
588  (face_rotation != false))
589  Assert((this->n_dofs_per_line() <= 1) && (this->n_dofs_per_quad(face) <= 1),
590  ExcMessage(
591  "The function in this base class can not handle this case. "
592  "Rather, the derived class you are using must provide "
593  "an overloaded version but apparently hasn't done so. See "
594  "the documentation of this function for more information."));
595 
596  // we need to distinguish between DoFs on vertices, lines and in 3d quads.
597  // do so in a sequence of if-else statements
598  if (face_index < this->get_first_face_line_index(face))
599  // DoF is on a vertex
600  {
601  // get the number of the vertex on the face that corresponds to this DoF,
602  // along with the number of the DoF on this vertex
603  const unsigned int face_vertex = face_index / this->n_dofs_per_vertex();
604  const unsigned int dof_index_on_vertex =
605  face_index % this->n_dofs_per_vertex();
606 
607  // then get the number of this vertex on the cell and translate
608  // this to a DoF number on the cell
609  return (this->reference_cell().face_to_cell_vertices(
610  face,
611  face_vertex,
612  internal::combined_face_orientation(face_orientation,
613  face_rotation,
614  face_flip)) *
615  this->n_dofs_per_vertex() +
616  dof_index_on_vertex);
617  }
618  else if (face_index < this->get_first_face_quad_index(face))
619  // DoF is on a face
620  {
621  // do the same kind of translation as before. we need to only consider
622  // DoFs on the lines, i.e., ignoring those on the vertices
623  const unsigned int index =
624  face_index - this->get_first_face_line_index(face);
625 
626  const unsigned int face_line = index / this->n_dofs_per_line();
627  const unsigned int dof_index_on_line = index % this->n_dofs_per_line();
628 
629  return (this->get_first_line_index() +
630  this->reference_cell().face_to_cell_lines(
631  face,
632  face_line,
633  internal::combined_face_orientation(face_orientation,
634  face_rotation,
635  face_flip)) *
636  this->n_dofs_per_line() +
637  dof_index_on_line);
638  }
639  else
640  // DoF is on a quad
641  {
642  Assert(dim >= 3, ExcInternalError());
643 
644  // ignore vertex and line dofs
645  const unsigned int index =
646  face_index - this->get_first_face_quad_index(face);
647 
648  return (this->get_first_quad_index(face) + index);
649  }
650 }
651 
652 
653 
654 template <int dim, int spacedim>
655 unsigned int
657  const unsigned int index,
658  const unsigned int face,
659  const bool face_orientation,
660  const bool face_flip,
661  const bool face_rotation) const
662 {
663  // general template for 1d and 2d: not
664  // implemented. in fact, the function
665  // shouldn't even be called unless we are
666  // in 3d, so throw an internal error
667  Assert(dim == 3, ExcInternalError());
668  if (dim < 3)
669  return index;
670 
671  // adjust dofs on 3d faces if the face is
672  // flipped. note that we query a table that
673  // derived elements need to have set up
674  // front. the exception are discontinuous
675  // elements for which there should be no
676  // face dofs anyway (i.e. dofs_per_quad==0
677  // in 3d), so we don't need the table, but
678  // the function should also not have been
679  // called
680  AssertIndexRange(index, this->n_dofs_per_quad(face));
681  const auto table_n = this->n_unique_2d_subobjects() == 1 ? 0 : face;
682  Assert(
683  adjust_quad_dof_index_for_face_orientation_table[table_n].n_elements() ==
684  (this->reference_cell().n_face_orientations(face)) *
685  this->n_dofs_per_quad(face),
686  ExcInternalError());
688  index,
689  internal::combined_face_orientation(face_orientation,
690  face_rotation,
691  face_flip));
692 }
693 
694 
695 
696 template <int dim, int spacedim>
697 unsigned int
699  const unsigned int index,
700  const bool line_orientation) const
701 {
702  // We orient quads (and 1D meshes are always oriented) so always skip those
703  // cases
704  //
705  // TODO - we may want to change this in the future: see also the notes in
706  // face_to_cell_index()
707  if (this->reference_cell() == ReferenceCells::Line ||
709  return index;
710 
711  AssertIndexRange(index, this->n_dofs_per_line());
713  this->n_dofs_per_line(),
714  ExcInternalError());
715  if (line_orientation)
716  return index;
717  else
719 }
720 
721 
722 
723 template <int dim, int spacedim>
724 bool
726 {
727  for (const unsigned int ref_case :
729  if (ref_case != RefinementCase<dim>::no_refinement)
730  for (unsigned int c = 0;
731  c < GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
732  ++c)
733  {
734  // make sure also the lazily initialized matrices are created
736  Assert((prolongation[ref_case - 1][c].m() ==
737  this->n_dofs_per_cell()) ||
738  (prolongation[ref_case - 1][c].m() == 0),
739  ExcInternalError());
740  Assert((prolongation[ref_case - 1][c].n() ==
741  this->n_dofs_per_cell()) ||
742  (prolongation[ref_case - 1][c].n() == 0),
743  ExcInternalError());
744  if ((prolongation[ref_case - 1][c].m() == 0) ||
745  (prolongation[ref_case - 1][c].n() == 0))
746  return false;
747  }
748  return true;
749 }
750 
751 
752 
753 template <int dim, int spacedim>
754 bool
756 {
757  for (const unsigned int ref_case :
759  if (ref_case != RefinementCase<dim>::no_refinement)
760  for (unsigned int c = 0;
761  c < GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
762  ++c)
763  {
764  // make sure also the lazily initialized matrices are created
766  Assert((restriction[ref_case - 1][c].m() ==
767  this->n_dofs_per_cell()) ||
768  (restriction[ref_case - 1][c].m() == 0),
769  ExcInternalError());
770  Assert((restriction[ref_case - 1][c].n() ==
771  this->n_dofs_per_cell()) ||
772  (restriction[ref_case - 1][c].n() == 0),
773  ExcInternalError());
774  if ((restriction[ref_case - 1][c].m() == 0) ||
775  (restriction[ref_case - 1][c].n() == 0))
776  return false;
777  }
778  return true;
779 }
780 
781 
782 
783 template <int dim, int spacedim>
784 bool
786 {
787  const RefinementCase<dim> ref_case =
789 
790  for (unsigned int c = 0;
791  c < GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
792  ++c)
793  {
794  // make sure also the lazily initialized matrices are created
796  Assert((prolongation[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
797  (prolongation[ref_case - 1][c].m() == 0),
798  ExcInternalError());
799  Assert((prolongation[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
800  (prolongation[ref_case - 1][c].n() == 0),
801  ExcInternalError());
802  if ((prolongation[ref_case - 1][c].m() == 0) ||
803  (prolongation[ref_case - 1][c].n() == 0))
804  return false;
805  }
806  return true;
807 }
808 
809 
810 
811 template <int dim, int spacedim>
812 bool
814 {
815  const RefinementCase<dim> ref_case =
817 
818  for (unsigned int c = 0;
819  c < GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
820  ++c)
821  {
822  // make sure also the lazily initialized matrices are created
824  Assert((restriction[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
825  (restriction[ref_case - 1][c].m() == 0),
826  ExcInternalError());
827  Assert((restriction[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
828  (restriction[ref_case - 1][c].n() == 0),
829  ExcInternalError());
830  if ((restriction[ref_case - 1][c].m() == 0) ||
831  (restriction[ref_case - 1][c].n() == 0))
832  return false;
833  }
834  return true;
835 }
836 
837 
838 
839 template <int dim, int spacedim>
840 bool
842  const internal::SubfaceCase<dim> &subface_case) const
843 {
844  if (subface_case == internal::SubfaceCase<dim>::case_isotropic)
845  {
846  unsigned int n_dofs_on_faces = 0;
847 
848  for (const auto face_no : this->reference_cell().face_indices())
849  n_dofs_on_faces += this->n_dofs_per_face(face_no);
850 
851  return (n_dofs_on_faces == 0) || (interface_constraints.m() != 0);
852  }
853  else
854  return false;
855 }
856 
857 
858 
859 template <int dim, int spacedim>
860 bool
862 {
863  return false;
864 }
865 
866 
867 
868 template <int dim, int spacedim>
869 const FullMatrix<double> &
871  const internal::SubfaceCase<dim> &subface_case) const
872 {
873  // TODO: the implementation makes the assumption that all faces have the
874  // same number of dofs
875  AssertDimension(this->n_unique_faces(), 1);
876  const unsigned int face_no = 0;
877  (void)face_no;
878 
879  (void)subface_case;
881  ExcMessage("Constraints for this element are only implemented "
882  "for the case that faces are refined isotropically "
883  "(which is always the case in 2d, and in 3d requires "
884  "that the neighboring cell of a coarse cell presents "
885  "exactly four children on the common face)."));
886  Assert((this->n_dofs_per_face(face_no) == 0) ||
887  (interface_constraints.m() != 0),
888  ExcMessage("The finite element for which you try to obtain "
889  "hanging node constraints does not appear to "
890  "implement them."));
891 
892  if (dim == 1)
896 
897  return interface_constraints;
898 }
899 
900 
901 
902 template <int dim, int spacedim>
905 {
906  // TODO: the implementation makes the assumption that all faces have the
907  // same number of dofs
908  AssertDimension(this->n_unique_faces(), 1);
909  const unsigned int face_no = 0;
910 
911  switch (dim)
912  {
913  case 1:
914  return {0U, 0U};
915  case 2:
916  return {this->n_dofs_per_vertex() + 2 * this->n_dofs_per_line(),
917  this->n_dofs_per_face(face_no)};
918  case 3:
919  return {5 * this->n_dofs_per_vertex() + 12 * this->n_dofs_per_line() +
920  4 * this->n_dofs_per_quad(face_no),
921  this->n_dofs_per_face(face_no)};
922  default:
923  Assert(false, ExcNotImplemented());
924  }
926 }
927 
928 
929 
930 template <int dim, int spacedim>
931 void
934  FullMatrix<double> &) const
935 {
936  // by default, no interpolation
937  // implemented. so throw exception,
938  // as documentation says
939  AssertThrow(
940  false,
942 }
943 
944 
945 
946 template <int dim, int spacedim>
947 void
951  const unsigned int) const
952 {
953  // by default, no interpolation
954  // implemented. so throw exception,
955  // as documentation says
956  AssertThrow(
957  false,
959 }
960 
961 
962 
963 template <int dim, int spacedim>
964 void
967  const unsigned int,
969  const unsigned int) const
970 {
971  // by default, no interpolation
972  // implemented. so throw exception,
973  // as documentation says
974  AssertThrow(
975  false,
977 }
978 
979 
980 
981 template <int dim, int spacedim>
982 std::vector<std::pair<unsigned int, unsigned int>>
984  const FiniteElement<dim, spacedim> &) const
985 {
986  Assert(false, ExcNotImplemented());
987  return std::vector<std::pair<unsigned int, unsigned int>>();
988 }
989 
990 
991 
992 template <int dim, int spacedim>
993 std::vector<std::pair<unsigned int, unsigned int>>
995  const FiniteElement<dim, spacedim> &) const
996 {
997  Assert(false, ExcNotImplemented());
998  return std::vector<std::pair<unsigned int, unsigned int>>();
999 }
1000 
1001 
1002 
1003 template <int dim, int spacedim>
1004 std::vector<std::pair<unsigned int, unsigned int>>
1007  const unsigned int) const
1008 {
1009  Assert(false, ExcNotImplemented());
1010  return std::vector<std::pair<unsigned int, unsigned int>>();
1011 }
1012 
1013 
1014 
1015 template <int dim, int spacedim>
1019  const unsigned int) const
1020 {
1021  Assert(false, ExcNotImplemented());
1023 }
1024 
1025 
1026 
1027 template <int dim, int spacedim>
1028 bool
1030  const FiniteElement<dim, spacedim> &f) const
1031 {
1032  // Compare fields in roughly increasing order of how expensive the
1033  // comparison is
1034  return ((typeid(*this) == typeid(f)) && (this->get_name() == f.get_name()) &&
1035  (static_cast<const FiniteElementData<dim> &>(*this) ==
1036  static_cast<const FiniteElementData<dim> &>(f)) &&
1038 }
1039 
1040 
1041 
1042 template <int dim, int spacedim>
1043 bool
1045  const FiniteElement<dim, spacedim> &f) const
1046 {
1047  return !(*this == f);
1048 }
1049 
1050 
1051 
1052 template <int dim, int spacedim>
1053 const std::vector<Point<dim>> &
1055 {
1056  // a finite element may define
1057  // support points, but only if
1058  // there are as many as there are
1059  // degrees of freedom
1060  Assert((unit_support_points.empty()) ||
1061  (unit_support_points.size() == this->n_dofs_per_cell()),
1062  ExcInternalError());
1063  return unit_support_points;
1064 }
1065 
1066 
1067 
1068 template <int dim, int spacedim>
1069 bool
1071 {
1072  return (unit_support_points.size() != 0);
1073 }
1074 
1075 
1076 
1077 template <int dim, int spacedim>
1078 const std::vector<Point<dim>> &
1080 {
1081  // If the finite element implements generalized support points, return
1082  // those. Otherwise fall back to unit support points.
1083  return ((generalized_support_points.empty()) ? unit_support_points :
1085 }
1086 
1087 
1088 
1089 template <int dim, int spacedim>
1090 bool
1092 {
1093  return (get_generalized_support_points().size() != 0);
1094 }
1095 
1096 
1097 
1098 template <int dim, int spacedim>
1099 Point<dim>
1100 FiniteElement<dim, spacedim>::unit_support_point(const unsigned int index) const
1101 {
1102  AssertIndexRange(index, this->n_dofs_per_cell());
1103  Assert(unit_support_points.size() == this->n_dofs_per_cell(),
1105  return unit_support_points[index];
1106 }
1107 
1108 
1109 
1110 template <int dim, int spacedim>
1111 const std::vector<Point<dim - 1>> &
1113  const unsigned int face_no) const
1114 {
1115  // a finite element may define
1116  // support points, but only if
1117  // there are as many as there are
1118  // degrees of freedom on a face
1119  Assert((unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
1120  .empty()) ||
1121  (unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
1122  .size() == this->n_dofs_per_face(face_no)),
1123  ExcInternalError());
1124  return unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no];
1125 }
1126 
1127 
1128 
1129 template <int dim, int spacedim>
1130 bool
1132  const unsigned int face_no) const
1133 {
1134  return (unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
1135  .size() != 0);
1136 }
1137 
1138 
1139 
1140 template <int dim, int spacedim>
1141 Point<dim - 1>
1143  const unsigned int index,
1144  const unsigned int face_no) const
1145 {
1146  AssertIndexRange(index, this->n_dofs_per_face(face_no));
1147  Assert(unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
1148  .size() == this->n_dofs_per_face(face_no),
1150  return unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
1151  [index];
1152 }
1153 
1154 
1155 
1156 template <int dim, int spacedim>
1157 bool
1159  const unsigned int) const
1160 {
1161  return true;
1162 }
1163 
1164 
1165 
1166 template <int dim, int spacedim>
1169 {
1170  // Translate the ComponentMask into first_selected and n_components after
1171  // some error checking:
1172  const unsigned int n_total_components = this->n_components();
1173  Assert((n_total_components == mask.size()) || (mask.size() == 0),
1174  ExcMessage("The given ComponentMask has the wrong size."));
1175 
1176  const unsigned int n_selected =
1177  mask.n_selected_components(n_total_components);
1178  Assert(n_selected > 0,
1179  ExcMessage("You need at least one selected component."));
1180 
1181  const unsigned int first_selected =
1182  mask.first_selected_component(n_total_components);
1183 
1184 # ifdef DEBUG
1185  // check that it is contiguous:
1186  for (unsigned int c = 0; c < n_total_components; ++c)
1187  Assert((c < first_selected && (!mask[c])) ||
1188  (c >= first_selected && c < first_selected + n_selected &&
1189  mask[c]) ||
1190  (c >= first_selected + n_selected && !mask[c]),
1191  ExcMessage("Error: the given ComponentMask is not contiguous!"));
1192 # endif
1193 
1194  return get_sub_fe(first_selected, n_selected);
1195 }
1196 
1197 
1198 
1199 template <int dim, int spacedim>
1202  const unsigned int first_component,
1203  const unsigned int n_selected_components) const
1204 {
1205  // No complicated logic is needed here, because it is overridden in
1206  // FESystem<dim,spacedim>. Just make sure that what the user chose is valid:
1207  Assert(first_component == 0 && n_selected_components == this->n_components(),
1208  ExcMessage(
1209  "You can only select a whole FiniteElement, not a part of one."));
1210 
1211  (void)first_component;
1212  (void)n_selected_components;
1213  return *this;
1214 }
1215 
1216 
1217 
1218 template <int dim, int spacedim>
1219 std::pair<Table<2, bool>, std::vector<unsigned int>>
1221 {
1222  Assert(false, ExcNotImplemented());
1223  return std::pair<Table<2, bool>, std::vector<unsigned int>>(
1224  Table<2, bool>(this->n_components(), this->n_dofs_per_cell()),
1225  std::vector<unsigned int>(this->n_components()));
1226 }
1227 
1228 
1229 
1230 template <int dim, int spacedim>
1231 void
1234  const std::vector<Vector<double>> &,
1235  std::vector<double> &) const
1236 {
1238  ExcMessage("The element for which you are calling the current "
1239  "function does not have generalized support points (see "
1240  "the glossary for a definition of generalized support "
1241  "points). Consequently, the current function can not "
1242  "be defined and is not implemented by the element."));
1243  Assert(false, ExcNotImplemented());
1244 }
1245 
1246 
1247 
1248 template <int dim, int spacedim>
1249 std::size_t
1251 {
1252  return (
1253  sizeof(FiniteElementData<dim>) +
1265 }
1266 
1267 
1268 
1269 template <int dim, int spacedim>
1270 std::vector<unsigned int>
1272  const std::vector<ComponentMask> &nonzero_components)
1273 {
1274  std::vector<unsigned int> retval(nonzero_components.size());
1275  for (unsigned int i = 0; i < nonzero_components.size(); ++i)
1276  retval[i] = nonzero_components[i].n_selected_components();
1277  return retval;
1278 }
1279 
1280 
1281 
1282 /*------------------------------- FiniteElement ----------------------*/
1283 
1284 # ifndef DOXYGEN
1285 template <int dim, int spacedim>
1286 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1288  const UpdateFlags flags,
1289  const Mapping<dim, spacedim> &mapping,
1290  const hp::QCollection<dim - 1> &quadrature,
1292  spacedim>
1293  &output_data) const
1294 {
1295  return get_data(flags,
1296  mapping,
1298  quadrature),
1299  output_data);
1300 }
1301 
1302 
1303 
1304 template <int dim, int spacedim>
1305 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1307  const UpdateFlags flags,
1308  const Mapping<dim, spacedim> &mapping,
1309  const Quadrature<dim - 1> &quadrature,
1311  spacedim>
1312  &output_data) const
1313 {
1314  return get_data(flags,
1315  mapping,
1317  quadrature),
1318  output_data);
1319 }
1320 
1321 
1322 
1323 template <int dim, int spacedim>
1324 inline void
1326  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
1327  const unsigned int face_no,
1328  const hp::QCollection<dim - 1> &quadrature,
1329  const Mapping<dim, spacedim> &mapping,
1330  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
1332  &mapping_data,
1333  const typename FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
1335  spacedim>
1336  &output_data) const
1337 {
1338  // base class version, implement overridden function in derived classes
1339  AssertDimension(quadrature.size(), 1);
1340  fill_fe_face_values(cell,
1341  face_no,
1342  quadrature[0],
1343  mapping,
1344  mapping_internal,
1345  mapping_data,
1346  fe_internal,
1347  output_data);
1348 }
1349 
1350 
1351 
1352 template <int dim, int spacedim>
1353 inline void
1355  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
1356  const unsigned int face_no,
1357  const Quadrature<dim - 1> &quadrature,
1358  const Mapping<dim, spacedim> &mapping,
1359  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
1361  &mapping_data,
1362  const typename FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
1364  spacedim>
1365  &output_data) const
1366 {
1367  Assert(false,
1368  ExcMessage("Use of a deprecated interface, please implement "
1369  "fill_fe_face_values taking a hp::QCollection argument"));
1370  (void)cell;
1371  (void)face_no;
1372  (void)quadrature;
1373  (void)mapping;
1374  (void)mapping_internal;
1375  (void)mapping_data;
1376  (void)fe_internal;
1377  (void)output_data;
1378 }
1379 # endif
1380 
1381 
1382 
1383 template <int dim, int spacedim>
1384 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1386  const UpdateFlags flags,
1387  const Mapping<dim, spacedim> &mapping,
1388  const Quadrature<dim - 1> &quadrature,
1390  spacedim>
1391  &output_data) const
1392 {
1393  return get_data(flags,
1394  mapping,
1396  this->reference_cell(), quadrature),
1397  output_data);
1398 }
1399 
1400 
1401 
1402 template <int dim, int spacedim>
1404 FiniteElement<dim, spacedim>::base_element(const unsigned int index) const
1405 {
1406  (void)index;
1407  AssertIndexRange(index, 1);
1408  // This function should not be
1409  // called for a system element
1411  return *this;
1412 }
1413 
1414 
1415 #endif
1416 /*------------------------------- Explicit Instantiations -------------*/
1417 #include "fe.inst"
1418 
1419 
unsigned int size() const
bool represents_the_all_selected_mask() const
unsigned int size() const
bool represents_the_all_selected_mask() const
unsigned int size() const
unsigned int get_first_line_index() const
unsigned int n_dofs_per_vertex() const
unsigned int n_dofs_per_cell() const
unsigned int n_dofs_per_line() const
unsigned int get_first_quad_index(const unsigned int quad_no=0) const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_blocks() const
unsigned int n_components() const
ReferenceCell reference_cell() const
unsigned int n_unique_2d_subobjects() const
unsigned int get_first_face_line_index(const unsigned int face_no=0) const
unsigned int get_first_face_quad_index(const unsigned int face_no=0) const
unsigned int n_unique_faces() const
unsigned int n_dofs_per_quad(unsigned int face_no=0) const
virtual std::size_t memory_consumption() const
bool constraints_are_implemented(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
bool isotropic_prolongation_is_implemented() const
virtual std::string get_name() const =0
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const
const std::vector< unsigned int > n_nonzero_components_table
Definition: fe.h:2588
virtual std::unique_ptr< InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const hp::QCollection< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
const std::vector< Point< dim > > & get_generalized_support_points() const
std::vector< std::vector< Point< dim - 1 > > > unit_face_support_points
Definition: fe.h:2447
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
bool prolongation_is_implemented() const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
const std::vector< Point< dim > > & get_unit_support_points() const
bool has_face_support_points(const unsigned int face_no=0) const
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
bool operator!=(const FiniteElement< dim, spacedim > &) const
virtual std::unique_ptr< InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
bool has_support_points() const
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:2402
TableIndices< 2 > interface_constraints_size() const
bool has_generalized_support_points() const
std::vector< Table< 2, int > > adjust_quad_dof_index_for_face_orientation_table
Definition: fe.h:2476
virtual bool operator==(const FiniteElement< dim, spacedim > &fe) const
unsigned int adjust_line_dof_index_for_line_orientation(const unsigned int index, const bool line_orientation) const
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double >> &support_point_values, std::vector< double > &nodal_values) const
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
BlockIndices base_to_block_indices
Definition: fe.h:2540
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const =0
bool isotropic_restriction_is_implemented() const
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition: fe.h:2491
virtual Point< dim > unit_support_point(const unsigned int index) const
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) 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
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > operator^(const unsigned int multiplicity) const
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
const FullMatrix< double > & constraints(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const
unsigned int component_to_block_index(const unsigned int component) const
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
virtual std::unique_ptr< InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
Definition: fe.h:2527
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
FiniteElement(const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
Definition: fe.h:2496
const FiniteElement< dim, spacedim > & get_sub_fe(const ComponentMask &mask) const
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
const std::vector< bool > restriction_is_additive_flags
Definition: fe.h:2570
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index, const unsigned int face_no=0) const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
Definition: fe.h:2563
std::vector< std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > > face_system_to_base_table
Definition: fe.h:2534
std::vector< Point< dim > > unit_support_points
Definition: fe.h:2440
bool restriction_is_implemented() const
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > face_system_to_component_table
Definition: fe.h:2508
static std::vector< unsigned int > compute_n_nonzero_components(const std::vector< ComponentMask > &nonzero_components)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const
const std::vector< Point< dim - 1 > > & get_unit_face_support_points(const unsigned int face_no=0) const
FullMatrix< double > interface_constraints
Definition: fe.h:2428
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const
virtual std::size_t memory_consumption() const
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:2453
unsigned int adjust_quad_dof_index_for_face_orientation(const unsigned int index, const unsigned int face_no, const bool face_orientation, const bool face_flip, const bool face_rotation) const
const std::vector< ComponentMask > nonzero_components
Definition: fe.h:2579
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
virtual bool hp_constraints_are_implemented() const
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:2416
types::global_dof_index first_block_of_base(const unsigned int b) const
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
size_type n() const
size_type m() const
Definition: point.h:112
Definition: vector.h:110
unsigned int size() const
Definition: collection.h:265
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
Point< 2 > first
Definition: grid_out.cc:4614
static ::ExceptionBase & ExcFEHasNoSupportPoints()
static ::ExceptionBase & ExcWrongInterfaceMatrixSize(int arg1, int arg2)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcUnitShapeValuesDoNotExist()
static ::ExceptionBase & ExcEmbeddingVoid()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
Definition: exceptions.h:1631
static ::ExceptionBase & ExcNotImplemented()
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1820
#define AssertIndexRange(index, range)
Definition: exceptions.h:1888
static ::ExceptionBase & ExcProjectionVoid()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
Definition: exceptions.h:1732
UpdateFlags
@ update_default
No update.
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
static const char U
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
constexpr const ReferenceCell Quadrilateral
constexpr const ReferenceCell Line
VectorType::value_type * begin(VectorType &V)
VectorType::value_type * end(VectorType &V)
unsigned char combined_face_orientation(const bool face_orientation, const bool face_rotation, const bool face_flip)
static const unsigned int invalid_unsigned_int
Definition: types.h:221
static unsigned int n_children(const RefinementCase< dim > &refinement_case)