Reference documentation for deal.II version GIT 7deb6c54a6 2023-06-09 18:50:02+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\}}\)
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 
22 #include <deal.II/base/function.h>
24 
25 #include <deal.II/fe/mapping_q.h>
26 
27 #include <deal.II/grid/tria.h>
28 
29 
31 
32 // Forward declarations
33 #ifndef DOXYGEN
34 template <int dim, int spacedim>
35 DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
36 class DoFHandler;
37 #endif
38 
39 
53 template <int dim, int spacedim = dim>
54 class MappingQCache : public MappingQ<dim, spacedim>
55 {
56 public:
62  explicit MappingQCache(const unsigned int polynomial_degree);
63 
67  explicit MappingQCache(const MappingQCache<dim, spacedim> &mapping);
68 
73 
77  virtual std::unique_ptr<Mapping<dim, spacedim>>
78  clone() const override;
79 
84  virtual bool
85  preserves_vertex_locations() const override;
86 
94  void
95  initialize(const Mapping<dim, spacedim> & mapping,
97 
107  DEAL_II_DEPRECATED void
109  const MappingQ<dim, spacedim> & mapping);
110 
132  void
134  const std::function<std::vector<Point<spacedim>>(
136  &compute_points_on_cell);
137 
155  void
156  initialize(const Mapping<dim, spacedim> & mapping,
158  const std::function<Point<spacedim>(
160  const Point<spacedim> &)> & transformation_function,
161  const bool function_describes_relative_displacement);
162 
166  void
167  initialize(const Mapping<dim, spacedim> & mapping,
169  const Function<spacedim> & transformation_function,
170  const bool function_describes_relative_displacement);
171 
183  template <typename VectorType>
184  void
185  initialize(const Mapping<dim, spacedim> & mapping,
186  const DoFHandler<dim, spacedim> &dof_handler,
187  const VectorType & vector,
188  const bool vector_describes_relative_displacement);
189 
201  template <typename VectorType>
202  void
203  initialize(const Mapping<dim, spacedim> & mapping,
204  const DoFHandler<dim, spacedim> &dof_handler,
205  const MGLevelObject<VectorType> &vectors,
206  const bool vector_describes_relative_displacement);
207 
211  virtual boost::container::small_vector<Point<spacedim>,
214  const override;
215 
219  std::size_t
220  memory_consumption() const;
221 
222 protected:
226  virtual std::vector<Point<spacedim>>
228  const typename Triangulation<dim, spacedim>::cell_iterator &cell)
229  const override;
230 
231 private:
237  std::shared_ptr<std::vector<std::vector<std::vector<Point<spacedim>>>>>
239 
244  boost::signals2::connection clear_signal;
245 
251 };
252 
256 
257 #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:691
const unsigned int polynomial_degree
Definition: mapping_q.h:534
#define DEAL_II_DEPRECATED
Definition: config.h:175
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:475
#define DEAL_II_CXX20_REQUIRES(condition)
Definition: config.h:163
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:476
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
const ::Triangulation< dim, spacedim > & tria