Reference documentation for deal.II version 8.4.2
vector.cc
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 2015 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #include <deal.II/lac/vector.templates.h>
17 
18 DEAL_II_NAMESPACE_OPEN
19 
20 #include "vector.inst"
21 
22 // instantiate for integers:
23 template class Vector<int>;
24 namespace internal
25 {
26  namespace Vector
27  {
28  template void copy_vector<int,double> (const ::Vector<int> &,
30 
31  template void copy_vector<int,int> (const ::Vector<int> &,
32  ::Vector<int> &);
33  }
34 }
35 
36 template
37 void Vector<int>::reinit<double>(const Vector<double> &, const bool);
38 
39 
40 // do a few functions that currently don't fit the scheme because they have
41 // two template arguments that need to be different (the case of same
42 // arguments is covered by the default copy constructor and copy operator that
43 // is declared separately)
44 
45 #define TEMPL_COPY_CONSTRUCTOR(S1,S2) \
46  template Vector<S1>::Vector (const Vector<S2> &)
47 
48 #ifndef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG
49 TEMPL_COPY_CONSTRUCTOR(double,float);
50 TEMPL_COPY_CONSTRUCTOR(float,double);
51 
52 TEMPL_COPY_CONSTRUCTOR(long double,double);
53 TEMPL_COPY_CONSTRUCTOR(double,long double);
54 
55 TEMPL_COPY_CONSTRUCTOR(long double,float);
56 TEMPL_COPY_CONSTRUCTOR(float,long double);
57 
58 
59 TEMPL_COPY_CONSTRUCTOR(std::complex<double>,std::complex<float>);
60 TEMPL_COPY_CONSTRUCTOR(std::complex<float>,std::complex<double>);
61 
62 TEMPL_COPY_CONSTRUCTOR(std::complex<long double>,std::complex<double>);
63 TEMPL_COPY_CONSTRUCTOR(std::complex<double>,std::complex<long double>);
64 
65 TEMPL_COPY_CONSTRUCTOR(std::complex<long double>,std::complex<float>);
66 TEMPL_COPY_CONSTRUCTOR(std::complex<float>,std::complex<long double>);
67 
68 #endif
69 
70 #undef TEMPL_COPY_CONSTRUCTOR
71 
72 
73 #define TEMPL_OP_EQ(S1,S2) \
74  template void Vector<S1>::scale (const Vector<S2>&); \
75  template void Vector<S1>::equ (const S1, const Vector<S2>&)
76 
77 TEMPL_OP_EQ(double,float);
78 TEMPL_OP_EQ(float,double);
79 
80 TEMPL_OP_EQ(long double,double);
81 TEMPL_OP_EQ(double,long double);
82 
83 TEMPL_OP_EQ(long double,float);
84 TEMPL_OP_EQ(float,long double);
85 
86 
87 TEMPL_OP_EQ(std::complex<double>,std::complex<float>);
88 TEMPL_OP_EQ(std::complex<float>,std::complex<double>);
89 
90 TEMPL_OP_EQ(std::complex<long double>,std::complex<double>);
91 TEMPL_OP_EQ(std::complex<double>,std::complex<long double>);
92 
93 TEMPL_OP_EQ(std::complex<long double>,std::complex<float>);
94 TEMPL_OP_EQ(std::complex<float>,std::complex<long double>);
95 
96 #undef TEMPL_OP_EQ
97 
98 DEAL_II_NAMESPACE_CLOSE