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
mapping_q_cache.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 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_mapping_q_cache_h
16#define dealii_mapping_q_cache_h
17
18
19#include <deal.II/base/config.h>
20
23
25
26#include <deal.II/grid/tria.h>
27
28
30
31// Forward declarations
32#ifndef DOXYGEN
33template <int dim, int spacedim>
35class DoFHandler;
36#endif
37
38
52template <int dim, int spacedim = dim>
53class MappingQCache : public MappingQ<dim, spacedim>
54{
55public:
61 explicit MappingQCache(const unsigned int polynomial_degree);
62
66 explicit MappingQCache(const MappingQCache<dim, spacedim> &mapping);
67
72
76 virtual std::unique_ptr<Mapping<dim, spacedim>>
77 clone() const override;
78
83 virtual bool
84 preserves_vertex_locations() const override;
85
93 void
96
118 void
120 const std::function<std::vector<Point<spacedim>>(
122 &compute_points_on_cell);
123
141 void
142 initialize(const Mapping<dim, spacedim> &mapping,
144 const std::function<Point<spacedim>(
146 const Point<spacedim> &)> &transformation_function,
147 const bool function_describes_relative_displacement);
148
152 void
153 initialize(const Mapping<dim, spacedim> &mapping,
155 const Function<spacedim> &transformation_function,
156 const bool function_describes_relative_displacement);
157
169 template <typename VectorType>
170 void
171 initialize(const Mapping<dim, spacedim> &mapping,
172 const DoFHandler<dim, spacedim> &dof_handler,
173 const VectorType &vector,
174 const bool vector_describes_relative_displacement);
175
187 template <typename VectorType>
188 void
189 initialize(const Mapping<dim, spacedim> &mapping,
190 const DoFHandler<dim, spacedim> &dof_handler,
191 const MGLevelObject<VectorType> &vectors,
192 const bool vector_describes_relative_displacement);
193
197 virtual boost::container::small_vector<Point<spacedim>,
200 const override;
201
205 std::size_t
206 memory_consumption() const;
207
208protected:
212 virtual std::vector<Point<spacedim>>
215 const override;
216
217private:
223 std::shared_ptr<std::vector<std::vector<std::vector<Point<spacedim>>>>>
225
230 boost::signals2::connection clear_signal;
231
237};
238
242
243#endif
std::shared_ptr< std::vector< std::vector< std::vector< Point< spacedim > > > > > support_point_cache
std::size_t memory_consumption() const
virtual boost::container::small_vector< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
virtual bool preserves_vertex_locations() const override
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
void initialize(const Mapping< dim, spacedim > &mapping, const Triangulation< dim, spacedim > &triangulation)
boost::signals2::connection clear_signal
friend class MappingQCache
Definition mapping_q.h:681
const unsigned int polynomial_degree
Definition mapping_q.h:524
Abstract base class for mapping classes.
Definition mapping.h:318
Definition point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation