Ifpack Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ifpack_Partitioner.h
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ***********************************************************************
4 //
5 // Ifpack: Object-Oriented Algebraic Preconditioner Package
6 // Copyright (2002) Sandia Corporation
7 //
8 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 // license for use of this work by or on behalf of the U.S. Government.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ***********************************************************************
41 //@HEADER
42 */
43 
44 #ifndef IFPACK_PARTITIONER_H
45 #define IFPACK_PARTITIONER_H
46 
47 #if defined(Ifpack_SHOW_DEPRECATED_WARNINGS)
48 #ifdef __GNUC__
49 #warning "The Ifpack package is deprecated"
50 #endif
51 #endif
52 
53 #include "Ifpack_ConfigDefs.h"
54 #include "Teuchos_ParameterList.hpp"
55 class Epetra_Comm;
56 class Ifpack_Graph;
57 class Epetra_Map;
58 class Epetra_BlockMap;
59 class Epetra_Import;
60 
62 
169 
170 public:
171 
173  virtual ~Ifpack_Partitioner() {};
174 
176  virtual int NumLocalParts() const = 0;
177 
179  virtual int OverlappingLevel() const = 0;
180 
182 
189  virtual int operator() (int MyRow) const = 0;
190 
192  virtual int operator() (int i, int j) const = 0;
193 
195  virtual int NumRowsInPart(const int Part) const = 0;
196 
198  virtual int RowsInPart(const int Part, int* List) const = 0;
199 
201  virtual const int* NonOverlappingPartition() const = 0;
202 
204  virtual int SetParameters(Teuchos::ParameterList& List) = 0;
205 
207  virtual int Compute() = 0;
208 
210  virtual bool IsComputed() = 0;
211 
213  virtual std::ostream& Print(std::ostream& os) const = 0;
214 
215 }; // class Ifpack_Partitioner
216 
217 inline std::ostream& operator<<(std::ostream& os, const Ifpack_Partitioner& obj)
218 {
219  return(obj.Print(os));
220 }
221 
222 #endif // IFPACK_PARTITIONER_H
Ifpack_Partitioner: A class to decompose local Ifpack_Graph&#39;s.
virtual int operator()(int MyRow) const =0
Returns the local non-overlapping partition ID of the specified row.
virtual int NumLocalParts() const =0
Returns the number of computed local partitions.
virtual int Compute()=0
Computes the partitions. Returns 0 if successful.
virtual int SetParameters(Teuchos::ParameterList &List)=0
Sets all the parameters for the partitioner.
std::ostream & operator<<(std::ostream &os, const Ifpack_Container &obj)
virtual int OverlappingLevel() const =0
Returns the overlapping level.
Ifpack_Graph: a pure virtual class that defines graphs for IFPACK.
Definition: Ifpack_Graph.h:67
virtual bool IsComputed()=0
Returns true if partitions have been computed successfully.
virtual int NumRowsInPart(const int Part) const =0
Returns the number of rows contained in specified partition.
virtual ~Ifpack_Partitioner()
Destructor.
virtual std::ostream & Print(std::ostream &os) const =0
Prints basic information about the partitioning object.
virtual int RowsInPart(const int Part, int *List) const =0
Copies into List the rows in the (overlapping) partition Part.
virtual const int * NonOverlappingPartition() const =0
Returns a pointer to the integer vector containing the non-overlapping partition ID of each local row...