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\}}\)
vector.cc
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 1999 - 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#include <deal.II/lac/vector.templates.h>
17
19
20#ifndef DOXYGEN
21# include "vector.inst"
22
23# ifndef DEAL_II_WITH_COMPLEX_VALUES
24// instantiate for std::complex<double> since we are using it internally in
25// FESeries.
26template class Vector<std::complex<double>>;
27# endif
28
29// instantiate for integers:
30template class Vector<int>;
31template Vector<double> &
32Vector<double>::operator=<int>(const ::Vector<int> &);
33template bool
34Vector<int>::operator==<int>(::Vector<int> const &) const;
35
36template void
38
39// instantiate for long double manually because we use it in a few places:
40template class Vector<long double>;
41template long double
42Vector<long double>::operator*<long double>(const Vector<long double> &) const;
43
44// do a few functions that currently don't fit the scheme because they have
45// two template arguments that need to be different (the case of same
46// arguments is covered by the default copy constructor and copy operator that
47// is declared separately)
48
49# define TEMPL_COPY_CONSTRUCTOR(S1, S2) \
50 template Vector<S1>::Vector(const Vector<S2> &); \
51 template Vector<S1> &Vector<S1>::operator=<S2>(const Vector<S2> &)
52
53TEMPL_COPY_CONSTRUCTOR(double, float);
54TEMPL_COPY_CONSTRUCTOR(float, double);
55
56# ifdef DEAL_II_WITH_COMPLEX_VALUES
57TEMPL_COPY_CONSTRUCTOR(std::complex<double>, std::complex<float>);
58TEMPL_COPY_CONSTRUCTOR(std::complex<float>, std::complex<double>);
59# endif
60
61# undef TEMPL_COPY_CONSTRUCTOR
62
63
64# define TEMPL_OP_EQ(S1, S2) \
65 template void Vector<S1>::scale(const Vector<S2> &); \
66 template void Vector<S1>::equ(const S1, const Vector<S2> &)
67
68TEMPL_OP_EQ(double, float);
69TEMPL_OP_EQ(float, double);
70
71
72# ifdef DEAL_II_WITH_COMPLEX_VALUES
73TEMPL_OP_EQ(std::complex<double>, std::complex<float>);
74TEMPL_OP_EQ(std::complex<float>, std::complex<double>);
75# endif
76
77# undef TEMPL_OP_EQ
78#endif
79
80
81template <>
84{
85 Assert(false, ExcMessage("No lp norm for integer vectors"));
86 return -1;
87}
88
Definition: vector.h:109
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
#define Assert(cond, exc)
Definition: exceptions.h:1473
static ::ExceptionBase & ExcMessage(std::string arg1)
typename numbers::NumberTraits< Number >::real_type real_type
Definition: vector.h:139
real_type lp_norm(const real_type p) const
#define TEMPL_COPY_CONSTRUCTOR(S1, S2)