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_collection.cc
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2003 - 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
18
20
22
23
24namespace 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>
78 MappingCollection<dim, spacedim>
80 MappingCollection<dim, spacedim>(get_static_mapping_q1<dim, spacedim>());
81
82} // namespace hp
83
84
86// explicit instantiations
87#include "mapping_collection.inst"
88
89
Abstract base class for mapping classes.
Definition: mapping.h:311
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const =0
unsigned int size() const
Definition: collection.h:264
void push_back(const Mapping< dim, spacedim > &new_mapping)
MappingCollection()=default
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
Definition: hp.h:118