FEI
Version of the Day
Loading...
Searching...
No Matches
base
fei_GraphReducer.cpp
1
/*--------------------------------------------------------------------*/
2
/* Copyright 2007 Sandia Corporation. */
3
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
4
/* non-exclusive license for use of this work by or on behalf */
5
/* of the U.S. Government. Export of this program may require */
6
/* a license from the United States Government. */
7
/*--------------------------------------------------------------------*/
8
9
#include <fei_macros.hpp>
10
11
#include <fei_GraphReducer.hpp>
12
#include <fei_TemplateUtils.hpp>
13
#include <fei_VectorSpace.hpp>
14
15
#undef fei_file
16
#define fei_file "fei_GraphReducer.cpp"
17
#include <fei_ErrMacros.hpp>
18
19
//----------------------------------------------------------------------------
20
fei::GraphReducer::GraphReducer
(
fei::SharedPtr<fei::Reducer>
reducer,
21
fei::SharedPtr<fei::Graph>
target)
22
: reducer_(reducer),
23
target_(target)
24
{
25
}
26
27
//----------------------------------------------------------------------------
28
fei::GraphReducer::~GraphReducer
()
29
{
30
}
31
32
//----------------------------------------------------------------------------
33
int
fei::GraphReducer::addIndices
(
int
row,
int
len,
const
int
* indices)
34
{
35
reducer_->addGraphIndices(1, &row, len, indices, *target_);
36
return
(0);
37
}
38
39
//----------------------------------------------------------------------------
40
int
fei::GraphReducer::addSymmetricIndices
(
int
numIndices,
int
* indices,
41
bool
diagonal)
42
{
43
reducer_->addSymmetricGraphIndices(numIndices, indices, diagonal, *target_);
44
return
(0);
45
}
46
47
//----------------------------------------------------------------------------
48
int
fei::GraphReducer::writeLocalGraph
(FEI_OSTREAM& os,
bool
debug,
49
bool
prefixLinesWithPoundSign)
50
{
51
return
(target_->writeLocalGraph(os, debug, prefixLinesWithPoundSign));
52
}
53
54
//----------------------------------------------------------------------------
55
int
fei::GraphReducer::writeRemoteGraph
(FEI_OSTREAM& os)
56
{
57
return
(target_->writeRemoteGraph(os));
58
}
59
60
//----------------------------------------------------------------------------
61
int
fei::GraphReducer::gatherFromOverlap
()
62
{
63
reducer_->assembleReducedGraph(target_.get(),
false
);
64
return
(target_->gatherFromOverlap());
65
}
66
fei::GraphReducer::addIndices
int addIndices(int row, int len, const int *indices)
Definition
fei_GraphReducer.cpp:33
fei::GraphReducer::addSymmetricIndices
int addSymmetricIndices(int numIndices, int *indices, bool diagonal=false)
Definition
fei_GraphReducer.cpp:40
fei::GraphReducer::GraphReducer
GraphReducer(fei::SharedPtr< fei::Reducer > reducer, fei::SharedPtr< fei::Graph > target)
Definition
fei_GraphReducer.cpp:20
fei::GraphReducer::~GraphReducer
virtual ~GraphReducer()
Definition
fei_GraphReducer.cpp:28
fei::GraphReducer::writeLocalGraph
int writeLocalGraph(FEI_OSTREAM &os, bool debug=false, bool prefixLinesWithPoundSign=true)
Definition
fei_GraphReducer.cpp:48
fei::GraphReducer::writeRemoteGraph
int writeRemoteGraph(FEI_OSTREAM &os)
Definition
fei_GraphReducer.cpp:55
fei::GraphReducer::gatherFromOverlap
int gatherFromOverlap()
Definition
fei_GraphReducer.cpp:61
fei::SharedPtr
Definition
fei_SharedPtr.hpp:65
Generated by
1.10.0