3
************************************************************************
5
Isorropia: Partitioning and Load Balancing Package
6
Copyright (2006) Sandia Corporation
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.
11
This library is free software; you can redistribute it and/or modify
12
it under the terms of the GNU Lesser General Public License as
13
published by the Free Software Foundation; either version 2.1 of the
14
License, or (at your option) any later version.
16
This library is distributed in the hope that it will be useful, but
17
WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
Lesser General Public License for more details.
21
You should have received a copy of the GNU Lesser General Public
22
License along with this library; if not, write to the Free Software
23
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26
************************************************************************
30
#ifndef _Isorropia_EpetraLevelScheduler_hpp_
31
#define _Isorropia_EpetraLevelScheduler_hpp_
33
#include <Isorropia_ConfigDefs.hpp>
34
#include <Isorropia_EpetraOperator.hpp>
35
#include <Isorropia_LevelScheduler.hpp>
36
#include <Teuchos_RCP.hpp>
40
class Epetra_BlockMap;
43
class Epetra_MultiVector;
44
class Epetra_CrsGraph;
45
class Epetra_CrsMatrix;
46
class Epetra_RowMatrix;
47
class Epetra_LinearProblem;
53
/** An implementation of the LevelScheduler interface that operates on
54
and Epetra_CrsGraph, representing the non-zeros in a matrix. The
55
elements to be partitioned into levels are matrix rows. Assumption
56
is that matrix is lower triangular or upper triangular.
59
class LevelScheduler : public Isorropia::LevelScheduler, public Isorropia::Epetra::Operator {
64
\param[in] input_graph the graph representing the non-zeros of the matrix
65
\param[in] compute_now if @c true, the scheduling is computed in the constructor, otherwise call Isorropia::Epetra::LevelScheduler::schedule when you want to compute the scheduling, defaults to @c false
68
LevelScheduler(Teuchos::RCP<const Epetra_CrsGraph> input_graph,
69
bool compute_now=true);
72
~LevelScheduler() {} ;
74
/** Compute the scheduling if it has not already been computed, same effect as
75
Isorropia::Epetra::LevelScheduler::compute
77
\param[in] force_scheduling if @c true recompute the scheduling even if it has already been computed, defaults to @c false
80
void schedule(bool force_scheduling=false);
82
/** Compute the scheduling if it has not already been computed, same effect as
83
Isorropia::Epetra::LevelScheduler::schedule
85
\param[in] force_compute if @c true recompute the scheduling even if it has already been computed, defaults to @c false
88
void compute(bool force_compute=false) {
89
schedule(force_compute);
92
};//class LevelScheduler
95
}//namespace Isorropia