MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost > Class Template Reference

#include <MueLu_LWGraphBase.hpp>

Public Types

using local_ordinal_type = LocalOrdinal
 
using global_ordinal_type = GlobalOrdinal
 
using map_type = Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >
 
using crs_graph_type = Xpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >
 
using size_type = size_t
 
using device_type = typename std::conditional< OnHost, Kokkos::Device< Kokkos::Serial, Kokkos::HostSpace >, typename Node::device_type >::type
 
using execution_space = typename device_type::execution_space
 
using memory_space = typename device_type::memory_space
 
using local_graph_device_type = Kokkos::StaticCrsGraph< LocalOrdinal, Kokkos::LayoutLeft, typename Node::device_type, void, size_t >
 
using local_graph_type = typename std::conditional< OnHost, typename local_graph_device_type::HostMirror, local_graph_device_type >::type
 
using boundary_nodes_type = Kokkos::View< bool *, memory_space >
 
using row_type = typename local_graph_type::row_map_type
 
using entries_type = typename local_graph_type::entries_type
 
using neighbor_vertices_type = Kokkos::GraphRowViewConst< local_graph_type >
 

Public Member Functions

const RCP< const Teuchos::Comm
< int > > 
GetComm () const
 
const RCP< const Map > GetDomainMap () const
 
const RCP< const Map > GetImportMap () const
 Return overlapping import map (nodes). More...
 
KOKKOS_INLINE_FUNCTION size_type GetNodeNumVertices () const
 Return number of graph vertices. More...
 
KOKKOS_INLINE_FUNCTION size_type GetNodeNumEdges () const
 Return number of graph edges. More...
 
Xpetra::global_size_t GetGlobalNumEdges () const
 Return global number of graph edges. More...
 
KOKKOS_INLINE_FUNCTION size_type getLocalMaxNumRowEntries () const
 Returns the maximum number of entries across all rows/columns on this node. More...
 
KOKKOS_INLINE_FUNCTION
neighbor_vertices_type 
getNeighborVertices (LO i) const
 Return the list of vertices adjacent to the vertex 'v'. More...
 
Teuchos::ArrayView< LOgetNeighborVertices_av (LO i) const
 Return the list of vertices adjacent to the vertex 'v'. More...
 
KOKKOS_INLINE_FUNCTION bool isLocalNeighborVertex (LO i) const
 Return true if vertex with local id 'v' is on current process. More...
 
KOKKOS_INLINE_FUNCTION row_type getRowPtrs () const
 Return the row pointers of the local graph. More...
 
KOKKOS_INLINE_FUNCTION entries_type getEntries () const
 Return the list entries in the local graph. More...
 
KOKKOS_INLINE_FUNCTION void SetBoundaryNodeMap (const boundary_nodes_type bndry)
 Set boolean array indicating which rows correspond to Dirichlet boundaries. More...
 
KOKKOS_INLINE_FUNCTION const
boundary_nodes_type 
GetBoundaryNodeMap () const
 Returns map with global ids of boundary nodes. More...
 
std::string description () const
 Return a simple one-line description of the Graph. More...
 
