46#ifndef MUELU_LWGRAPH_DECL_HPP
47#define MUELU_LWGRAPH_DECL_HPP
49#include <Xpetra_ConfigDefs.hpp>
50#include <Xpetra_CrsGraph.hpp>
51#include <Xpetra_CrsGraphFactory.hpp>
52#include <Xpetra_Map_fwd.hpp>
74#undef MUELU_LWGRAPH_SHORT
89 LWGraph(
const ArrayRCP<const LO>& rowPtrs,
const ArrayRCP<const LO>& colPtrs,
90 const RCP<const Map>& domainMap,
const RCP<const Map>& importMap,
const std::string& objectLabel =
"")
98 LO nRows = as<LO>(rowPtrs.size()-1);
99 for (LO i = 0; i < nRows; i++)
113 Teuchos::reduceAll(*
domainMap_->getComm(), Teuchos::REDUCE_SUM, in, Teuchos::outArg(out));
160 ArrayRCP<size_t> rowPtrs;
161 rowPtrs.resize(
rows_.size());
162 for (
size_t i=0; i<Teuchos::as<size_t>(
rows_.size()); i++)
163 rowPtrs[i] =
rows_[i];
165 graph->fillComplete();
190#define MUELU_LWGRAPH_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Exception throws when you call an unimplemented method of MueLu.
MueLu representation of a graph.
Lightweight MueLu representation of a compressed row storage graph.
Xpetra::global_size_t GetGlobalNumEdges() const
Return number of global edges in the graph.
void SetBoundaryNodeMap(RCP< const Map > const &)
const ArrayRCP< const bool > GetBoundaryNodeMap() const
Returns map with global ids of boundary nodes.
const ArrayRCP< const LO > rows_
Indices into columns_ array. Part of local graph information.
size_t GetNodeNumVertices() const
Return number of vertices owned by the calling node.
void SetBoundaryNodeMap(const ArrayRCP< const bool > &bndry)
Set boolean array indicating which rows correspond to Dirichlet boundaries.
const RCP< const Map > domainMap_
Graph maps.
const RCP< const Map > GetImportMap() const
Returns overlapping import map (nodes).
Teuchos::ArrayView< const LO > getNeighborVertices(LO i) const
Return the list of vertices adjacent to the vertex 'v'.
const ArrayRCP< const LO > columns_
Columns corresponding to connections. Part of local graph information.
const std::string objectLabel_
Name of this graph.
size_t getLocalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
RCP< CrsGraph > GetCrsGraph() const
const ArrayRCP< const LO > getEntries() const
Return the list entries in the local graph.
const RCP< const Map > GetDomainMap() const
LWGraph(const ArrayRCP< const LO > &rowPtrs, const ArrayRCP< const LO > &colPtrs, const RCP< const Map > &domainMap, const RCP< const Map > &importMap, const std::string &objectLabel="")
LWGraph constructor.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the Graph with some verbosity level to an FancyOStream object.
bool isLocalNeighborVertex(LO i) const
Return true if vertex with local id 'v' is on current process.
const Map & domainMapRef_
std::string description() const
Return a simple one-line description of the Graph.
const ArrayRCP< const LO > getRowPtrs() const
Return the row pointers of the local graph.
ArrayRCP< const bool > dirichletBoundaries_
Boolean array marking Dirichlet rows.
const RCP< const Map > importMap_
const RCP< const Teuchos::Comm< int > > GetComm() const
size_t GetNodeNumEdges() const
Return number of edges owned by the calling node.
Namespace for MueLu classes and methods.
KokkosClassic::DefaultNode::DefaultNodeType DefaultNode