Reference documentation for deal.II version 9.4.1
\(\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
ndarray.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 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#ifndef dealii_ndarray_h
17#define dealii_ndarray_h
18
19#include <deal.II/base/config.h>
20
22
23#include <array>
24
26
27#ifndef DOXYGEN
28namespace internal
29{
30 namespace ndarray
31 {
32 // clang-format off
45 template <typename T, std::size_t... Ns>
46 struct HelperArray;
47 // clang-format on
48
53 template <typename T, std::size_t N, std::size_t... Ns>
54 struct HelperArray<T, N, Ns...>
55 {
56 using type = std::array<typename HelperArray<T, Ns...>::type, N>;
57 };
58
63 template <typename T>
64 struct HelperArray<T>
65 {
66 using type = T;
67 };
68 } // namespace ndarray
69} // namespace internal
70#endif // DOXYGEN
71
107template <typename T, std::size_t... Ns>
108using ndarray = typename internal::ndarray::HelperArray<T, Ns...>::type;
109
111
112#endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
typename internal::ndarray::HelperArray< T, Ns... >::type ndarray
Definition: ndarray.h:108