deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11: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
dof_levels.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) 1998 - 2025 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_dof_levels_h
14#define dealii_dof_levels_h
15
16
17#include <deal.II/base/config.h>
18
21#include <deal.II/base/types.h>
22
24
25#include <vector>
26
27
29
30
31namespace internal
32{
33 namespace DoFHandlerImplementation
34 {
60 template <int dim>
62 {
63 public:
68 std::vector<types::global_dof_index> cell_dof_indices_cache;
69
74
85 get_cell_cache_start(const unsigned int obj_index,
86 const unsigned int dofs_per_cell) const;
87
92 std::size_t
93 memory_consumption() const;
94
100 template <class Archive>
101 void
102 serialize(Archive &ar, const unsigned int version);
103 };
104
105
106
107 template <int dim>
108 inline const types::global_dof_index *
109 DoFLevel<dim>::get_cell_cache_start(const unsigned int obj_index,
110 const unsigned int dofs_per_cell) const
111 {
112 Assert(obj_index * dofs_per_cell + dofs_per_cell <=
113 cell_dof_indices_cache.size(),
115
116 return cell_dof_indices_cache.data() + (obj_index * dofs_per_cell);
117 }
118
119
120
121 template <int dim>
122 inline std::size_t
124 {
125 return (MemoryConsumption::memory_consumption(cell_dof_indices_cache) +
127 }
128
129
130 template <int dim>
131 template <class Archive>
132 inline void
133 DoFLevel<dim>::serialize(Archive &ar, const unsigned int)
134 {
135 ar &cell_dof_indices_cache;
136 ar &dof_object;
137 }
138 } // namespace DoFHandlerImplementation
139} // namespace internal
140
142
143#endif
std::vector< types::global_dof_index > cell_dof_indices_cache
Definition dof_levels.h:68
void serialize(Archive &ar, const unsigned int version)
Definition dof_levels.h:133
const types::global_dof_index * get_cell_cache_start(const unsigned int obj_index, const unsigned int dofs_per_cell) const
Definition dof_levels.h:109
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)