IFPACK
Development
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Ifpack_OverlapGraph.h
1
/*@HEADER
2
// ***********************************************************************
3
//
4
// Ifpack: Object-Oriented Algebraic Preconditioner Package
5
// Copyright (2002) Sandia Corporation
6
//
7
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8
// license for use of this work by or on behalf of the U.S. Government.
9
//
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are
12
// met:
13
//
14
// 1. Redistributions of source code must retain the above copyright
15
// notice, this list of conditions and the following disclaimer.
16
//
17
// 2. Redistributions in binary form must reproduce the above copyright
18
// notice, this list of conditions and the following disclaimer in the
19
// documentation and/or other materials provided with the distribution.
20
//
21
// 3. Neither the name of the Corporation nor the names of the
22
// contributors may be used to endorse or promote products derived from
23
// this software without specific prior written permission.
24
//
25
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
//
37
// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38
//
39
// ***********************************************************************
40
//@HEADER
41
*/
42
43
#ifndef IFPACK_OVERLAPGRAPH_H
44
#define IFPACK_OVERLAPGRAPH_H
45
46
#include "Ifpack_ConfigDefs.h"
47
#include "Epetra_Object.h"
48
#include "Epetra_CrsGraph.h"
49
#include "Epetra_Import.h"
50
#include "Teuchos_RefCountPtr.hpp"
51
52
class
Epetra_Comm
;
53
class
Epetra_BlockMap
;
54
class
Epetra_RowMatrix
;
55
56
namespace
Teuchos {
57
class
ParameterList;
58
}
59
61
62
class
Ifpack_OverlapGraph
:
public
Epetra_Object
{
63
64
public
:
66
71
Ifpack_OverlapGraph
(
const
Teuchos::RefCountPtr<const Epetra_CrsGraph>& UserMatrixGraph_in,
int
OverlapLevel_in);
72
74
79
Ifpack_OverlapGraph
(
const
Teuchos::RefCountPtr<const Epetra_RowMatrix>& UserMatrix_in,
int
OverlapLevel_in);
80
82
Ifpack_OverlapGraph
(
const
Ifpack_OverlapGraph
& Source);
83
85
virtual
~Ifpack_OverlapGraph
() {};
87
89
91
/* This method is only available if the configure argument
92
'--enable-ifpack-teuchos' was used.
93
This method recognizes the name: level_overlap, which is case insensitive.
94
The ParameterEntry must have type int.
95
*/
96
int
SetParameters
(
const
Teuchos::ParameterList& parameterlist,
97
bool
cerr_warning_if_unused=
false
);
98
100
const
Epetra_CrsGraph
&
OverlapGraph
()
const
{
return
(*OverlapGraph_);}
101
103
const
Epetra_BlockMap
&
OverlapRowMap
()
const
{
return
(*OverlapRowMap_);}
104
106
const
Epetra_Import
&
OverlapImporter
()
const
{
return
(*OverlapImporter_);}
107
109
114
int
OverlapLevel
()
const
{
return
(OverlapLevel_);}
116
118
119
void
Print(std::ostream& os)
const
{
120
using
std::endl;
121
122
os << endl;
123
if
(UserMatrix_!=Teuchos::null)
124
os <<
"Overlap Graph created using the user's Epetra_RowMatrix object"
<< endl;
125
else
126
os <<
"Overlap Graph created using the user's Epetra_CrsGraph object"
<< endl;
127
128
os <<
" Level of Overlap = "
<< OverlapLevel_ << endl;
129
OverlapGraph_->Print(os);
130
return
;
131
}
133
134
protected
:
135
136
int
ConstructOverlapGraph(
const
Teuchos::RefCountPtr<const Epetra_CrsGraph>& UserMatrixGraph);
137
Teuchos::RefCountPtr<Epetra_CrsGraph> OverlapGraph_;
138
Teuchos::RefCountPtr<const Epetra_CrsGraph> UserMatrixGraph_;
139
Teuchos::RefCountPtr<const Epetra_RowMatrix> UserMatrix_;
140
Teuchos::RefCountPtr<Epetra_BlockMap> OverlapRowMap_;
141
Teuchos::RefCountPtr<Epetra_Import> OverlapImporter_;
142
int
OverlapLevel_;
143
bool
IsOverlapped_;
144
};
145
#endif
// IFPACK_OVERLAPGRAPH_H
Epetra_BlockMap
Epetra_Comm
Epetra_CrsGraph
Epetra_Import
Epetra_Object::Epetra_Object
Epetra_Object(int TracebackModeIn=-1, bool set_label=true)
Epetra_RowMatrix
Ifpack_OverlapGraph::OverlapImporter
const Epetra_Import & OverlapImporter() const
Returns the overlap graph object.
Definition
Ifpack_OverlapGraph.h:106
Ifpack_OverlapGraph::Ifpack_OverlapGraph
Ifpack_OverlapGraph(const Teuchos::RefCountPtr< const Epetra_CrsGraph > &UserMatrixGraph_in, int OverlapLevel_in)
Constructor using Epetra_CrsGraph.
Definition
Ifpack_OverlapGraph.cpp:53
Ifpack_OverlapGraph::SetParameters
int SetParameters(const Teuchos::ParameterList ¶meterlist, bool cerr_warning_if_unused=false)
Set parameters using a Teuchos::ParameterList object.
Definition
Ifpack_OverlapGraph.cpp:90
Ifpack_OverlapGraph::OverlapRowMap
const Epetra_BlockMap & OverlapRowMap() const
Returns the RowMap associated with the overlap graph.
Definition
Ifpack_OverlapGraph.h:103
Ifpack_OverlapGraph::~Ifpack_OverlapGraph
virtual ~Ifpack_OverlapGraph()
Ifpack_CrsIlut Destructor.
Definition
Ifpack_OverlapGraph.h:85
Ifpack_OverlapGraph::OverlapGraph
const Epetra_CrsGraph & OverlapGraph() const
Returns the overlap graph object.
Definition
Ifpack_OverlapGraph.h:100
Ifpack_OverlapGraph::OverlapLevel
int OverlapLevel() const
Returns the level of overlap used to create this graph.
Definition
Ifpack_OverlapGraph.h:114
Generated by
1.17.0