FEI Version of the Day
Loading...
Searching...
No Matches
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//----------------------------------------------------------------------------
22 : reducer_(reducer),
23 target_(target)
24{
25}
26
27//----------------------------------------------------------------------------
31
32//----------------------------------------------------------------------------
33int 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//----------------------------------------------------------------------------
40int fei::GraphReducer::addSymmetricIndices(int numIndices, int* indices,
41 bool diagonal)
42{
43 reducer_->addSymmetricGraphIndices(numIndices, indices, diagonal, *target_);
44 return(0);
45}
46
47//----------------------------------------------------------------------------
48int fei::GraphReducer::writeLocalGraph(FEI_OSTREAM& os, bool debug,
49 bool prefixLinesWithPoundSign)
50{
51 return(target_->writeLocalGraph(os, debug, prefixLinesWithPoundSign));
52}
53
54//----------------------------------------------------------------------------
56{
57 return(target_->writeRemoteGraph(os));
58}
59
60//----------------------------------------------------------------------------
62{
63 reducer_->assembleReducedGraph(target_.get(), false);
64 return(target_->gatherFromOverlap());
65}
66
int addIndices(int row, int len, const int *indices)
int addSymmetricIndices(int numIndices, int *indices, bool diagonal=false)
GraphReducer(fei::SharedPtr< fei::Reducer > reducer, fei::SharedPtr< fei::Graph > target)
int writeLocalGraph(FEI_OSTREAM &os, bool debug=false, bool prefixLinesWithPoundSign=true)
int writeRemoteGraph(FEI_OSTREAM &os)