Ifpack2 Templated Preconditioning Package Version 1.0
Loading...
Searching...
No Matches
Ifpack2_Partitioner.hpp
1// @HEADER
2// *****************************************************************************
3// Ifpack2: Templated Object-Oriented Algebraic Preconditioner Package
4//
5// Copyright 2009 NTESS and the Ifpack2 contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef IFPACK2_PARTITIONER_HPP
11#define IFPACK2_PARTITIONER_HPP
12
13#include "Ifpack2_ConfigDefs.hpp"
14#include "Teuchos_ParameterList.hpp"
15#include "Teuchos_ArrayRCP.hpp"
16#include <iostream>
17
18namespace Ifpack2 {
19
21
145template <class GraphType>
146class Partitioner : public Teuchos::Describable {
147public:
148 typedef typename GraphType::local_ordinal_type LocalOrdinal;
149 typedef typename GraphType::global_ordinal_type GlobalOrdinal;
150 typedef typename GraphType::node_type Node;
151
153 virtual ~Partitioner() {};
154
159 virtual int numLocalParts () const = 0;
160
162 virtual int overlappingLevel() const = 0;
163
168 virtual LocalOrdinal operator() (LocalOrdinal MyRow) const = 0;
169
171 virtual LocalOrdinal operator() (LocalOrdinal i, LocalOrdinal j) const = 0;
172
174 virtual size_t numRowsInPart (const LocalOrdinal Part) const = 0;
175
177 virtual void
178 rowsInPart (const LocalOrdinal Part,
179 Teuchos::ArrayRCP<LocalOrdinal>& List) const = 0;
180
182 virtual Teuchos::ArrayView<const LocalOrdinal>
184
186 virtual void setParameters (Teuchos::ParameterList& List) = 0;
187
189 virtual void compute () = 0;
190
192 virtual bool isComputed () const = 0;
193
195 virtual std::ostream& print (std::ostream& os) const = 0;
196
197};
198
199// Overloaded output stream operator for Partitioner
200template <class GraphType>
201inline std::ostream&
202operator<< (std::ostream& os,
204{
205 return obj.print (os);
206}
207
208} // namespace Ifpack2
209
210#endif // IFPACK2_PARTITIONER_HPP
Ifpack2::Partitioner:
Definition Ifpack2_Partitioner.hpp:146
virtual LocalOrdinal operator()(LocalOrdinal MyRow) const =0
The local (nonoverlapping) partition index of the specified local row.
virtual int numLocalParts() const =0
Number of computed local partitions.
virtual Teuchos::ArrayView< const LocalOrdinal > nonOverlappingPartition() const =0
The nonoverlapping partition indices of each local row.
virtual ~Partitioner()
Destructor.
Definition Ifpack2_Partitioner.hpp:153
virtual bool isComputed() const =0
Return true if partitions have been computed successfully.
virtual void compute()=0
Compute the partitions.
virtual void rowsInPart(const LocalOrdinal Part, Teuchos::ArrayRCP< LocalOrdinal > &List) const =0
Copy into List the rows in the (overlapping) partition Part.
virtual std::ostream & print(std::ostream &os) const =0
Print basic information about the partitioning object.
virtual void setParameters(Teuchos::ParameterList &List)=0
Set all the parameters for the partitioner.
virtual size_t numRowsInPart(const LocalOrdinal Part) const =0
The number of rows contained in the specified partition.
virtual int overlappingLevel() const =0
The level of overlap.
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:41