deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+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
mesh_classifier.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) 2021 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_non_matching_mesh_classifier_h
14#define dealii_non_matching_mesh_classifier_h
15
16#include <deal.II/base/config.h>
17
19
20#include <deal.II/grid/tria.h>
22
24
25#include <vector>
26
28namespace NonMatching
29{
30 namespace internal
31 {
32 namespace MeshClassifierImplementation
33 {
34 template <int dim>
36 } // namespace MeshClassifierImplementation
37 } // namespace internal
38
39
64 {
65 inside,
66 outside,
68 aligned,
70 };
71
72
161 template <int dim>
163 {
164 public:
170 template <typename VectorType>
171 MeshClassifier(const DoFHandler<dim> &level_set_dof_handler,
172 const VectorType &level_set);
173
182 const Function<dim> &level_set,
183 const FiniteElement<dim> &element);
184
189 void
190 reclassify();
191
198 const typename Triangulation<dim>::cell_iterator &cell) const;
199
206 const typename Triangulation<dim>::cell_iterator &cell,
207 const unsigned int face_index) const;
208
209 private:
214 void
215 initialize();
216
223 const typename Triangulation<dim>::active_cell_iterator &cell,
224 const unsigned int face_index);
225
230
237 const std::unique_ptr<
240
245 std::vector<LocationToLevelSet> cell_locations;
246
251 std::vector<LocationToLevelSet> face_locations;
252
260 std::vector<
261 std::array<LAPACKFullMatrix<double>, GeometryInfo<dim>::faces_per_cell>>
263 };
264
265
266 namespace internal
267 {
268 namespace MeshClassifierImplementation
269 {
275 template <int dim>
277 {
278 public:
282 virtual ~LevelSetDescription() = default;
283
288 virtual const hp::FECollection<dim> &
289 get_fe_collection() const = 0;
290
295 virtual unsigned int
297 &cell) const = 0;
298
307 virtual void
309 const typename Triangulation<dim>::active_cell_iterator &cell,
310 const unsigned int face_index,
311 Vector<double> &local_dofs) = 0;
312 };
313
314 } // namespace MeshClassifierImplementation
315 } // namespace internal
316} // namespace NonMatching
318
319#endif
LocationToLevelSet location_to_level_set(const typename Triangulation< dim >::cell_iterator &cell) const
const ObserverPointer< const Triangulation< dim > > triangulation
std::vector< LocationToLevelSet > face_locations
LocationToLevelSet determine_face_location_to_levelset(const typename Triangulation< dim >::active_cell_iterator &cell, const unsigned int face_index)
const std::unique_ptr< internal::MeshClassifierImplementation::LevelSetDescription< dim > > level_set_description
std::vector< std::array< LAPACKFullMatrix< double >, GeometryInfo< dim >::faces_per_cell > > lagrange_to_bernstein_face
std::vector< LocationToLevelSet > cell_locations
virtual const hp::FECollection< dim > & get_fe_collection() const =0
virtual void get_local_level_set_values(const typename Triangulation< dim >::active_cell_iterator &cell, const unsigned int face_index, Vector< double > &local_dofs)=0
virtual unsigned int active_fe_index(const typename Triangulation< dim >::active_cell_iterator &cell) const =0
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39