FEI Package Browser (Single Doxygen Collection)  Version of the Day
fei_Graph_Impl.hpp
Go to the documentation of this file.
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_Graph_Impl_hpp_
10 #define _fei_Graph_Impl_hpp_
11 
12 #include <fei_iosfwd.hpp>
13 #include <fei_SharedPtr.hpp>
14 #include <fei_Graph.hpp>
15 #include <fei_mpi.h>
16 #include <fei_EqnComm.hpp>
17 
18 namespace fei {
19 
21  class Graph_Impl : public fei::Graph {
22  public:
24  Graph_Impl(MPI_Comm comm, int firstLocalRow, int lastLocalRow);
25 
27  virtual ~Graph_Impl();
28 
30  int addIndices(int row,
31  int len,
32  const int* indices);
33 
37  int addSymmetricIndices(int numIndices,
38  int* indices,
39  bool diagonal=false);
40 
42  int gatherFromOverlap();
43 
47  {
48  return( localGraphData_ );
49  }
50 
52  std::vector<remote_table_type*>& getRemoteGraph()
53  {
54  return( remoteGraphData_);
55  }
56 
59  bool debug=false,
60  bool prefixLinesWithPoundSign=true);
61 
64 
66  int getNumLocalRows();
67 
70  int getNumLocalNonzeros() const;
71 
73  int getLocalRowLength(int row);
74 
75  private:
76  void addDiagonals(int numIndices, int* indices);
77 
79  std::vector<remote_table_type*> remoteGraphData_;
81 
85  };//class Graph_Impl
86 
87 } //namespace fei
88 
89 #endif // _fei_Graph_Impl_hpp_
90 
fei::Graph_Impl::getRemoteGraph
std::vector< remote_table_type * > & getRemoteGraph()
Definition: fei_Graph_Impl.hpp:52
fei::Graph_Impl::getNumLocalNonzeros
int getNumLocalNonzeros() const
Definition: fei_Graph_Impl.cpp:311
fei::Graph_Impl::gatherFromOverlap
int gatherFromOverlap()
Definition: fei_Graph_Impl.cpp:191
fei::Graph_Impl::lastLocalRow_
int lastLocalRow_
Definition: fei_Graph_Impl.hpp:82
fei::SharedPtr< fei::EqnComm >
fei::Graph_Impl::writeRemoteGraph
int writeRemoteGraph(FEI_OSTREAM &os)
Definition: fei_Graph_Impl.cpp:181
fei::Graph_Impl::getLocalGraph
table_type * getLocalGraph()
Definition: fei_Graph_Impl.hpp:46
fei_SharedPtr.hpp
fei::Graph
Definition: fei_Graph.hpp:20
fei::Graph_Impl::comm_
MPI_Comm comm_
Definition: fei_Graph_Impl.hpp:84
fei::Graph_Impl::addIndices
int addIndices(int row, int len, const int *indices)
Definition: fei_Graph_Impl.cpp:54
fei::Graph_Impl::numProcs_
int numProcs_
Definition: fei_Graph_Impl.hpp:83
fei::Graph_Impl::remoteGraphData_
std::vector< remote_table_type * > remoteGraphData_
Definition: fei_Graph_Impl.hpp:79
fei::Graph_Impl::~Graph_Impl
virtual ~Graph_Impl()
Definition: fei_Graph_Impl.cpp:45
fei::Graph_Impl
Definition: fei_Graph_Impl.hpp:21
fei_iosfwd.hpp
fei::Graph_Impl::getLocalRowLength
int getLocalRowLength(int row)
Definition: fei_Graph_Impl.cpp:292
FEI_OSTREAM
#define FEI_OSTREAM
Definition: fei_iosfwd.hpp:24
fei::Graph_Impl::getNumLocalRows
int getNumLocalRows()
Definition: fei_Graph_Impl.cpp:303
fei::Graph_Impl::eqnComm_
fei::SharedPtr< fei::EqnComm > eqnComm_
Definition: fei_Graph_Impl.hpp:80
fei_mpi.h
fei::Graph_Impl::localProc_
int localProc_
Definition: fei_Graph_Impl.hpp:83
fei_Graph.hpp
fei_EqnComm.hpp
fei::Graph_Impl::addDiagonals
void addDiagonals(int numIndices, int *indices)
Definition: fei_Graph_Impl.cpp:114
fei
Definition: fei_ArrayUtils.hpp:16
fei::Graph_Impl::firstLocalRow_
int firstLocalRow_
Definition: fei_Graph_Impl.hpp:82
MPI_Comm
#define MPI_Comm
Definition: fei_mpi.h:56
fei::Graph_Impl::addSymmetricIndices
int addSymmetricIndices(int numIndices, int *indices, bool diagonal=false)
Definition: fei_Graph_Impl.cpp:70
fei::Graph_Impl::localGraphData_
table_type * localGraphData_
Definition: fei_Graph_Impl.hpp:78
fei::Graph::table_type
snl_fei::RaggedTable< snl_fei::MapContig< fei::ctg_set< int > * >, fei::ctg_set< int > > table_type
Definition: fei_Graph.hpp:28
fei::Graph_Impl::Graph_Impl
Graph_Impl(MPI_Comm comm, int firstLocalRow, int lastLocalRow)
Definition: fei_Graph_Impl.cpp:22
fei::Graph_Impl::writeLocalGraph
int writeLocalGraph(FEI_OSTREAM &os, bool debug=false, bool prefixLinesWithPoundSign=true)
Definition: fei_Graph_Impl.cpp:152