deal.II version GIT relicensing-6809-ge913b9bb34 2026-09-25 17:20:01+00:00
\(\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// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2021 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_ndarray_h
14#define dealii_ndarray_h
15
16#include <deal.II/base/config.h>
17
19
20#include <array>
21
23
24#ifndef DOXYGEN
25namespace internal
26{
27 namespace ndarray
28 {
29 // clang-format off
42 template <typename T, std::size_t... Ns>
43 struct HelperArray;
44 // clang-format on
45
50 template <typename T, std::size_t N, std::size_t... Ns>
51 struct HelperArray<T, N, Ns...>
52 {
53 using type = std::array<typename HelperArray<T, Ns...>::type, N>;
54 };
55
60 template <typename T>
61 struct HelperArray<T>
62 {
63 using type = T;
64 };
65 } // namespace ndarray
66} // namespace internal
67#endif // DOXYGEN
68
104template <typename T, std::size_t... Ns>
105using ndarray = typename internal::ndarray::HelperArray<T, Ns...>::type;
106
108
109#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
constexpr char N
constexpr char T
typename internal::ndarray::HelperArray< T, Ns... >::type ndarray
Definition ndarray.h:105