Reference documentation for deal.II version 9.5.0
\(\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
fe_values.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2021 - 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
16#ifndef dealii_non_matching_fe_values
17#define dealii_non_matching_fe_values
18
22
24
28
30
34
38
39#include <deque>
40
42
43namespace NonMatching
44{
59 {
64
69
74
79 };
80
81
143 template <int dim>
145 {
146 public:
148
170 template <class VectorType>
172 const Quadrature<1> & quadrature,
175 const DoFHandler<dim> & dof_handler,
176 const VectorType & level_set,
177 const AdditionalData & additional_data = AdditionalData());
178
205 template <class VectorType>
208 const hp::QCollection<dim> & q_collection,
209 const hp::QCollection<1> & q_collection_1d,
212 const DoFHandler<dim> & dof_handler,
213 const VectorType & level_set,
214 const AdditionalData &additional_data = AdditionalData());
215
224 template <bool level_dof_access>
225 void
226 reinit(
228
237 const std_cxx17::optional<::FEValues<dim>> &
238 get_inside_fe_values() const;
239
248 const std_cxx17::optional<::FEValues<dim>> &
249 get_outside_fe_values() const;
250
258 const std_cxx17::optional<FEImmersedSurfaceValues<dim>> &
259 get_surface_fe_values() const;
260
261 private:
267 void
268 initialize(const hp::QCollection<dim> &q_collection);
269
274
279
285
290
294 unsigned int active_fe_index;
295
300
305
319 std::deque<std_cxx17::optional<::FEValues<dim>>>
321
335 std::deque<std_cxx17::optional<::FEValues<dim>>>
337
345 std_cxx17::optional<::FEValues<dim>> fe_values_inside;
346
354 std_cxx17::optional<::FEValues<dim>> fe_values_outside;
355
363 std_cxx17::optional<NonMatching::FEImmersedSurfaceValues<dim>>
365
370 };
371
372
373
436 template <int dim>
438 {
439 public:
442
464 template <class VectorType>
466 const Quadrature<1> & quadrature,
469 const DoFHandler<dim> & dof_handler,
470 const VectorType & level_set,
471 const AdditionalData &additional_data = AdditionalData());
472
499 template <class VectorType>
502 const hp::QCollection<dim - 1> & q_collection,
503 const hp::QCollection<1> & q_collection_1d,
506 const DoFHandler<dim> & dof_handler,
507 const VectorType & level_set,
508 const AdditionalData &additional_data = AdditionalData());
509
523 template <class CellIteratorType, class CellNeighborIteratorType>
524 void
525 reinit(const CellIteratorType & cell,
526 const unsigned int face_no,
527 const unsigned int sub_face_no,
528 const CellNeighborIteratorType &cell_neighbor,
529 const unsigned int face_no_neighbor,
530 const unsigned int sub_face_no_neighbor);
531
532
540 template <class CellIteratorType>
541 void
542 reinit(const CellIteratorType &cell, const unsigned int face_no);
543
553 const std_cxx17::optional<::FEInterfaceValues<dim>> &
554 get_inside_fe_values() const;
555
565 const std_cxx17::optional<::FEInterfaceValues<dim>> &
566 get_outside_fe_values() const;
567
568 private:
574 void
575 initialize(const hp::QCollection<dim - 1> &q_collection);
576
583 template <bool level_dof_access>
584 void
585 do_reinit(
587 const unsigned int face_no,
588 const std::function<void(::FEInterfaceValues<dim> &)> &call_reinit);
589
594
599
605
610
614 unsigned int active_fe_index;
615
620
625
641 std::deque<std_cxx17::optional<::FEInterfaceValues<dim>>>
643
658 std::deque<std_cxx17::optional<::FEInterfaceValues<dim>>>
660
668 std_cxx17::optional<::FEInterfaceValues<dim>> fe_values_inside;
669
677 std_cxx17::optional<::FEInterfaceValues<dim>> fe_values_outside;
678
683 };
684
685
686#ifndef DOXYGEN
687
688 /*---------------------- Inline functions ---------------------*/
689
690 template <int dim>
691 template <class CellIteratorType>
692 inline void
693 FEInterfaceValues<dim>::reinit(const CellIteratorType &cell,
694 const unsigned int face_no)
695 {
696 // Lambda describing how we should call reinit on a single
697 // ::FEInterfaceValues object.
698 const auto reinit_operation =
699 [&cell, face_no](::FEInterfaceValues<dim> &fe_interface_values) {
700 fe_interface_values.reinit(cell, face_no);
701 };
702
703 do_reinit(cell, face_no, reinit_operation);
704 }
705
706
707
708 template <int dim>
709 template <class CellIteratorType, class CellNeighborIteratorType>
710 inline void
711 FEInterfaceValues<dim>::reinit(const CellIteratorType & cell,
712 const unsigned int face_no,
713 const unsigned int sub_face_no,
714 const CellNeighborIteratorType &cell_neighbor,
715 const unsigned int face_no_neighbor,
716 const unsigned int sub_face_no_neighbor)
717 {
719 Assert(sub_face_no_neighbor == numbers::invalid_unsigned_int,
721
722 // Lambda describing how we should call reinit on a single
723 // ::FEInterfaceValues object.
724 const auto reinit_operation =
725 [&cell,
726 face_no,
727 sub_face_no,
728 &cell_neighbor,
729 face_no_neighbor,
730 sub_face_no_neighbor](
731 ::FEInterfaceValues<dim> &fe_interface_values) {
732 fe_interface_values.reinit(cell,
733 face_no,
734 sub_face_no,
735 cell_neighbor,
736 face_no_neighbor,
737 sub_face_no_neighbor);
738 };
739
740 do_reinit(cell, face_no, reinit_operation);
741 }
742
743#endif
744
745} // namespace NonMatching
747
748#endif
const SmartPointer< const hp::FECollection< dim > > fe_collection
Definition fe_values.h:598
void initialize(const hp::QCollection< dim - 1 > &q_collection)
Definition fe_values.cc:332
const SmartPointer< const hp::MappingCollection< dim > > mapping_collection
Definition fe_values.h:593
const hp::QCollection< 1 > q_collection_1D
Definition fe_values.h:604
std::deque< std_cxx17::optional<::FEInterfaceValues< dim > > > fe_values_inside_full_quadrature
Definition fe_values.h:642
typename FaceQuadratureGenerator< dim >::AdditionalData AdditionalData
Definition fe_values.h:441
const std_cxx17::optional<::FEInterfaceValues< dim > > & get_inside_fe_values() const
Definition fe_values.cc:461
const RegionUpdateFlags region_update_flags
Definition fe_values.h:619
LocationToLevelSet current_face_location
Definition fe_values.h:609
std_cxx17::optional<::FEInterfaceValues< dim > > fe_values_inside
Definition fe_values.h:668
std::deque< std_cxx17::optional<::FEInterfaceValues< dim > > > fe_values_outside_full_quadrature
Definition fe_values.h:659
const std_cxx17::optional<::FEInterfaceValues< dim > > & get_outside_fe_values() const
Definition fe_values.cc:473
const SmartPointer< const MeshClassifier< dim > > mesh_classifier
Definition fe_values.h:624
void reinit(const CellIteratorType &cell, const unsigned int face_no, const unsigned int sub_face_no, const CellNeighborIteratorType &cell_neighbor, const unsigned int face_no_neighbor, const unsigned int sub_face_no_neighbor)
std_cxx17::optional<::FEInterfaceValues< dim > > fe_values_outside
Definition fe_values.h:677
void reinit(const CellIteratorType &cell, const unsigned int face_no)
DiscreteFaceQuadratureGenerator< dim > face_quadrature_generator
Definition fe_values.h:682
void do_reinit(const TriaIterator< DoFCellAccessor< dim, dim, level_dof_access > > &cell, const unsigned int face_no, const std::function< void(::FEInterfaceValues< dim > &)> &call_reinit)
Definition fe_values.cc:384
std::deque< std_cxx17::optional<::FEValues< dim > > > fe_values_inside_full_quadrature
Definition fe_values.h:320
LocationToLevelSet current_cell_location
Definition fe_values.h:289
const SmartPointer< const hp::FECollection< dim > > fe_collection
Definition fe_values.h:278
void initialize(const hp::QCollection< dim > &q_collection)
Definition fe_values.cc:105
std::deque< std_cxx17::optional<::FEValues< dim > > > fe_values_outside_full_quadrature
Definition fe_values.h:336
const SmartPointer< const MeshClassifier< dim > > mesh_classifier
Definition fe_values.h:304
const hp::QCollection< 1 > q_collection_1D
Definition fe_values.h:284
const RegionUpdateFlags region_update_flags
Definition fe_values.h:299
void reinit(const TriaIterator< DoFCellAccessor< dim, dim, level_dof_access > > &cell)
Definition fe_values.cc:154
std_cxx17::optional< NonMatching::FEImmersedSurfaceValues< dim > > fe_values_surface
Definition fe_values.h:364
std_cxx17::optional<::FEValues< dim > > fe_values_outside
Definition fe_values.h:354
const std_cxx17::optional<::FEValues< dim > > & get_outside_fe_values() const
Definition fe_values.cc:253
const SmartPointer< const hp::MappingCollection< dim > > mapping_collection
Definition fe_values.h:273
typename QuadratureGenerator< dim >::AdditionalData AdditionalData
Definition fe_values.h:147
DiscreteQuadratureGenerator< dim > quadrature_generator
Definition fe_values.h:369
std_cxx17::optional<::FEValues< dim > > fe_values_inside
Definition fe_values.h:345
unsigned int active_fe_index
Definition fe_values.h:294
const std_cxx17::optional< FEImmersedSurfaceValues< dim > > & get_surface_fe_values() const
Definition fe_values.cc:265
const std_cxx17::optional<::FEValues< dim > > & get_inside_fe_values() const
Definition fe_values.cc:241
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
UpdateFlags
static const unsigned int invalid_unsigned_int
Definition types.h:213