// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // vi: set et ts=4 sw=2 sts=2: #ifndef DUNE_AMG_PINFO_HH #define DUNE_AMG_PINFO_HH #include #include #if HAVE_MPI #include #include #include #include #include #endif #include namespace Dune { namespace Amg { class SequentialInformation { public: typedef Communication MPICommunicator; typedef EmptySet CopyFlags; typedef AllSet OwnerSet; SolverCategory::Category category () const { return SolverCategory::sequential; } MPICommunicator communicator() const { return comm_; } int procs() const { return 1; } template T globalSum(const T& t) const { return t; } typedef int GlobalLookupIndexSet; void buildGlobalLookup(std::size_t){} void freeGlobalLookup(){} const GlobalLookupIndexSet& globalLookup() const { return gli; } template void copyOwnerToAll([[maybe_unused]] V& v, [[maybe_unused]] V& v1) const {} template void project([[maybe_unused]] V& v) const {} template void dot (const T1& x, const T1& y, T2& result) const { result = x.dot(y); } template typename FieldTraits::real_type norm (const T1& x) const { return x.two_norm(); } template SequentialInformation(const Communication&) {} SequentialInformation() {} SequentialInformation(const SequentialInformation&) {} private: MPICommunicator comm_{}; GlobalLookupIndexSet gli{}; }; } // namespace Amg } //namespace Dune #endif