|
Ifpack Package Browser (Single Doxygen Collection)
Development
|
Go to the documentation of this file.
44 #include "Teuchos_ParameterList.hpp"
45 #include "Teuchos_RefCountPtr.hpp"
46 #include "Epetra_MultiVector.h"
48 #include "Epetra_RowMatrix.h"
64 RootNode_(
RHS.RootNode()),
65 NumMyRows_(
RHS.NumMyRows()),
66 IsComputed_(
RHS.IsComputed())
103 if (Name ==
"reorder: root node")
154 std::vector<int> tmp;
158 int Length =
Graph.MaxMyNumEntries();
159 std::vector<int> Indices(Length);
168 std::vector<int> tmp2;
172 for (
int i = 0 ; i < (int)tmp.size() ; ++i) {
175 NumEntries, &Indices[0]));
178 std::sort(Indices.begin(), Indices.begin() + Length);
180 for (
int j = 0 ; j < NumEntries ; ++j) {
181 int col = Indices[j];
199 if ((tmp2.size() == 0) && (count != -1)) {
270 X[j][np] = Xorig[j][i];
286 X[j][i] = Xorig[j][np];
298 os <<
"*** Ifpack_RCMReordering" << endl << endl;
300 os <<
"*** Reordering not yet computed." << endl;
302 os <<
"*** Number of local rows = " <<
NumMyRows_ << endl;
303 os <<
"*** Root node = " <<
RootNode_ << endl;
305 os <<
"Local Row\tReorder[i]\tInvReorder[i]" << endl;
bool IsComputed_
If true, the reordering has been successfully computed.
std::vector< int > InvReorder_
Contains the inverse reordering.
virtual int Pinv(const Epetra_MultiVector &Xorig, Epetra_MultiVector &Xinvreord) const
Applies inverse reordering to multivector X, whose local length equals the number of local rows.
std::vector< int > Reorder_
Contains the reordering.
adjacency_list< vecS, vecS, undirectedS, no_property, property< edge_weight_t, double > > Graph
virtual bool IsComputed() const
Returns true is the reordering object has been successfully initialized, false otherwise.
Ifpack_Graph_Epetra_RowMatrix: a class to define Ifpack_Graph as a light-weight conversion of Epetra_...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual int SetParameters(Teuchos::ParameterList &List)
Sets all parameters.
#define IFPACK_CHK_ERR(ifpack_err)
virtual int SetParameter(const std::string Name, const int Value)
Sets integer parameters ‘Name’.
T & get(ParameterList &l, const std::string &name)
virtual std::ostream & Print(std::ostream &os) const
Prints basic information on iostream. This function is used by operator<<.
Ifpack_RCMReordering()
Constructor for Ifpack_Graph's.
virtual int Compute(const Ifpack_Graph &Graph)
Computes all it is necessary to initialize the reordering object.
virtual int InvReorder(const int i) const
Returns the inverse reordered index of row i.
virtual int Reorder(const int i) const
Returns the reordered index of row i.
Ifpack_RCMReordering: reverse Cuthill-McKee reordering.
Ifpack_RCMReordering & operator=(const Ifpack_RCMReordering &RHS)
Assignment operator.
int RootNode_
Defines the root node (defaulted to 0).
int NumMyRows_
Number of local rows in the graph.
virtual int NumMyRows() const
Returns the number of local rows.
Ifpack_Graph: a pure virtual class that defines graphs for IFPACK.
virtual int P(const Epetra_MultiVector &Xorig, Epetra_MultiVector &Xreord) const
Applies reordering to multivector X, whose local length equals the number of local rows.