Reference documentation for deal.II version 9.1.0-pre
fe_values_extractors.h
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 
16 #ifndef dealii_fe_values_extractors_h
17 #define dealii_fe_values_extractors_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 DEAL_II_NAMESPACE_OPEN
23 
24 
42 {
54  struct Scalar
55  {
59  unsigned int component;
60 
68  Scalar();
69 
73  Scalar(const unsigned int component);
74  };
75 
76 
103  struct Vector
104  {
109 
117  Vector();
118 
123  Vector(const unsigned int first_vector_component);
124  };
125 
126 
145  template <int rank>
147  {
152 
160  SymmetricTensor();
161 
166  SymmetricTensor(const unsigned int first_tensor_component);
167  };
168 
169 
188  template <int rank>
189  struct Tensor
190  {
195 
203  Tensor();
204 
209  Tensor(const unsigned int first_tensor_component);
210  };
211 } // namespace FEValuesExtractors
212 
213 
214 /*-------------- Inline functions: namespace FEValuesExtractors -------------*/
215 
216 namespace FEValuesExtractors
217 {
218  inline Scalar::Scalar()
219  : component(numbers::invalid_unsigned_int)
220  {}
221 
222 
223 
224  inline Scalar::Scalar(const unsigned int component)
225  : component(component)
226  {}
227 
228 
229 
230  inline Vector::Vector()
231  : first_vector_component(numbers::invalid_unsigned_int)
232  {}
233 
234 
235  inline Vector::Vector(const unsigned int first_vector_component)
236  : first_vector_component(first_vector_component)
237  {}
238 
239 
240  template <int rank>
242  : first_tensor_component(numbers::invalid_unsigned_int)
243  {}
244 
245 
246  template <int rank>
248  const unsigned int first_tensor_component)
249  : first_tensor_component(first_tensor_component)
250  {}
251 
252 
253  template <int rank>
255  : first_tensor_component(numbers::invalid_unsigned_int)
256  {}
257 
258 
259  template <int rank>
260  inline Tensor<rank>::Tensor(const unsigned int first_tensor_component)
261  : first_tensor_component(first_tensor_component)
262  {}
263 } // namespace FEValuesExtractors
264 
265 
266 
267 DEAL_II_NAMESPACE_CLOSE
268 
269 #endif