From: Sebastian Kinnewig Date: Thu, 19 Oct 2023 08:52:59 +0000 (+0200) Subject: Check for the Trilinos version when calling getLocalNumElements. X-Git-Tag: relicensing~381^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5144cd843ed187529ababe13a4818281030c8ea6;p=dealii.git Check for the Trilinos version when calling getLocalNumElements. --- diff --git a/source/base/index_set.cc b/source/base/index_set.cc index 17108ea82a..5dd4b6d251 100644 --- a/source/base/index_set.cc +++ b/source/base/index_set.cc @@ -57,7 +57,11 @@ IndexSet::IndexSet( size_type(map->getMaxGlobalIndex() + 1)); else { +# if DEAL_II_TRILINOS_VERSION_GTE(13, 4, 0) const size_type n_indices = map->getLocalNumElements(); +# else + const size_type n_indices = map->getNodeNumElements(); +# endif const types::signed_global_dof_index *indices = map->getMyGlobalIndices().data(); add_indices(indices, indices + n_indices);