Reference documentation for deal.II version Git 3ff8e288d2 2020-02-20 17:30:00 +0100
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
mapping_q_cache.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 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/fe/mapping_q_generic.h>
23 
24 #include <deal.II/grid/tria.h>
25 
26 
27 DEAL_II_NAMESPACE_OPEN
28 
29 
30 
33 
34 
45 template <int dim, int spacedim = dim>
46 class MappingQCache : public MappingQGeneric<dim, spacedim>
47 {
48 public:
54  explicit MappingQCache(const unsigned int polynomial_degree);
55 
59  explicit MappingQCache(const MappingQCache<dim, spacedim> &mapping);
60 
65 
69  virtual std::unique_ptr<Mapping<dim, spacedim>>
70  clone() const override;
71 
76  virtual bool
77  preserves_vertex_locations() const override;
78 
85  void
86  initialize(const Triangulation<dim, spacedim> & triangulation,
87  const MappingQGeneric<dim, spacedim> &mapping);
88 
110  void
111  initialize(const Triangulation<dim, spacedim> &triangulation,
112  const std::function<std::vector<Point<spacedim>>(
114  &compute_points_on_cell);
115 
119  std::size_t
120  memory_consumption() const;
121 
122 protected:
126  virtual std::vector<Point<spacedim>>
128  const typename Triangulation<dim, spacedim>::cell_iterator &cell)
129  const override;
130 
131 private:
137  std::shared_ptr<std::vector<std::vector<std::vector<Point<spacedim>>>>>
139 
144  boost::signals2::connection clear_signal;
145 };
146 
149 DEAL_II_NAMESPACE_CLOSE
150 
151 #endif
virtual bool preserves_vertex_locations() const override
const unsigned int polynomial_degree
std::size_t memory_consumption() const
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
void initialize(const Triangulation< dim, spacedim > &triangulation, const MappingQGeneric< dim, spacedim > &mapping)
boost::signals2::connection clear_signal
MappingQCache(const unsigned int polynomial_degree)
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
std::shared_ptr< std::vector< std::vector< std::vector< Point< spacedim > > > > > support_point_cache