PolyDEAL
 
Loading...
Searching...
No Matches
agglomeration_handler.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) XXXX - YYYY by the polyDEAL authors
5//
6// This file is part of the polyDEAL library.
7//
8// Detailed license information governing the source code
9// can be found in LICENSE.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12#ifndef agglomeration_handler_h
13#define agglomeration_handler_h
14
15#include <deal.II/base/mpi.h>
19
22
25
26#include <deal.II/fe/fe_dgp.h>
27#include <deal.II/fe/fe_dgq.h>
34
36#include <deal.II/grid/tria.h>
37
39
45#include <deal.II/lac/vector.h>
46
48
51
53#include <agglomerator.h>
54#include <mapping_box.h>
55#include <utils.h>
56
57#include <fstream>
58
59using namespace dealii;
60
61// Forward declarations
62template <int dim, int spacedim>
64
65namespace dealii
66{
67 namespace internal
68 {
72 template <int, int>
74 } // namespace internal
75} // namespace dealii
76
77
78
83namespace dealii
84{
85 namespace internal
86 {
87 template <int dim, int spacedim>
89 {
90 public:
94 PolytopeCache() = default;
95
99 ~PolytopeCache() = default;
100
101 void
103 {
104 // clear all the members
105 cell_face_at_boundary.clear();
106 interface.clear();
108 }
109
117 mutable std::set<std::pair<types::global_cell_index, unsigned int>>
119
120
121 mutable std::set<std::pair<CellId, unsigned int>>
123
124
125
134 mutable std::map<
135 std::pair<types::global_cell_index, unsigned int>,
136 std::pair<bool,
139
144 mutable std::map<std::pair<CellId, unsigned int>, CellId>
146
157 mutable std::map<
158 std::pair<CellId, CellId>,
159 std::vector<
160 std::pair<typename Triangulation<dim, spacedim>::active_cell_iterator,
161 unsigned int>>>
163 };
164 } // namespace internal
165} // namespace dealii
166
167
171template <int dim, int spacedim = dim>
173{
174public:
176
179
180
182 {
185 };
186
187
188
189 explicit AgglomerationHandler(
191
193
195 {
196 // disconnect the signal
197 tria_listener.disconnect();
198 }
199
204 begin() const;
205
211
216 end() const;
217
223
229
236
237 template <int, int>
239
240 template <int, int>
242
247 void
249
253 void
255 const hp::FECollection<dim, spacedim> &fe_collection_in);
256
262 void
264 const Quadrature<dim> &cell_quadrature = QGauss<dim>(1),
265 const UpdateFlags &flags = UpdateFlags::update_default,
266 const Quadrature<dim - 1> &face_quadrature = QGauss<dim - 1>(1),
267 const UpdateFlags &face_flags = UpdateFlags::update_default);
268
272 void
274 const hp::QCollection<dim> &cell_qcollection =
276 const UpdateFlags &flags = UpdateFlags::update_default,
277 const hp::QCollection<dim - 1> &face_qcollection =
279 const UpdateFlags &face_flags = UpdateFlags::update_default);
280
287 template <typename SparsityPatternType, typename Number = double>
288 void
290 SparsityPatternType &sparsity_pattern,
292 const bool keep_constrained_dofs = true,
294
305
318 const unsigned int fecollection_size);
319
325 void
327
328 inline const Triangulation<dim, spacedim> &
330
331 inline const FiniteElement<dim, spacedim> &
332 get_fe() const;
333
334 inline const Mapping<dim> &
335 get_mapping() const;
336
337 inline const MappingBox<dim> &
339
340 inline const std::vector<BoundingBox<dim>> &
342
347 double
349
353 const;
354
355 inline decltype(auto)
357
361 template <typename CellIterator>
362 inline bool
363 is_master_cell(const CellIterator &cell) const;
364
369 inline const std::vector<
372
373
376
384 inline std::vector<
388 &master_cell) const;
389
394 template <class StreamType>
395 void
396 print_agglomeration(StreamType &out)
397 {
398 for (const auto &cell : tria->active_cell_iterators())
399 out << "Cell with index: " << cell->active_cell_index()
400 << " has associated value: "
401 << master_slave_relationships[cell->global_active_cell_index()]
402 << std::endl;
403 }
404
411 inline const DoFHandler<dim, spacedim> &
413
417 unsigned int
419
423 unsigned int
426 const;
427
432 reinit(const AgglomerationIterator<dim, spacedim> &polytope) const;
433
440 const unsigned int face_index) const;
441
447 std::pair<const FEValuesBase<dim, spacedim> &,
450 const AgglomerationIterator<dim, spacedim> &neigh_polytope,
451 const unsigned int local_in,
452 const unsigned int local_outside) const;
453
461 const AgglomerationContainer &cells,
463 &master_cell) const;
464
465
475 inline bool
478 const unsigned int f) const;
479
480 inline unsigned int
481 n_dofs_per_cell() const noexcept;
482
483 inline types::global_dof_index
484 n_dofs() const noexcept;
485
486
487
493 inline const std::vector<typename Triangulation<dim>::active_face_iterator> &
495 const typename Triangulation<dim>::active_cell_iterator &cell);
496
497
501 DoFHandler<dim, spacedim> agglo_dh;
502
506 DoFHandler<dim, spacedim> output_dh;
507
508 std::unique_ptr<MappingBox<dim>> box_mapping;
509
518 void
520
521 void
523
524 // TODO: move it to private interface
525 mutable std::map<
526 types::subdomain_id,
527 std::map<std::pair<CellId, unsigned int>, std::vector<Point<spacedim>>>>
529
530 mutable std::map<
531 types::subdomain_id,
532 std::map<std::pair<CellId, unsigned int>, std::vector<double>>>
534
535 mutable std::map<
536 types::subdomain_id,
537 std::map<std::pair<CellId, unsigned int>, std::vector<Tensor<1, spacedim>>>>
539
540 mutable std::map<
541 types::subdomain_id,
542 std::map<std::pair<CellId, unsigned int>, std::vector<std::vector<double>>>>
544
545 mutable std::map<types::subdomain_id,
546 std::map<std::pair<CellId, unsigned int>,
547 std::vector<std::vector<Tensor<1, spacedim>>>>>
549
554 inline const typename DoFHandler<dim, spacedim>::active_cell_iterator
555 polytope_to_dh_iterator(const types::global_cell_index polytope_index) const;
556
560 template <typename RtreeType>
561 void
562 connect_hierarchy(const CellsAgglomerator<dim, RtreeType> &agglomerator);
563
568 inline const hp::FECollection<dim, spacedim> &
570
574 inline bool
576
577private:
581 void
583 const std::unique_ptr<GridTools::Cache<dim, spacedim>> &cache_tria);
584
585 void
587 AgglomerationContainer &polytope,
588 const typename Triangulation<dim, spacedim>::active_cell_iterator
589 &master_cell);
590
594 void
596 {
597 // First disconnect existing connections
598 tria_listener.disconnect();
599 tria_listener = tria->signals.any_change.connect(
600 [&]() { this->initialize_agglomeration_data(this->cached_tria); });
601 }
602
608
612
617 void
619
620
624 const;
625
629 inline bool
633 &other_cell) const;
634
643 void
645
646
653 const unsigned int face_number,
655 &agglo_isv_ptr) const;
656
657
662 template <typename CellIterator>
663 inline bool
664 is_slave_cell(const CellIterator &cell) const;
665
666
672 void
674
675
679 unsigned int n_agglomerations;
680
681
689
697
699
700 mutable std::vector<types::global_cell_index> number_of_agglomerated_faces;
701
707 mutable std::map<
709 std::vector<typename Triangulation<dim>::active_face_iterator>>
711
712
719 std::vector<BoundingBox<spacedim>> bboxes;
720
722
723
724 // n_faces
725 mutable std::map<types::subdomain_id, std::map<CellId, unsigned int>>
727
728 mutable std::map<types::subdomain_id, std::map<CellId, unsigned int>>
730
731
732 // CellId (including slaves)
733 mutable std::map<types::subdomain_id, std::map<CellId, CellId>>
735
736 mutable std::map<types::subdomain_id, std::map<CellId, CellId>>
738
739
740 // send to neighborign rank the information that
741 // - current polytope id
742 // - face f
743 // has the following neighboring id.
744 mutable std::map<types::subdomain_id,
745 std::map<CellId, std::map<unsigned int, CellId>>>
747
748 mutable std::map<types::subdomain_id,
749 std::map<CellId, std::map<unsigned int, CellId>>>
751
752 // CellIds from neighboring rank
753 mutable std::map<types::subdomain_id,
754 std::map<CellId, std::map<unsigned int, bool>>>
756
757 mutable std::map<types::subdomain_id,
758 std::map<CellId, std::map<unsigned int, bool>>>
760
761 // Exchange neighboring bounding boxes
762 mutable std::map<types::subdomain_id, std::map<CellId, BoundingBox<dim>>>
764
765 mutable std::map<types::subdomain_id, std::map<CellId, BoundingBox<dim>>>
767
768 // Exchange DoF indices with ghosted polytopes
769 mutable std::map<types::subdomain_id,
770 std::map<CellId, std::vector<types::global_dof_index>>>
772
773 mutable std::map<types::subdomain_id,
774 std::map<CellId, std::vector<types::global_dof_index>>>
776
777 // Exchange qpoints
778 mutable std::map<
780 std::map<std::pair<CellId, unsigned int>, std::vector<Point<spacedim>>>>
782
783 // Exchange jxws
784 mutable std::map<
786 std::map<std::pair<CellId, unsigned int>, std::vector<double>>>
788
789 // Exchange normals
790 mutable std::map<
792 std::map<std::pair<CellId, unsigned int>, std::vector<Tensor<1, spacedim>>>>
794
795 // Exchange values
796 mutable std::map<
798 std::map<std::pair<CellId, unsigned int>, std::vector<std::vector<double>>>>
800
801 mutable std::map<types::subdomain_id,
802 std::map<std::pair<CellId, unsigned int>,
803 std::vector<std::vector<Tensor<1, spacedim>>>>>
805
806
807
809
811
813
814 std::unique_ptr<GridTools::Cache<dim, spacedim>> cached_tria;
815
816 const MPI_Comm communicator;
817
818 // The FiniteElement space we have on each cell. Currently supported types are
819 // FE_DGQ and FE_DGP elements.
820 std::unique_ptr<FiniteElement<dim>> fe;
821
823
828
829
834 mutable std::unique_ptr<ScratchData> standard_scratch;
835
841 mutable std::unique_ptr<ScratchData> agglomerated_scratch;
842
843
844 mutable std::unique_ptr<NonMatching::FEImmersedSurfaceValues<spacedim>>
846
847 mutable std::unique_ptr<NonMatching::FEImmersedSurfaceValues<spacedim>>
849
850 mutable std::unique_ptr<NonMatching::FEImmersedSurfaceValues<spacedim>>
852
853 boost::signals2::connection tria_listener;
854
856
860
862
866
868
870
871 // Associate the master cell to the slaves.
872 std::unordered_map<
874 std::vector<typename Triangulation<dim, spacedim>::active_cell_iterator>>
876
877 // Map the master cell index with the polytope index
878 std::map<types::global_cell_index, types::global_cell_index> master2polygon;
879
880
881 std::vector<typename Triangulation<dim>::active_cell_iterator>
883
884 // Dummy FiniteElement objects needed only to generate quadratures
885
890
894 std::unique_ptr<FEValues<dim, spacedim>> no_values;
895
899 std::unique_ptr<FEFaceValues<dim, spacedim>> no_face_values;
900
904 std::vector<typename Triangulation<dim, spacedim>::active_cell_iterator>
906
907 friend class internal::AgglomerationHandlerImplementation<dim, spacedim>;
908
910
916
917 std::map<std::pair<types::global_cell_index, types::global_cell_index>,
918 std::vector<types::global_cell_index>>
920
922
923 // Support for hp::FECollection
924 bool is_hp_collection = false; // Indicates whether hp::FECollection is used
925 std::unique_ptr<hp::FECollection<dim, spacedim>>
926 hp_fe_collection; // External input FECollection
927
928 // Stores quadrature rules; these QCollections should have the same size as
929 // hp_fe_collection
932
934 mapping_collection; // Contains only one mapping object
936 dummy_fe_collection; // Similar to dummy_fe, but as an FECollection
937 // containing only dummy_fe
938 // Note: The above two variables provide an hp::FECollection interface but
939 // actually contain only one element each.
940
941 // Analogous to no_values and no_face_values, but used when different cells
942 // employ different FEs or quadratures
943 std::unique_ptr<hp::FEValues<dim, spacedim>> hp_no_values;
944 std::unique_ptr<hp::FEFaceValues<dim, spacedim>> hp_no_face_values;
945};
946
947
948
949// ------------------------------ inline functions -------------------------
950template <int dim, int spacedim>
951inline const FiniteElement<dim, spacedim> &
953{
954 return *fe;
955}
956
957
958
959template <int dim, int spacedim>
960inline const Mapping<dim> &
965
966
967
968template <int dim, int spacedim>
969inline const MappingBox<dim> &
974
975
976
977template <int dim, int spacedim>
978inline const Triangulation<dim, spacedim> &
983
984
985template <int dim, int spacedim>
986inline const std::vector<BoundingBox<dim>> &
991
992
993
994template <int dim, int spacedim>
998{
999 return master2polygon.at(cell->active_cell_index());
1000}
1001
1002
1003
1004template <int dim, int spacedim>
1005inline decltype(auto)
1010
1011
1012
1013template <int dim, int spacedim>
1019
1020
1021
1022template <int dim, int spacedim>
1023inline std::vector<typename Triangulation<dim, spacedim>::active_cell_iterator>
1026 &master_cell) const
1027{
1028 Assert(is_master_cell(master_cell), ExcInternalError());
1029 auto agglomeration = get_slaves_of_idx(master_cell->active_cell_index());
1030 agglomeration.push_back(master_cell);
1031 return agglomeration;
1032}
1033
1034
1035
1036template <int dim, int spacedim>
1037inline const DoFHandler<dim, spacedim> &
1042
1043
1044
1045template <int dim, int spacedim>
1046inline const std::vector<
1053
1054
1055
1056template <int dim, int spacedim>
1057template <typename CellIterator>
1058inline bool
1060 const CellIterator &cell) const
1061{
1062 return master_slave_relationships[cell->global_active_cell_index()] == -1;
1063}
1064
1065
1066
1071template <int dim, int spacedim>
1072template <typename CellIterator>
1073inline bool
1075 const CellIterator &cell) const
1076{
1077 return master_slave_relationships[cell->global_active_cell_index()] >= 0;
1078}
1079
1080
1081
1082template <int dim, int spacedim>
1083inline bool
1086 const unsigned int face_index) const
1087{
1088 Assert(!is_slave_cell(cell),
1089 ExcMessage("This function should not be called for a slave cell."));
1090
1091 return polytope_cache.cell_face_at_boundary
1092 .at({master2polygon.at(cell->active_cell_index()), face_index})
1093 .first;
1094}
1095
1096
1097template <int dim, int spacedim>
1098inline unsigned int
1100{
1101 return fe->n_dofs_per_cell();
1102}
1103
1104
1105
1106template <int dim, int spacedim>
1109{
1110 return agglo_dh.n_dofs();
1111}
1112
1113
1114
1115template <int dim, int spacedim>
1116inline const std::vector<typename Triangulation<dim>::active_face_iterator> &
1122
1123
1124
1125template <int dim, int spacedim>
1132
1133
1134
1135template <int dim, int spacedim>
1138 const typename Triangulation<dim, spacedim>::active_cell_iterator &cell) const
1139{
1140 auto idx = master_slave_relationships[cell->global_active_cell_index()];
1141 if (idx == -1)
1142 return cell->global_active_cell_index();
1143 else
1144 return static_cast<types::global_cell_index>(idx);
1145}
1146
1147
1148
1149template <int dim, int spacedim>
1150inline bool
1153 const typename Triangulation<dim, spacedim>::active_cell_iterator &other_cell)
1154 const
1155{
1156 // if different subdomain, then **by construction** they will not be together
1157 // if (cell->subdomain_id() != other_cell->subdomain_id())
1158 // return false;
1159 // else
1160 return (get_master_idx_of_cell(cell) == get_master_idx_of_cell(other_cell));
1161}
1162
1163
1164
1165template <int dim, int spacedim>
1166inline unsigned int
1171
1172
1173
1174template <int dim, int spacedim>
1177 const types::global_cell_index polytope_index) const
1178{
1179 return master_cells_container[polytope_index]->as_dof_handler_iterator(
1180 agglo_dh);
1181}
1182
1183
1184
1185template <int dim, int spacedim>
1188{
1190 ExcMessage("No agglomeration has been performed."));
1191 return {*master_cells_container.begin(), this};
1192}
1193
1194
1195
1196template <int dim, int spacedim>
1199{
1201 ExcMessage("No agglomeration has been performed."));
1202 return {*master_cells_container.begin(), this};
1203}
1204
1205
1206
1207template <int dim, int spacedim>
1210{
1212 ExcMessage("No agglomeration has been performed."));
1213 return {*master_cells_container.end(), this};
1214}
1215
1216
1217
1218template <int dim, int spacedim>
1221{
1223 ExcMessage("No agglomeration has been performed."));
1224 return {*master_cells_container.end(), this};
1225}
1226
1227
1228
1229template <int dim, int spacedim>
1232{
1234 ExcMessage("No agglomeration has been performed."));
1235 return {master_cells_container.back(), this};
1236}
1237
1238
1239
1240template <int dim, int spacedim>
1249
1250template <int dim, int spacedim>
1251template <typename RtreeType>
1252void
1259
1260template <int dim, int spacedim>
1266
1267template <int dim, int spacedim>
1268inline bool
1273
1274
1275#endif
friend friend class ObserverPointer
unsigned int n_dofs_per_cell() const noexcept
AgglomerationHandler()=default
types::global_cell_index cell_to_polytope_index(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell) const
std::map< types::subdomain_id, std::map< CellId, unsigned int > > local_n_faces
agglomeration_iterator end() const
const DoFHandler< dim, spacedim > & get_dof_handler() const
std::unique_ptr< GridTools::Cache< dim, spacedim > > cached_tria
boost::signals2::connection tria_listener
const std::vector< typename Triangulation< dim, spacedim >::active_cell_iterator > & get_slaves_of_idx(types::global_cell_index idx) const
agglomeration_iterator last()
LinearAlgebra::distributed::Vector< float > master_slave_relationships
types::global_cell_index get_master_idx_of_cell(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell) const
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< Tensor< 1, spacedim > > > > local_normals
const FEValues< dim, spacedim > & reinit(const AgglomerationIterator< dim, spacedim > &polytope) const
std::map< types::subdomain_id, std::map< CellId, CellId > > recv_cell_ids_neigh_cell
FE_Nothing< dim, spacedim > dummy_fe
MeshWorker::ScratchData< dim, spacedim > ScratchData
std::unique_ptr< NonMatching::FEImmersedSurfaceValues< spacedim > > agglomerated_isv_bdary
std::unique_ptr< hp::FEValues< dim, spacedim > > hp_no_values
bool is_slave_cell(const CellIterator &cell) const
LinearAlgebra::distributed::Vector< double > euler_vector
std::map< types::subdomain_id, std::map< CellId, std::map< unsigned int, bool > > > local_bdary_info
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< std::vector< double > > > > local_values
std::unique_ptr< NonMatching::FEImmersedSurfaceValues< spacedim > > agglomerated_isv
std::unique_ptr< ScratchData > standard_scratch
Quadrature< dim > agglomeration_quad
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< double > > > recv_jxws
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< Tensor< 1, spacedim > > > > recv_normals
Quadrature< dim - 1 > agglomeration_face_quad
std::unique_ptr< FEValues< dim, spacedim > > no_values
const DoFHandler< dim, spacedim >::active_cell_iterator polytope_to_dh_iterator(const types::global_cell_index polytope_index) const
std::map< types::subdomain_id, std::map< CellId, unsigned int > > recv_n_faces
std::vector< BoundingBox< spacedim > > bboxes
types::global_dof_index n_dofs() const noexcept
std::unique_ptr< hp::FEFaceValues< dim, spacedim > > hp_no_face_values
std::map< types::subdomain_id, std::map< CellId, BoundingBox< dim > > > recv_ghosted_bbox
bool are_cells_agglomerated(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell, const typename Triangulation< dim, spacedim >::active_cell_iterator &other_cell) const
Quadrature< dim > agglomerated_quadrature(const AgglomerationContainer &cells, const typename Triangulation< dim, spacedim >::active_cell_iterator &master_cell) const
AgglomerationIterator< dim, spacedim > agglomeration_iterator
hp::QCollection< dim - 1 > agglomeration_face_quad_collection
std::map< const typename Triangulation< dim, spacedim >::active_cell_iterator, std::vector< typename Triangulation< dim >::active_face_iterator > > polygon_boundary
ObserverPointer< const Triangulation< dim, spacedim > > tria
agglomeration_iterator begin() const
std::unordered_map< types::global_cell_index, std::vector< typename Triangulation< dim, spacedim >::active_cell_iterator > > master2slaves
std::vector< typename Triangulation< dim >::active_cell_iterator > master_disconnected
void create_bounding_box(const AgglomerationContainer &polytope)
std::map< types::global_cell_index, types::global_cell_index > master2polygon
DoFHandler< dim, spacedim > output_dh
typename AgglomerationIterator< dim, spacedim >::AgglomerationContainer AgglomerationContainer
std::map< std::pair< types::global_cell_index, types::global_cell_index >, std::vector< types::global_cell_index > > parent_child_info
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< Point< spacedim > > > > recv_qpoints
std::pair< const FEValuesBase< dim, spacedim > &, const FEValuesBase< dim, spacedim > & > reinit_interface(const AgglomerationIterator< dim, spacedim > &polytope_in, const AgglomerationIterator< dim, spacedim > &neigh_polytope, const unsigned int local_in, const unsigned int local_outside) const
AgglomerationHandler(const GridTools::Cache< dim, spacedim > &cached_tria)
std::map< types::subdomain_id, std::map< CellId, std::vector< types::global_dof_index > > > recv_ghost_dofs
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< std::vector< Tensor< 1, spacedim > > > > > recv_gradients
const Triangulation< dim, spacedim > & get_triangulation() const
void create_agglomeration_sparsity_pattern(SparsityPatternType &sparsity_pattern, const AffineConstraints< Number > &constraints=AffineConstraints< Number >(), const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
const Mapping< dim > & get_mapping() const
unsigned int n_agglomerates() const
const std::vector< typename Triangulation< dim >::active_face_iterator > & polytope_boundary(const typename Triangulation< dim >::active_cell_iterator &cell)
std::map< types::global_cell_index, typename Triangulation< dim, spacedim >::active_cell_iterator > master_slave_relationships_iterators
const std::vector< BoundingBox< dim > > & get_local_bboxes() const
const LinearAlgebra::distributed::Vector< float > & get_relationships() const
std::vector< typename Triangulation< dim, spacedim >::active_cell_iterator > get_agglomerate(const typename Triangulation< dim, spacedim >::active_cell_iterator &master_cell) const
unsigned int n_agglomerated_faces_per_cell(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell) const
const UpdateFlags internal_agglomeration_face_flags
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< std::vector< Tensor< 1, spacedim > > > > > local_gradients
void distribute_agglomerated_dofs(const FiniteElement< dim > &fe_space)
hp::FECollection< dim, spacedim > dummy_fe_collection
std::vector< types::global_cell_index > number_of_agglomerated_faces
const UpdateFlags internal_agglomeration_flags
std::map< types::subdomain_id, std::map< CellId, std::map< unsigned int, bool > > > recv_bdary_info
const FiniteElement< dim, spacedim > & get_fe() const
std::unique_ptr< FEFaceValues< dim, spacedim > > no_face_values
const FEValuesBase< dim, spacedim > & reinit_master(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int face_number, std::unique_ptr< NonMatching::FEImmersedSurfaceValues< spacedim > > &agglo_isv_ptr) const
std::map< types::subdomain_id, std::map< CellId, std::vector< types::global_dof_index > > > local_ghost_dofs
std::vector< typename Triangulation< dim, spacedim >::active_cell_iterator > master_cells_container
std::unique_ptr< hp::FECollection< dim, spacedim > > hp_fe_collection
hp::QCollection< dim > agglomeration_quad_collection
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< std::vector< double > > > > recv_values
void connect_hierarchy(const CellsAgglomerator< dim, RtreeType > &agglomerator)
bool at_boundary(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int f) const
bool is_master_cell(const CellIterator &cell) const
IteratorRange< agglomeration_iterator > polytope_iterators() const
decltype(auto) get_interface() const
void initialize_agglomeration_data(const std::unique_ptr< GridTools::Cache< dim, spacedim > > &cache_tria)
void print_agglomeration(StreamType &out)
agglomeration_iterator define_agglomerate(const AgglomerationContainer &cells)
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< double > > > local_jxws
void initialize_fe_values(const Quadrature< dim > &cell_quadrature=QGauss< dim >(1), const UpdateFlags &flags=UpdateFlags::update_default, const Quadrature< dim - 1 > &face_quadrature=QGauss< dim - 1 >(1), const UpdateFlags &face_flags=UpdateFlags::update_default)
agglomeration_iterator end()
std::map< types::subdomain_id, std::map< std::pair< CellId, unsigned int >, std::vector< Point< spacedim > > > > local_qpoints
std::unique_ptr< NonMatching::FEImmersedSurfaceValues< spacedim > > agglomerated_isv_neigh
void define_agglomerate_with_check(const AgglomerationContainer &cells)
const MappingBox< dim > & get_agglomeration_mapping() const
std::unique_ptr< ScratchData > agglomerated_scratch
hp::FECollection< dim, spacedim > fe_collection
std::map< types::subdomain_id, std::map< CellId, BoundingBox< dim > > > local_ghosted_bbox
DoFHandler< dim, spacedim > agglo_dh
Triangulation< dim, spacedim >::active_cell_iterator & is_slave_cell_of(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell)
std::unique_ptr< MappingBox< dim > > box_mapping
agglomeration_iterator begin()
const hp::FECollection< dim, spacedim > & get_fe_collection() const
std::unique_ptr< FiniteElement< dim > > fe
ObserverPointer< const Mapping< dim, spacedim > > mapping
void update_agglomerate(AgglomerationContainer &polytope, const typename Triangulation< dim, spacedim >::active_cell_iterator &master_cell)
double get_mesh_size() const
std::map< types::subdomain_id, std::map< CellId, std::map< unsigned int, CellId > > > recv_ghosted_master_id
std::map< types::subdomain_id, std::map< CellId, CellId > > local_cell_ids_neigh_cell
internal::PolytopeCache< dim, spacedim > polytope_cache
std::map< types::subdomain_id, std::map< CellId, std::map< unsigned int, CellId > > > local_ghosted_master_id
hp::MappingCollection< dim > mapping_collection
typename AgglomerationAccessor< dim, spacedim >::AgglomerationContainer AgglomerationContainer
const unsigned int extraction_level
std::map< std::pair< types::global_cell_index, types::global_cell_index >, std::vector< types::global_cell_index > > parent_node_to_children_nodes
std::map< std::pair< types::global_cell_index, unsigned int >, std::pair< bool, typename Triangulation< dim, spacedim >::active_cell_iterator > > cell_face_at_boundary
std::map< std::pair< CellId, unsigned int >, CellId > ghosted_master_id
std::set< std::pair< types::global_cell_index, unsigned int > > visited_cell_and_faces
std::set< std::pair< CellId, unsigned int > > visited_cell_and_faces_id
std::map< std::pair< CellId, CellId >, std::vector< std::pair< typename Triangulation< dim, spacedim >::active_cell_iterator, unsigned int > > > interface
EnableObserverPointer Subscriptor
Point< 2 > first
#define Assert(cond, exc)
UpdateFlags
update_values
update_normal_vectors
update_JxW_values
update_inverse_jacobians
update_gradients
update_quadrature_points
constexpr types::subdomain_id invalid_subdomain_id
unsigned int global_dof_index
unsigned int subdomain_id
unsigned int global_cell_index