Reference documentation for deal.II version 9.6.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
mesh_classifier.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2021 - 2023 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_non_matching_mesh_classifier
16#define dealii_non_matching_mesh_classifier
17
18#include <deal.II/base/config.h>
19
21
22#include <deal.II/grid/tria.h>
24
26
27#include <vector>
28
30namespace NonMatching
31{
32 namespace internal
33 {
34 namespace MeshClassifierImplementation
35 {
36 template <int dim>
38 } // namespace MeshClassifierImplementation
39 } // namespace internal
40
41
55 {
56 inside,
57 outside,
60 };
61
62
107 template <int dim>
109 {
110 public:
116 template <typename VectorType>
117 MeshClassifier(const DoFHandler<dim> &level_set_dof_handler,
118 const VectorType &level_set);
119
128 const Function<dim> &level_set,
129 const FiniteElement<dim> &element);
130
135 void
136 reclassify();
137
144 const typename Triangulation<dim>::cell_iterator &cell) const;
145
152 const typename Triangulation<dim>::cell_iterator &cell,
153 const unsigned int face_index) const;
154
155 private:
160 void
161 initialize();
162
169 const typename Triangulation<dim>::active_cell_iterator &cell,
170 const unsigned int face_index);
171
176
183 const std::unique_ptr<
186
191 std::vector<LocationToLevelSet> cell_locations;
192
197 std::vector<LocationToLevelSet> face_locations;
198
206 std::vector<
207 std::array<LAPACKFullMatrix<double>, GeometryInfo<dim>::faces_per_cell>>
209 };
210
211
212 namespace internal
213 {
214 namespace MeshClassifierImplementation
215 {
221 template <int dim>
223 {
224 public:
228 virtual ~LevelSetDescription() = default;
229
234 virtual const hp::FECollection<dim> &
235 get_fe_collection() const = 0;
236
241 virtual unsigned int
243 &cell) const = 0;
244
253 virtual void
255 const typename Triangulation<dim>::active_cell_iterator &cell,
256 const unsigned int face_index,
257 Vector<double> &local_dofs) = 0;
258 };
259
260 } // namespace MeshClassifierImplementation
261 } // namespace internal
262} // namespace NonMatching
264
265#endif
LocationToLevelSet location_to_level_set(const typename Triangulation< dim >::cell_iterator &cell) const
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
const SmartPointer< const Triangulation< dim > > triangulation
std::vector< std::array< LAPACKFullMatrix< double >, GeometryInfo< dim >::faces_per_cell > > lagrange_to_bernstein_face
std::vector< LocationToLevelSet > cell_locations
MeshClassifier(const DoFHandler< dim > &level_set_dof_handler, const VectorType &level_set)
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:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504