Reference documentation for deal.II version GIT d8dacc551e 2022-08-19 06:50:03+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, int>
35 class DoFHandler;
36 #endif
37 
38 
52 template <int dim, int spacedim = dim>
53 class MappingQCache : public MappingQ<dim, spacedim>
54 {
55 public:
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
94  initialize(const Mapping<dim, spacedim> & mapping,
96 
106  DEAL_II_DEPRECATED void
108  const MappingQ<dim, spacedim> & mapping);
109 
131  void
133  const std::function<std::vector<Point<spacedim>>(
135  &compute_points_on_cell);
136 
154  void
155  initialize(const Mapping<dim, spacedim> & mapping,
157  const std::function<Point<spacedim>(
159  const Point<spacedim> &)> & transformation_function,
160  const bool function_describes_relative_displacement);
161 
165  void
166  initialize(const Mapping<dim, spacedim> & mapping,
168  const Function<spacedim> & transformation_function,
169  const bool function_describes_relative_displacement);
170 
182  template <typename VectorType>
183  void
184  initialize(const Mapping<dim, spacedim> & mapping,
185  const DoFHandler<dim, spacedim> &dof_handler,
186  const VectorType & vector,
187  const bool vector_describes_relative_displacement);
188 
200  template <typename VectorType>
201  void
202  initialize(const Mapping<dim, spacedim> & mapping,
203  const DoFHandler<dim, spacedim> &dof_handler,
204  const MGLevelObject<VectorType> &vectors,
205  const bool vector_describes_relative_displacement);
206 
210  virtual boost::container::small_vector<Point<spacedim>,
213  const override;
214 
218  std::size_t
219  memory_consumption() const;
220 
221 protected:
225  virtual std::vector<Point<spacedim>>
227  const typename Triangulation<dim, spacedim>::cell_iterator &cell)
228  const override;
229 
230 private:
236  std::shared_ptr<std::vector<std::vector<std::vector<Point<spacedim>>>>>
238 
243  boost::signals2::connection clear_signal;
244 
250 };
251 
255 
256 #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:785
const unsigned int polynomial_degree
Definition: mapping_q.h:628
#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