void print (Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
 Print the Graph with some verbosity level to an FancyOStream object. More...
 
local_graph_typegetGraph () const
 
RCP< crs_graph_typeGetCrsGraph () const
 
const std::string & getObjectLabel () const
 

Private Attributes

local_graph_type graph_
 Underlying graph (with label) More...
 
RCP< const map_typedomainMap_
 Graph maps. More...
 
RCP< const map_typeimportMap_
 
std::string objectLabel_
 Name of this graph. More...
 
boundary_nodes_type dirichletBoundaries_
 Boolean array marking Dirichlet rows. More...
 
LO minLocalIndex_
 Local index boundaries (cached from domain map) More...
 
LO maxLocalIndex_
 
size_type maxNumRowEntries_
 

Constructors/Destructors.

void setup (const local_graph_type &graph, const RCP< const map_type > &domainMap, const RCP< const map_type > &importMap, const std::string &objectLabel)
 
 LWGraphBase (const local_graph_type &graph, const RCP< const map_type > &domainMap, const RCP< const map_type > &importMap, const std::string &objectLabel="")
 LWGraph constructor. More...
 
 LWGraphBase (const RCP< const crs_graph_type > &graph, const std::string &objectLabel="")
 
 LWGraphBase (const row_type &rows, const entries_type &columns, const RCP< const map_type > &domainMap, const RCP< const map_type > &importMap, const std::string &objectLabel="")
 
 ~LWGraphBase ()=default
 

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
class MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >

Definition at line 72 of file MueLu_LWGraphBase.hpp.

Member Typedef Documentation

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::local_ordinal_type = LocalOrdinal

Definition at line 74 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::global_ordinal_type = GlobalOrdinal

Definition at line 75 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::map_type = Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>

Definition at line 76 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::crs_graph_type = Xpetra::CrsGraph<LocalOrdinal, GlobalOrdinal, Node>

Definition at line 77 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::size_type = size_t

Definition at line 78 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::device_type = typename std::conditional<OnHost, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, typename Node::device_type>::type

Definition at line 82 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::execution_space = typename device_type::execution_space

Definition at line 83 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::memory_space = typename device_type::memory_space

Definition at line 84 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::local_graph_device_type = Kokkos::StaticCrsGraph<LocalOrdinal, Kokkos::LayoutLeft, typename Node::device_type, void, size_t>

Definition at line 89 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::local_graph_type = typename std::conditional<OnHost, typename local_graph_device_type::HostMirror, local_graph_device_type>::type

Definition at line 90 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::boundary_nodes_type = Kokkos::View<bool*, memory_space>

Definition at line 91 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::row_type = typename local_graph_type::row_map_type

Definition at line 92 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::entries_type = typename local_graph_type::entries_type

Definition at line 93 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
using MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::neighbor_vertices_type = Kokkos::GraphRowViewConst<local_graph_type>

Definition at line 94 of file MueLu_LWGraphBase.hpp.

Constructor & Destructor Documentation

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::LWGraphBase ( const local_graph_type graph,
const RCP< const map_type > &  domainMap,
const RCP< const map_type > &  importMap,
const std::string &  objectLabel = "" 
)
inline

LWGraph constructor.

Definition at line 128 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::LWGraphBase ( const RCP< const crs_graph_type > &  graph,
const std::string &  objectLabel = "" 
)
inline

Definition at line 135 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::LWGraphBase ( const row_type rows,
const entries_type columns,
const RCP< const map_type > &  domainMap,
const RCP< const map_type > &  importMap,
const std::string &  objectLabel = "" 
)
inline

Definition at line 160 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::~LWGraphBase ( )
default

Member Function Documentation

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
void MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::setup ( const local_graph_type graph,
const RCP< const map_type > &  domainMap,
const RCP< const map_type > &  importMap,
const std::string &  objectLabel 
)
inlineprivate

Definition at line 103 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
const RCP<const Teuchos::Comm<int> > MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetComm ( ) const
inline

Definition at line 172 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
const RCP<const Map> MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetDomainMap ( ) const
inline

Definition at line 175 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
const RCP<const Map> MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetImportMap ( ) const
inline

Return overlapping import map (nodes).

Definition at line 179 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION size_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetNodeNumVertices ( ) const
inline

Return number of graph vertices.

Definition at line 184 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION size_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetNodeNumEdges ( ) const
inline

Return number of graph edges.

Definition at line 189 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
Xpetra::global_size_t MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetGlobalNumEdges ( ) const
inline

Return global number of graph edges.

Definition at line 194 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION size_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::getLocalMaxNumRowEntries ( ) const
inline

Returns the maximum number of entries across all rows/columns on this node.

Definition at line 201 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION neighbor_vertices_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::getNeighborVertices ( LO  i) const
inline

Return the list of vertices adjacent to the vertex 'v'.

Definition at line 206 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
Teuchos::ArrayView<LO> MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::getNeighborVertices_av ( LO  i) const
inline

Return the list of vertices adjacent to the vertex 'v'.

Definition at line 212 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION bool MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::isLocalNeighborVertex ( LO  i) const
inline

Return true if vertex with local id 'v' is on current process.

Definition at line 219 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION row_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::getRowPtrs ( ) const
inline

Return the row pointers of the local graph.

Definition at line 224 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION entries_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::getEntries ( ) const
inline

Return the list entries in the local graph.

Definition at line 229 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION void MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::SetBoundaryNodeMap ( const boundary_nodes_type  bndry)
inline

Set boolean array indicating which rows correspond to Dirichlet boundaries.

Definition at line 234 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
KOKKOS_INLINE_FUNCTION const boundary_nodes_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetBoundaryNodeMap ( ) const
inline

Returns map with global ids of boundary nodes.

Definition at line 239 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
std::string MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::description ( ) const
inline

Return a simple one-line description of the Graph.

Definition at line 244 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
void MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::print ( Teuchos::FancyOStream out,
const VerbLevel  verbLevel = Default 
) const
inline

Print the Graph with some verbosity level to an FancyOStream object.

Definition at line 249 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
local_graph_type& MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::getGraph ( ) const
inline

Definition at line 281 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
RCP<crs_graph_type> MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::GetCrsGraph ( ) const
inline

Definition at line 285 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
const std::string& MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::getObjectLabel ( ) const
inline

Definition at line 301 of file MueLu_LWGraphBase.hpp.

Member Data Documentation

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
local_graph_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::graph_
mutableprivate

Underlying graph (with label)

Definition at line 307 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
RCP<const map_type> MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::domainMap_
private

Graph maps.

Definition at line 310 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
RCP<const map_type> MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::importMap_
private

Definition at line 311 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
std::string MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::objectLabel_
private

Name of this graph.

Definition at line 314 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
boundary_nodes_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::dirichletBoundaries_
private

Boolean array marking Dirichlet rows.

Definition at line 317 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
LO MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::minLocalIndex_
private

Local index boundaries (cached from domain map)

Definition at line 320 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
LO MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::maxLocalIndex_
private

Definition at line 320 of file MueLu_LWGraphBase.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node, bool OnHost>
size_type MueLu::LWGraphBase< LocalOrdinal, GlobalOrdinal, Node, OnHost >::maxNumRowEntries_
private

Definition at line 321 of file MueLu_LWGraphBase.hpp.


The documentation for this class was generated from the following file: