Loading [MathJax]/extensions/TeX/newcommand.js
 deal.II version GIT relicensing-3075-gc235bd4825 2025-04-15 08:10:00+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\}}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
number_cache.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2010 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_number_cache_h
16#define dealii_number_cache_h
17
18#include <deal.II/base/config.h>
19
23#include <deal.II/base/types.h>
24
25#include <vector>
26
27
29
30namespace internal
31{
32 namespace DoFHandlerImplementation
33 {
39 {
44
49 NumberCache(const NumberCache &) = default;
50
55 NumberCache(NumberCache &&) = default;
56
67
68
82 NumberCache(const std::vector<IndexSet> &locally_owned_dofs_per_processor,
83 const unsigned int my_rank);
84
90 operator=(const NumberCache &) = default;
91
97 operator=(NumberCache &&) = default;
98
103 std::size_t
104 memory_consumption() const;
105
109 void
110 clear();
111
119 std::vector<types::global_dof_index>
121 const MPI_Comm mpi_communicator) const;
122
130 std::vector<IndexSet>
132 const MPI_Comm mpi_communicator) const;
133
139
149
160
170 std::vector<types::global_dof_index> n_locally_owned_dofs_per_processor;
171
181 std::vector<IndexSet> locally_owned_dofs_per_processor;
182
188 template <class Archive>
189 void
190 serialize(Archive &ar, const unsigned int version);
191 };
192
193
194 template <class Archive>
195 void
196 NumberCache::serialize(Archive &ar, const unsigned int /*version*/)
197 {
202 }
203
204 } // namespace DoFHandlerImplementation
205} // namespace internal
206
207
209
210#endif // dealii_dof_iterator_selector_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:35
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:36
const unsigned int my_rank
Definition mpi.cc:929
std::vector< types::global_dof_index > n_locally_owned_dofs_per_processor
std::vector< IndexSet > locally_owned_dofs_per_processor
std::vector< IndexSet > get_locally_owned_dofs_per_processor(const MPI_Comm mpi_communicator) const
NumberCache(const NumberCache &)=default
std::vector< types::global_dof_index > get_n_locally_owned_dofs_per_processor(const MPI_Comm mpi_communicator) const
NumberCache & operator=(NumberCache &&)=default
void serialize(Archive &ar, const unsigned int version)
NumberCache & operator=(const NumberCache &)=default