Reference documentation for deal.II version 9.2.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\}}\)
affine_constraints.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2018 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 
17 #include <deal.II/lac/affine_constraints.templates.h>
18 
19 
21 
22 #include "affine_constraints.inst"
23 
24 /*
25  * Note: You probably do not want to add your custom instantiation down
26  * here but use affine_constraints.inst.in instead. We use the following
27  * three macros for PETSc and Trilinos types because we lack a mechanism
28  * for iterating over two "zipped" lists (we have to match trilinos/petsc
29  * matrix and vector types).
30  */
31 
32 #define INSTANTIATE_DLTG_VECTOR(VectorType) \
33  template void AffineConstraints<VectorType::value_type>::condense< \
34  VectorType>(const VectorType &, VectorType &) const; \
35  template void \
36  AffineConstraints<VectorType::value_type>::condense<VectorType>( \
37  VectorType &) const; \
38  template void \
39  AffineConstraints<VectorType::value_type>::distribute_local_to_global< \
40  VectorType>( \
41  const Vector<VectorType::value_type> &, \
42  const std::vector<AffineConstraints<VectorType::value_type>::size_type> &, \
43  VectorType &, \
44  const FullMatrix<VectorType::value_type> &) const; \
45  template void \
46  AffineConstraints<VectorType::value_type>::distribute_local_to_global< \
47  VectorType>( \
48  const Vector<VectorType::value_type> &, \
49  const std::vector<AffineConstraints<VectorType::value_type>::size_type> &, \
50  const std::vector<AffineConstraints<VectorType::value_type>::size_type> &, \
51  VectorType &, \
52  const FullMatrix<VectorType::value_type> &, \
53  bool) const
54 
55 #define INSTANTIATE_DLTG_VECTORMATRIX(MatrixType, VectorType) \
56  template void AffineConstraints<MatrixType::value_type>:: \
57  distribute_local_to_global<MatrixType, VectorType>( \
58  const FullMatrix<MatrixType::value_type> &, \
59  const Vector<VectorType::value_type> &, \
60  const std::vector<AffineConstraints::size_type> &, \
61  MatrixType &, \
62  VectorType &, \
63  bool, \
64  std::integral_constant<bool, false>) const
65 
66 #define INSTANTIATE_DLTG_BLOCK_VECTORMATRIX(MatrixType, VectorType) \
67  template void AffineConstraints<MatrixType::value_type>:: \
68  distribute_local_to_global<MatrixType, VectorType>( \
69  const FullMatrix<MatrixType::value_type> &, \
70  const Vector<VectorType::value_type> &, \
71  const std::vector<AffineConstraints::size_type> &, \
72  MatrixType &, \
73  VectorType &, \
74  bool, \
75  std::integral_constant<bool, true>) const
76 
77 #define INSTANTIATE_DLTG_MATRIX(MatrixType) \
78  template void \
79  AffineConstraints<MatrixType::value_type>::distribute_local_to_global< \
80  MatrixType>(const FullMatrix<MatrixType::value_type> &, \
81  const std::vector<AffineConstraints::size_type> &, \
82  const std::vector<AffineConstraints::size_type> &, \
83  MatrixType &) const; \
84  template void \
85  AffineConstraints<MatrixType::value_type>::distribute_local_to_global< \
86  MatrixType>(const FullMatrix<MatrixType::value_type> &, \
87  const std::vector<AffineConstraints::size_type> &, \
88  const AffineConstraints<MatrixType::value_type> &, \
89  const std::vector<AffineConstraints::size_type> &, \
90  MatrixType &) const
91 
92 #ifdef DEAL_II_WITH_PETSC
95 
100  Vector<PetscScalar>);
103 
105  Vector<PetscScalar>);
108 
112 #endif
113 
114 #ifdef DEAL_II_WITH_TRILINOS
116 
120 
125 
128 #endif
129 
130 /*
131  * Allocate scratch data.
132  *
133  * We cannot use the generic template instantiation because we need to
134  * provide an initializer object of type
135  * internals::AffineConstraintsData<Number> that can be passed to the
136  * constructor of scratch_data (it won't allow one to be constructed in
137  * place).
138  */
139 
140 namespace internals
141 {
142 #define SCRATCH_INITIALIZER(number, Name) \
143  AffineConstraintsData<number>::ScratchData scratch_data_initializer_##Name; \
144  template <> \
145  Threads::ThreadLocalStorage<AffineConstraintsData<number>::ScratchData> \
146  AffineConstraintsData<number>::scratch_data( \
147  scratch_data_initializer_##Name)
148 
149  SCRATCH_INITIALIZER(double, d);
150  SCRATCH_INITIALIZER(float, f);
151 #ifdef DEAL_II_WITH_COMPLEX_VALUES
152  SCRATCH_INITIALIZER(std::complex<double>, cd);
153  SCRATCH_INITIALIZER(std::complex<float>, cf);
154 #endif
155 #undef SCRATCH_INITIALIZER
156 } // namespace internals
157 
PETScWrappers::SparseMatrix
Definition: petsc_sparse_matrix.h:52
TrilinosWrappers::MPI::Vector
Definition: trilinos_vector.h:400
TrilinosWrappers::SparseMatrix
Definition: trilinos_sparse_matrix.h:515
PETScWrappers::MPI::SparseMatrix
Definition: petsc_sparse_matrix.h:367
INSTANTIATE_DLTG_VECTORMATRIX
#define INSTANTIATE_DLTG_VECTORMATRIX(MatrixType, VectorType)
Definition: affine_constraints.cc:55
TrilinosWrappers::MPI::BlockVector
Definition: trilinos_parallel_block_vector.h:75
Physics::Elasticity::Kinematics::d
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
internals
Definition: sparsity_pattern.h:69
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
PETScWrappers::MPI::BlockVector
Definition: petsc_block_vector.h:61
PETScWrappers::MPI::Vector
Definition: petsc_vector.h:158
INSTANTIATE_DLTG_MATRIX
#define INSTANTIATE_DLTG_MATRIX(MatrixType)
Definition: affine_constraints.cc:77
TrilinosWrappers::BlockSparseMatrix
Definition: trilinos_block_sparse_matrix.h:72
affine_constraints.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
INSTANTIATE_DLTG_BLOCK_VECTORMATRIX
#define INSTANTIATE_DLTG_BLOCK_VECTORMATRIX(MatrixType, VectorType)
Definition: affine_constraints.cc:66
Vector< double >
internals::SCRATCH_INITIALIZER
SCRATCH_INITIALIZER(double, d)
PETScWrappers::MPI::BlockSparseMatrix
Definition: petsc_block_sparse_matrix.h:67
INSTANTIATE_DLTG_VECTOR
#define INSTANTIATE_DLTG_VECTOR(VectorType)
Definition: affine_constraints.cc:32