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
mapping_q_cache.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2019 - 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_mapping_q_cache_h
17#define dealii_mapping_q_cache_h
18
19
20#include <deal.II/base/config.h>
21
24
26
27#include <deal.II/grid/tria.h>
28
29
31
32// Forward declarations
33#ifndef DOXYGEN
34template <int, int>
35class DoFHandler;
36#endif
37
38
41
42
51template <int dim, int spacedim = dim>
52class MappingQCache : public MappingQ<dim, spacedim>
53{
54public:
60 explicit MappingQCache(const unsigned int polynomial_degree);
61
65 explicit MappingQCache(const MappingQCache<dim, spacedim> &mapping);
66
71
75 virtual std::unique_ptr<Mapping<dim, spacedim>>
76 clone() const override;
77
82 virtual bool
83 preserves_vertex_locations() const override;
84
92 void
93 initialize(const Mapping<dim, spacedim> & mapping,
95
107 const MappingQ<dim, spacedim> & mapping);
108
130 void
132 const std::function<std::vector<Point<spacedim>>(
134 &compute_points_on_cell);
135
153 void
154 initialize(const Mapping<dim, spacedim> & mapping,
156 const std::function<Point<spacedim>(
158 const Point<spacedim> &)> & transformation_function,
159 const bool function_describes_relative_displacement);
160
164 void
165 initialize(const Mapping<dim, spacedim> & mapping,
167 const Function<spacedim> & transformation_function,
168 const bool function_describes_relative_displacement);
169
181 template <typename VectorType>
182 void
183 initialize(const Mapping<dim, spacedim> & mapping,
184 const DoFHandler<dim, spacedim> &dof_handler,
185 const VectorType & vector,
186 const bool vector_describes_relative_displacement);
187
199 template <typename VectorType>
200 void
201 initialize(const Mapping<dim, spacedim> & mapping,
202 const DoFHandler<dim, spacedim> &dof_handler,
203 const MGLevelObject<VectorType> &vectors,
204 const bool vector_describes_relative_displacement);
205
209 virtual boost::container::small_vector<Point<spacedim>,
212 const override;
213
217 std::size_t
218 memory_consumption() const;
219
220protected:
224 virtual std::vector<Point<spacedim>>
227 const override;
228
229private:
235 std::shared_ptr<std::vector<std::vector<std::vector<Point<spacedim>>>>>
237
242 boost::signals2::connection clear_signal;
243
249};
250
254
255#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:784
const unsigned int polynomial_degree
Definition: mapping_q.h:627
Abstract base class for mapping classes.
Definition: mapping.h:311
Definition: point.h:111
#define DEAL_II_DEPRECATED
Definition: config.h:164
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
const ::Triangulation< dim, spacedim > & tria