Reference documentation for deal.II version 9.5.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\}}\)
Loading...
Searching...
No Matches
vector.cc
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 1999 - 2022 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
36// instantiate for long double manually because we use it in a few places:
37template class Vector<long double>;
38template long double
39Vector<long double>::operator*<long double>(const Vector<long double> &) const;
40
41// do a few functions that currently don't fit the scheme because they have
42// two template arguments that need to be different (the case of same
43// arguments is covered by the default copy constructor and copy operator that
44// is declared separately)
45
46# define TEMPL_COPY_CONSTRUCTOR(S1, S2) \
47 template Vector<S1>::Vector(const Vector<S2> &); \
48 template Vector<S1> &Vector<S1>::operator=<S2>(const Vector<S2> &)
49
50TEMPL_COPY_CONSTRUCTOR(double, float);
51TEMPL_COPY_CONSTRUCTOR(float, double);
52
53# ifdef DEAL_II_WITH_COMPLEX_VALUES
54TEMPL_COPY_CONSTRUCTOR(std::complex<double>, std::complex<float>);
55TEMPL_COPY_CONSTRUCTOR(std::complex<float>, std::complex<double>);
56# endif
57
58# undef TEMPL_COPY_CONSTRUCTOR
59
60
61# define TEMPL_OP_EQ(S1, S2) \
62 template void Vector<S1>::scale(const Vector<S2> &); \
63 template void Vector<S1>::equ(const S1, const Vector<S2> &)
64
65TEMPL_OP_EQ(double, float);
66TEMPL_OP_EQ(float, double);
67
68
69# ifdef DEAL_II_WITH_COMPLEX_VALUES
70TEMPL_OP_EQ(std::complex<double>, std::complex<float>);
71TEMPL_OP_EQ(std::complex<float>, std::complex<double>);
72# endif
73
74# undef TEMPL_OP_EQ
75#endif
76
77
78template <>
81{
82 Assert(false, ExcMessage("No lp norm for integer vectors"));
83 return -1;
84}
85
typename numbers::NumberTraits< Number >::real_type real_type
Definition vector.h:146
real_type lp_norm(const real_type p) const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
#define Assert(cond, exc)
#define TEMPL_COPY_CONSTRUCTOR(S1, S2)