From e7059fb97d3157af84cda29fdba98b5b78837299 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 22 Sep 2023 09:07:12 -0600 Subject: [PATCH] Add AffineConstraints::get_locally_owned_indices(). --- include/deal.II/lac/affine_constraints.h | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/deal.II/lac/affine_constraints.h b/include/deal.II/lac/affine_constraints.h index 63a7568e2f..0087197dcf 100644 --- a/include/deal.II/lac/affine_constraints.h +++ b/include/deal.II/lac/affine_constraints.h @@ -704,6 +704,17 @@ public: bool can_store_line(const size_type line_n) const; + /** + * Return the index set describing which part of the degrees of freedom to + * which this object stores constraints are "locally owned". Typically, + * these would be the + * @ref GlossLocallyOwnedDof "locally owned degrees of freedom". + * This function returns the corresponding index set provided to either + * the constructor or the reinit() function of this class. + */ + const IndexSet & + get_locally_owned_indices() const; + /** * Return the index set describing locally relevant lines if any are * present. Note that if no local lines were given, this represents an empty @@ -2378,6 +2389,8 @@ AffineConstraints::calculate_line_index(const size_type line_n) const return local_lines.index_within_set(line_n); } + + template inline bool AffineConstraints::can_store_line(size_type line_n) const @@ -2385,6 +2398,17 @@ AffineConstraints::can_store_line(size_type line_n) const return local_lines.size() == 0 || local_lines.is_element(line_n); } + + +template +inline const IndexSet & +AffineConstraints::get_locally_owned_indices() const +{ + return locally_owned_dofs; +} + + + template inline const IndexSet & AffineConstraints::get_local_lines() const @@ -2392,6 +2416,8 @@ AffineConstraints::get_local_lines() const return local_lines; } + + template template inline void -- 2.39.5