deal.II version GIT relicensing-2291-g668cd86249 2024-12-24 11:30:00+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\}}\)
Loading...
Searching...
No Matches
qprojector.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2005 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_qprojector_h
16#define dealii_qprojector_h
17
18
19#include <deal.II/base/config.h>
20
23
25
27
28#ifndef DOXYGEN
29class ReferenceCell;
30#endif
31
80template <int dim>
82{
83public:
88 using SubQuadrature = Quadrature<dim - 1>;
89
95 static void
96 project_to_face(const ReferenceCell &reference_cell,
97 const SubQuadrature &quadrature,
98 const unsigned int face_no,
99 std::vector<Point<dim>> &q_points);
100
106 static Quadrature<dim>
107 project_to_face(const ReferenceCell &reference_cell,
108 const SubQuadrature &quadrature,
109 const unsigned int face_no);
110
117 static Quadrature<dim>
118 project_to_oriented_face(const ReferenceCell &reference_cell,
119 const SubQuadrature &quadrature,
120 const unsigned int face_no,
121 const bool face_orientation,
122 const bool face_flip,
123 const bool face_rotation);
124
134 static void
135 project_to_subface(const ReferenceCell &reference_cell,
136 const SubQuadrature &quadrature,
137 const unsigned int face_no,
138 const unsigned int subface_no,
139 std::vector<Point<dim>> &q_points,
140 const RefinementCase<dim - 1> &ref_case =
142
156 static Quadrature<dim>
157 project_to_subface(const ReferenceCell &reference_cell,
158 const SubQuadrature &quadrature,
159 const unsigned int face_no,
160 const unsigned int subface_no,
161 const RefinementCase<dim - 1> &ref_case =
163
173 static Quadrature<dim>
174 project_to_oriented_subface(const ReferenceCell &reference_cell,
175 const SubQuadrature &quadrature,
176 const unsigned int face_no,
177 const unsigned int subface_no,
178 const bool face_orientation,
179 const bool face_flip,
180 const bool face_rotation,
181 const internal::SubfaceCase<dim> ref_case);
182
199 static Quadrature<dim>
200 project_to_all_faces(const ReferenceCell &reference_cell,
201 const hp::QCollection<dim - 1> &quadrature);
202
207 static Quadrature<dim>
208 project_to_all_faces(const ReferenceCell &reference_cell,
209 const Quadrature<dim - 1> &quadrature);
210
224 static Quadrature<dim>
226 const SubQuadrature &quadrature);
227
238 static Quadrature<dim>
239 project_to_child(const ReferenceCell &reference_cell,
240 const Quadrature<dim> &quadrature,
241 const unsigned int child_no);
242
252 static Quadrature<dim>
253 project_to_all_children(const ReferenceCell &reference_cell,
254 const Quadrature<dim> &quadrature);
255
260 static Quadrature<dim>
261 project_to_line(const ReferenceCell &reference_cell,
262 const Quadrature<1> &quadrature,
263 const Point<dim> &p1,
264 const Point<dim> &p2);
265
277 {
278 public:
285
292 static DataSetDescriptor
293 cell();
294
309 "Use the version of this function which takes a combined_orientation "
310 "argument instead.")
311 static DataSetDescriptor
312 face(const ReferenceCell &reference_cell,
313 const unsigned int face_no,
314 const bool face_orientation,
315 const bool face_flip,
316 const bool face_rotation,
317 const unsigned int n_quadrature_points);
318
329 static DataSetDescriptor
330 face(const ReferenceCell &reference_cell,
331 const unsigned int face_no,
332 const unsigned char combined_orientation,
333 const unsigned int n_quadrature_points);
334
344 "Use the version of this function which takes a combined_orientation "
345 "argument instead.")
346 static DataSetDescriptor
347 face(const ReferenceCell &reference_cell,
348 const unsigned int face_no,
349 const bool face_orientation,
350 const bool face_flip,
351 const bool face_rotation,
352 const hp::QCollection<dim - 1> &quadrature);
353
360 static DataSetDescriptor
361 face(const ReferenceCell &reference_cell,
362 const unsigned int face_no,
363 const unsigned char combined_orientation,
364 const hp::QCollection<dim - 1> &quadrature);
365
382 "Use the version of this function which takes a combined_orientation "
383 "argument instead.")
384 static DataSetDescriptor
385 subface(const ReferenceCell &reference_cell,
386 const unsigned int face_no,
387 const unsigned int subface_no,
388 const bool face_orientation,
389 const bool face_flip,
390 const bool face_rotation,
391 const unsigned int n_quadrature_points,
392 const internal::SubfaceCase<dim> ref_case =
394
407 static DataSetDescriptor
408 subface(const ReferenceCell &reference_cell,
409 const unsigned int face_no,
410 const unsigned int subface_no,
411 const unsigned char combined_orientation,
412 const unsigned int n_quadrature_points,
413 const internal::SubfaceCase<dim> ref_case =
415
422 operator unsigned int() const;
423
424 private:
428 const unsigned int dataset_offset;
429
434 DataSetDescriptor(const unsigned int dataset_offset);
435 };
436};
437
441// ------------------- inline and template functions ----------------
442
443
444
445template <int dim>
447 const unsigned int dataset_offset)
448 : dataset_offset(dataset_offset)
449{}
450
451
452template <int dim>
454 : dataset_offset(numbers::invalid_unsigned_int)
455{}
456
457
458
459template <int dim>
465
466
467
468template <int dim>
470{
471 return dataset_offset;
472}
473
474
475
476template <int dim>
478 const ReferenceCell &reference_cell,
479 const Quadrature<dim - 1> &quadrature)
480{
481 return project_to_all_faces(reference_cell,
482 hp::QCollection<dim - 1>(quadrature));
483}
484
485
486/* -------------- declaration of explicit specializations ------------- */
487
488#ifndef DOXYGEN
489
490
491template <>
492void
494 const Quadrature<0> &,
495 const unsigned int,
496 std::vector<Point<1>> &);
497template <>
498void
500 const Quadrature<1> &quadrature,
501 const unsigned int face_no,
502 std::vector<Point<2>> &q_points);
503template <>
504void
506 const Quadrature<2> &quadrature,
507 const unsigned int face_no,
508 std::vector<Point<3>> &q_points);
509
510template <>
513 const hp::QCollection<0> &quadrature);
514
515
516template <>
517void
519 const Quadrature<0> &,
520 const unsigned int,
521 const unsigned int,
522 std::vector<Point<1>> &,
523 const RefinementCase<0> &);
524template <>
525void
527 const Quadrature<1> &quadrature,
528 const unsigned int face_no,
529 const unsigned int subface_no,
530 std::vector<Point<2>> &q_points,
531 const RefinementCase<1> &);
532template <>
533void
535 const Quadrature<2> &quadrature,
536 const unsigned int face_no,
537 const unsigned int subface_no,
538 std::vector<Point<3>> &q_points,
539 const RefinementCase<2> &face_ref_case);
540
541template <>
544 const Quadrature<0> &quadrature);
545
546
547#endif // DOXYGEN
549
550#endif
Definition point.h:111
static DataSetDescriptor subface(const ReferenceCell &reference_cell, const unsigned int face_no, const unsigned int subface_no, const unsigned char combined_orientation, const unsigned int n_quadrature_points, const internal::SubfaceCase< dim > ref_case=internal::SubfaceCase< dim >::case_isotropic)
const unsigned int dataset_offset
Definition qprojector.h:428
static DataSetDescriptor subface(const ReferenceCell &reference_cell, const unsigned int face_no, const unsigned int subface_no, const bool face_orientation, const bool face_flip, const bool face_rotation, const unsigned int n_quadrature_points, const internal::SubfaceCase< dim > ref_case=internal::SubfaceCase< dim >::case_isotropic)
static DataSetDescriptor cell()
Definition qprojector.h:461
static DataSetDescriptor face(const ReferenceCell &reference_cell, const unsigned int face_no, const bool face_orientation, const bool face_flip, const bool face_rotation, const unsigned int n_quadrature_points)
static Quadrature< dim > project_to_all_subfaces(const ReferenceCell &reference_cell, const SubQuadrature &quadrature)
static Quadrature< dim > project_to_child(const ReferenceCell &reference_cell, const Quadrature< dim > &quadrature, const unsigned int child_no)
static Quadrature< dim > project_to_oriented_subface(const ReferenceCell &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, const bool face_orientation, const bool face_flip, const bool face_rotation, const internal::SubfaceCase< dim > ref_case)
static Quadrature< dim > project_to_all_faces(const ReferenceCell &reference_cell, const hp::QCollection< dim - 1 > &quadrature)
static Quadrature< dim > project_to_oriented_face(const ReferenceCell &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, const bool face_orientation, const bool face_flip, const bool face_rotation)
static Quadrature< dim > project_to_line(const ReferenceCell &reference_cell, const Quadrature< 1 > &quadrature, const Point< dim > &p1, const Point< dim > &p2)
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 Quadrature< dim > project_to_all_children(const ReferenceCell &reference_cell, const Quadrature< dim > &quadrature)
static void project_to_face(const ReferenceCell &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, std::vector< Point< dim > > &q_points)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_DEPRECATED_WITH_COMMENT(comment)
Definition config.h:206
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499