Reference documentation for deal.II version 9.4.0
\(\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\}}\)
source
hp
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
17
#include <
deal.II/base/memory_consumption.h
>
18
19
#include <
deal.II/hp/mapping_collection.h
>
20
21
DEAL_II_NAMESPACE_OPEN
22
23
24
namespace
hp
25
{
26
template
<
int
dim,
int
spacedim>
27
MappingCollection<dim, spacedim>::MappingCollection
(
28
const
Mapping<dim, spacedim>
&mapping)
29
{
30
this->push_back(mapping);
31
}
32
33
34
35
template
<
int
dim,
int
spacedim>
36
MappingCollection<dim, spacedim>::MappingCollection
(
37
const
MappingCollection<dim, spacedim>
&other)
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
47
MappingCollection<dim, spacedim>::push_back
(
48
const
Mapping<dim, spacedim>
&new_mapping)
49
{
50
Collection<Mapping<dim, spacedim>
>::push_back(
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>
69
MappingQ<dim, 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>
79
StaticMappingQ1<dim, spacedim>::mapping_collection
=
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
90
DEAL_II_NAMESPACE_CLOSE
MappingQ1
Definition:
mapping_q1.h:55
MappingQ
Definition:
mapping_q.h:111
Mapping< dim, spacedim >
Mapping::clone
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const =0
hp::Collection
Definition:
collection.h:181
hp::Collection::size
unsigned int size() const
Definition:
collection.h:264
hp::MappingCollection
Definition:
mapping_collection.h:57
hp::MappingCollection::MappingCollection
MappingCollection()=default
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition:
config.h:442
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition:
config.h:443
mapping_collection.h
memory_consumption.h
hp
Definition:
hp.h:118
StaticMappingQ1
Definition:
mapping_q1.h:92
Generated by
1.9.4