FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fei_GraphReducer.hpp
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 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 #ifndef _fei_GraphReducer_hpp_
10 #define _fei_GraphReducer_hpp_
11 
12 #include <fei_iosfwd.hpp>
13 #include <fei_SharedPtr.hpp>
14 #include <fei_Graph.hpp>
15 #include <fei_CommUtils.hpp>
16 #include <fei_Reducer.hpp>
17 #include <snl_fei_RaggedTable_specialize.hpp>
18 
19 namespace fei {
20 
22  class GraphReducer : public fei::Graph {
23  public:
27 
29  virtual ~GraphReducer();
30 
32  int addIndices(int row,
33  int len,
34  const int* indices);
35 
39  int addSymmetricIndices(int numIndices,
40  int* indices,
41  bool diagonal=false);
42 
44  int gatherFromOverlap();
45 
49  {
50  return( target_->getLocalGraph());
51  }
52 
54  std::vector<remote_table_type*>& getRemoteGraph()
55  {
56  return( target_->getRemoteGraph());
57  }
58 
60  int writeLocalGraph(FEI_OSTREAM& os,
61  bool debug=false,
62  bool prefixLinesWithPoundSign=true);
63 
65  int writeRemoteGraph(FEI_OSTREAM& os);
66 
67  private:
70  };//class GraphReducer
71 
72 } //namespace fei
73 
74 #endif // _fei_GraphReducer_hpp_
75 
int writeRemoteGraph(FEI_OSTREAM &os)
std::vector< remote_table_type * > & getRemoteGraph()
table_type * getLocalGraph()
int writeLocalGraph(FEI_OSTREAM &os, bool debug=false, bool prefixLinesWithPoundSign=true)
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)