Reference documentation for deal.II version 9.4.1
\(\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// Copyright (C) 2021 - 2021 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_mesh_classifier
17#define dealii_non_matching_mesh_classifier
18
19#include <deal.II/base/config.h>
20
22
23#include <deal.II/grid/tria.h>
25
27
28#include <vector>
29
31namespace NonMatching
32{
33 namespace internal
34 {
35 namespace MeshClassifierImplementation
36 {
37 template <int dim>
39 } // namespace MeshClassifierImplementation
40 } // namespace internal
41
42
56 {
57 inside,
58 outside,
61 };
62
63
108 template <int dim>
110 {
111 public:
117 template <class VectorType>
118 MeshClassifier(const DoFHandler<dim> &level_set_dof_handler,
119 const VectorType & level_set);
120
129 const Function<dim> & level_set,
130 const FiniteElement<dim> &element);
131
136 void
137 reclassify();
138
145 const typename Triangulation<dim>::cell_iterator &cell) const;
146
153 const typename Triangulation<dim>::cell_iterator &cell,
154 const unsigned int face_index) const;
155
156 private:
161 void
162 initialize();
163
170 const typename Triangulation<dim>::active_cell_iterator &cell,
171 const unsigned int face_index);
172
177
184 const std::unique_ptr<
187
192 std::vector<LocationToLevelSet> cell_locations;
193
198 std::vector<LocationToLevelSet> face_locations;
199
207 std::vector<
208 std::array<LAPACKFullMatrix<double>, GeometryInfo<dim>::faces_per_cell>>
210 };
211
212
213 namespace internal
214 {
215 namespace MeshClassifierImplementation
216 {
222 template <int dim>
224 {
225 public:
229 virtual ~LevelSetDescription() = default;
230
235 virtual const hp::FECollection<dim> &
236 get_fe_collection() const = 0;
237
242 virtual unsigned int
244 &cell) const = 0;
245
254 virtual void
256 const typename Triangulation<dim>::active_cell_iterator &cell,
257 const unsigned int face_index,
258 Vector<double> &local_dofs) = 0;
259 };
260
261 } // namespace MeshClassifierImplementation
262 } // namespace internal
263} // namespace NonMatching
265
266#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
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
Definition: vector.h:109
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443