Reference documentation for deal.II version Git 5b8b897cb2 2021-04-22 22:24:19 -0400
\(\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_collection.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2003 - 2018 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 
18 
20 
22 
23 
24 namespace hp
25 {
26  template <int dim, int spacedim>
28  const Mapping<dim, spacedim> &mapping)
29  {
30  this->push_back(mapping);
31  }
32 
33 
34 
35  template <int dim, int spacedim>
38  {
39  for (unsigned int i = 0; i < other.size(); ++i)
40  push_back(other[i]);
41  }
42 
43 
44 
45  template <int dim, int spacedim>
46  void
48  const Mapping<dim, spacedim> &new_mapping)
49  {
51  std::shared_ptr<const Mapping<dim, spacedim>>(new_mapping.clone()));
52  }
53 
54  //---------------------------------------------------------------------------
55 
56 
57  namespace
58  {
68  template <int dim, int spacedim>
70  get_static_mapping_q1()
71  {
72  static MappingQ1<dim, spacedim> mapping;
73  return mapping;
74  }
75  } // namespace
76 
77  template <int dim, int spacedim>
80  MappingCollection<dim, spacedim>(get_static_mapping_q1<dim, spacedim>());
81 
82 } // namespace hp
83 
84 
85 
86 // explicit instantiations
87 #include "mapping_collection.inst"
88 
89 
void push_back(const Mapping< dim, spacedim > &new_mapping)
MappingCollection()=default
Abstract base class for mapping classes.
Definition: mapping.h:303
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:396
Definition: hp.h:117
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:395
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const =0