10 #ifndef TPETRA_FECRSGRAPH_DECL_HPP
11 #define TPETRA_FECRSGRAPH_DECL_HPP
16 #include "Tpetra_ConfigDefs.hpp"
89 template <
class LocalOrdinal,
96 template <
class S,
class LO,
class GO,
class N>
151 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
152 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
153 const size_t maxNumEntriesPerRow,
154 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
155 const Teuchos::RCP<const map_type>& domainMap = Teuchos::null,
156 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
157 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
185 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
186 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
187 const size_t maxNumEntriesPerRow,
188 const Teuchos::RCP<const map_type>& ownedPlusSharedDomainMap,
189 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
190 const Teuchos::RCP<const map_type>& ownedDomainMap = Teuchos::null,
191 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
192 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
217 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
218 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
219 const Kokkos::DualView<const size_t*, device_type>& numEntPerRow,
220 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
221 const Teuchos::RCP<const map_type>& domainMap = Teuchos::null,
222 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
223 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
251 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
252 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
253 const Kokkos::DualView<const size_t*, device_type>& numEntPerRow,
254 const Teuchos::RCP<const map_type>& ownedPlusSharedDomainMap,
255 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
256 const Teuchos::RCP<const map_type>& ownedDomainMap = Teuchos::null,
257 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
258 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
285 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
286 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
287 const Teuchos::RCP<const map_type>& ownedPlusSharedColMap,
288 const size_t maxNumEntriesPerRow,
289 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
290 const Teuchos::RCP<const map_type>& domainMap = Teuchos::null,
291 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
292 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
321 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
322 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
323 const Teuchos::RCP<const map_type>& ownedPlusSharedColMap,
324 const size_t maxNumEntriesPerRow,
325 const Teuchos::RCP<const map_type>& ownedPlusSharedDomainMap,
326 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
327 const Teuchos::RCP<const map_type>& ownedDomainMap = Teuchos::null,
328 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
329 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
354 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
355 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
356 const Teuchos::RCP<const map_type>& ownedPlusSharedColMap,
357 const Kokkos::DualView<const size_t*, device_type>& numEntPerRow,
358 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
359 const Teuchos::RCP<const map_type>& domainMap = Teuchos::null,
360 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
361 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
387 FECrsGraph(
const Teuchos::RCP<const map_type>& ownedRowMap,
388 const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
389 const Teuchos::RCP<const map_type>& ownedPlusSharedColMap,
390 const Kokkos::DualView<const size_t*, device_type>& numEntPerRow,
391 const Teuchos::RCP<const map_type>& ownedPlusSharedDomainMap,
392 const Teuchos::RCP<const import_type>& ownedPlusSharedToOwnedimporter = Teuchos::null,
393 const Teuchos::RCP<const map_type>& ownedDomainMap = Teuchos::null,
394 const Teuchos::RCP<const map_type>& ownedRangeMap = Teuchos::null,
395 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
425 Teuchos::RCP<const Teuchos::ParameterList>
435 void endAssembly(
const Teuchos::RCP<const map_type>& domainMap,
const Teuchos::RCP<const map_type>& rangeMap);
479 const Teuchos::RCP<const map_type>& ownedRangeMap,
480 const Teuchos::RCP<Teuchos::ParameterList>& = Teuchos::null) {
481 ownedDomainMap_ = ownedDomainMap;
482 ownedRangeMap_ = ownedRangeMap;
514 fillComplete(
const Teuchos::RCP<Teuchos::ParameterList>& = Teuchos::null) { endFill(); }
519 void endFill(
const Teuchos::RCP<const map_type>& domainMap,
const Teuchos::RCP<const map_type>& rangeMap);
540 void setup(
const Teuchos::RCP<const map_type>& ownedRowMap,
const Teuchos::RCP<const map_type>& ownedPlusSharedRowMap,
const Teuchos::RCP<const map_type>& ownedPlusSharedColMap,
const Teuchos::RCP<Teuchos::ParameterList>& params);
546 Teuchos::RCP<FE::FillState> fillState_;
549 Teuchos::RCP<CrsGraph<LocalOrdinal, GlobalOrdinal, Node> > inactiveCrsGraph_;
552 Teuchos::RCP<FE::WhichActive> activeCrsGraph_;
555 Teuchos::RCP<const import_type> ownedRowsImporter_;
558 Teuchos::RCP<const map_type> ownedDomainMap_;
561 Teuchos::RCP<const map_type> ownedRangeMap_;
576 const size_t numInputInds);
590 const size_t numInputInds,
591 std::function<
void(
const size_t,
const size_t,
const size_t)> fun =
592 std::function<
void(
const size_t,
const size_t,
const size_t)>());
596 const Teuchos::ArrayView<const local_ordinal_type>& gblColInds,
597 std::function<
void(
const size_t,
const size_t,
const size_t)> fun =
598 std::function<
void(
const size_t,
const size_t,
const size_t)>());
604 #endif // TPETRA_FECRSGRAPH_DECL_HPP
Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distr...
Sparse matrix that presents a row-oriented interface that lets users read or modify entries...
A distributed graph accessed by rows (adjacency lists) and stored sparsely.
KokkosSparse::StaticCrsGraph< local_ordinal_type, Kokkos::LayoutLeft, device_type, void, size_t > local_graph_device_type
The type of the part of the sparse graph on each MPI process.
void endAssembly()
Migrates data to the owned mode.
CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::local_graph_device_type local_graph_device_type
The type of the part of the sparse graph on each MPI process.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
Default parameter list suitable for validation.
CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::device_type device_type
The Kokkos device type.
FECrsGraph(const Teuchos::RCP< const map_type > &ownedRowMap, const Teuchos::RCP< const map_type > &ownedPlusSharedRowMap, const size_t maxNumEntriesPerRow, const Teuchos::RCP< const import_type > &ownedPlusSharedToOwnedimporter=Teuchos::null, const Teuchos::RCP< const map_type > &domainMap=Teuchos::null, const Teuchos::RCP< const map_type > &ownedRangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructorfor globally-indexed assembly specifying a single upper bound for the number of entries in...
Declaration of the Tpetra::CrsGraph class.
Allocation information for a locally owned row in a CrsGraph or CrsMatrix.
FECrsGraph & operator=(const FECrsGraph< LocalOrdinal, GlobalOrdinal, Node > &)=delete
Copy assignment (forbidden).
void fillComplete(const Teuchos::RCP< const map_type > &ownedDomainMap, const Teuchos::RCP< const map_type > &ownedRangeMap, const Teuchos::RCP< Teuchos::ParameterList > &=Teuchos::null)
Tell the graph that you are done changing its structure.
CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::execution_space execution_space
The Kokkos execution space.
Communication plan for data redistribution from a (possibly) multiply-owned to a uniquely-owned distr...
CombineMode
Rule for combining data in an Import or Export.
typename device_type::execution_space execution_space
This class' Kokkos execution space.
size_t insertGlobalIndicesImpl(const local_ordinal_type lclRow, const global_ordinal_type inputGblColInds[], const size_t numInputInds)
Insert global indices, using an input local row index.
void switchActiveCrsGraph()
Switches which CrsGraph is active (without migrating data)
CrsGraph< LocalOrdinal, GlobalOrdinal, Node > crs_graph_type
Parent class.
void fillComplete(const Teuchos::RCP< Teuchos::ParameterList > &=Teuchos::null)
Tell the graph that you are done changing its structure; set default domain and range Maps...
A distributed graph accessed by rows (adjacency lists) and stored sparsely.
A parallel distribution of indices over processes.
Forward declaration of Tpetra::FECrsGraph.
void beginAssembly()
Activates the owned+shared mode for assembly.
typename Node::device_type device_type
This class' Kokkos device type.
LocalOrdinal local_ordinal_type
This class' first template parameter; the type of local indices.
GlobalOrdinal global_ordinal_type
This class' second template parameter; the type of global indices.
Node node_type
This class' Kokkos Node type.
virtual ~FECrsGraph()=default
Destructor (virtual for memory safety of derived classes).