10#ifndef MUELU_AGGREGATIONSTRUCTUREDALGORITHM_DECL_HPP_
11#define MUELU_AGGREGATIONSTRUCTUREDALGORITHM_DECL_HPP_
17#include "Xpetra_Vector.hpp"
23#include "MueLu_LWGraph.hpp"
24#include "MueLu_LWGraph_kokkos.hpp"
49#undef MUELU_AGGREGATIONSTRUCTUREDALGORITHM_SHORT
55 using size_type =
typename local_graph_type::size_type;
59 using memory_space =
typename local_graph_type::device_type::memory_space;
61 using LOVectorView =
decltype(std::declval<LOVector>().getLocalViewDevice(Tpetra::Access::ReadWrite));
83 LO& numNonAggregatedNodes)
const;
88 RCP<CrsGraph>& myGraph, RCP<const Map>& coarseCoordinatesFineMap,
89 RCP<const Map>& coarseCoordinatesMap)
const;
97 LO& numNonAggregatedNodes)
const;
102 RCP<IndexManager_kokkos>& geoData,
103 const LO dofsPerNode,
104 RCP<CrsGraph>& myGraph)
const;
107 std::string
description()
const {
return "Aggretation: structured algorithm"; }
118 Kokkos::View<unsigned*, device_type> aggStat,
122 KOKKOS_INLINE_FUNCTION
123 void operator()(
const LO nodeIdx, LO& lNumAggregatedNodes)
const;
138 const LO numGhostedNodes,
const LO dofsPerNode,
143 KOKKOS_INLINE_FUNCTION
158 const LO dofsPerNode,
159 const int numInterpolationPoints,
const LO numLocalRows,
163 KOKKOS_INLINE_FUNCTION
164 void operator()(
const LO rowIdx, GO& update,
const bool final)
const;
181 const int numDimensions,
182 const LO numGhostedNodes,
const LO dofsPerNode,
183 const int numInterpolationPoints,
189 KOKKOS_INLINE_FUNCTION
196 const LO dofsPerNode,
const int numInterpolationPoints,
197 ArrayRCP<size_t>& nnzOnRow, Array<size_t>& rowPtr,
198 Array<LO>& colIndex)
const;
201 const LO dofsPerNode,
const int numInterpolationPoints,
202 ArrayRCP<size_t>& nnzOnRow, Array<size_t>& rowPtr,
203 Array<LO>& colIndex)
const;
208#define MUELU_AGGREGATIONSTRUCTUREDALGORITHM_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Container class for aggregation information.
Pure virtual base class for all MueLu aggregation algorithms.
Kokkos::View< unsigned *, typename LWGraphHostType::device_type > AggStatHostType
Kokkos::View< unsigned *, typename LWGraphType::device_type > AggStatType
Algorithm for coarsening a graph with structured aggregation.
decltype(std::declval< LOVector >().getLocalViewDevice(Tpetra::Access::ReadWrite)) LOVectorView
void ComputeGraphDataConstant(const LWGraph &graph, RCP< IndexManager > &geoData, const LO dofsPerNode, const int numInterpolationPoints, ArrayRCP< size_t > &nnzOnRow, Array< size_t > &rowPtr, Array< LO > &colIndex) const
void BuildGraph(const LWGraph_kokkos &graph, RCP< IndexManager_kokkos > &geoData, const LO dofsPerNode, RCP< CrsGraph > &myGraph) const
Build a CrsGraph instead of aggregates.
std::string description() const
Return a simple one-line description of this object.
void ComputeGraphDataLinear(const LWGraph &graph, RCP< IndexManager > &geoData, const LO dofsPerNode, const int numInterpolationPoints, ArrayRCP< size_t > &nnzOnRow, Array< size_t > &rowPtr, Array< LO > &colIndex) const
typename Kokkos::View< const int[3], device_type > constIntTupleView
typename local_graph_type::device_type::execution_space execution_space
typename LWGraph_kokkos::local_graph_type local_graph_type
typename Kokkos::View< const LO[3], device_type > constLOTupleView
void BuildAggregatesNonKokkos(const Teuchos::ParameterList ¶ms, const LWGraph &graph, Aggregates &aggregates, typename AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node >::AggStatHostType &aggStat, LO &numNonAggregatedNodes) const
Local aggregation.
typename local_graph_type::device_type device_type
typename local_graph_type::row_map_type::non_const_type non_const_row_map_type
typename local_graph_type::size_type size_type
AggregationStructuredAlgorithm(const RCP< const FactoryBase > &=Teuchos::null)
Constructor.
void BuildAggregates(const Teuchos::ParameterList ¶ms, const LWGraph_kokkos &graph, Aggregates &aggregates, typename AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node >::AggStatType &aggStat, LO &numNonAggregatedNodes) const
Build aggregates object.
void BuildGraphOnHost(const LWGraph &graph, RCP< IndexManager > &geoData, const LO dofsPerNode, RCP< CrsGraph > &myGraph, RCP< const Map > &coarseCoordinatesFineMap, RCP< const Map > &coarseCoordinatesMap) const
Local aggregation.
typename local_graph_type::device_type::memory_space memory_space
typename local_graph_type::entries_type entries_type
virtual ~AggregationStructuredAlgorithm()
Destructor.
Container class for mesh layout and indices calculation.
typename std::conditional< OnHost, typename local_graph_device_type::HostMirror, local_graph_device_type >::type local_graph_type
Lightweight MueLu representation of a compressed row storage graph.
Lightweight MueLu representation of a compressed row storage graph.
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
non_const_row_map_type rowPtr_
KOKKOS_INLINE_FUNCTION void operator()(const LO nodeIdx) const
constIntTupleView coarseRate_
constLOTupleView lFineNodesPerDir_
constIntTupleView endRate_
const int numGhostedNodes_
IndexManager_kokkos geoData_
IndexManager_kokkos geoData_
constIntTupleView endRate_
const int numInterpolationPoints_
const int numGhostedNodes_
KOKKOS_INLINE_FUNCTION void operator()(const LO nodeIdx) const
constIntTupleView coarseRate_
constLOTupleView lFineNodesPerDir_
constLOTupleView ghostedNodesPerDir_
non_const_row_map_type rowPtr_
IndexManager_kokkos geoData_
constLOTupleView lFineNodesPerDir_
const int numInterpolationPoints_
non_const_row_map_type rowPtr_
constIntTupleView coarseRate_
KOKKOS_INLINE_FUNCTION void operator()(const LO rowIdx, GO &update, const bool final) const
KOKKOS_INLINE_FUNCTION void operator()(const LO nodeIdx, LO &lNumAggregatedNodes) const
IndexManager_kokkos geoData_
LOVectorView vertex2AggID_
Kokkos::View< unsigned *, device_type > aggStat_