10#ifndef XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
11#define XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
14#include "Xpetra_TpetraCrsGraph.hpp"
19template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
22 size_t maxNumEntriesPerRow,
24 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
28template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
33 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
37template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
41 size_t maxNumEntriesPerRow,
43 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
47template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
53 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
57template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
64 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
68template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
71 const LocalOrdinal blockSize)
72 : mtx_(
Teuchos::rcp(new
Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>(*
toTpetra(graph), blockSize))) {}
75template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
80 const LocalOrdinal blockSize)
84template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
91 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
95template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
102 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
106template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
114 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
118template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
126 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
130template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
137template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
142 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
146template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
151 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
155template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
160 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in" + std::string(__FILE__) +
":" + std::to_string(__LINE__));
164template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
172template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
176 mtx_->setAllToScalar(alpha);
180template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
182 scale(
const Scalar &alpha) {
183 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
188template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
191 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
195template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
198 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
202template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
207 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
211template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
214 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
222template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
228template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
236template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
242template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
246 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
249template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
256 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
263template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
271template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
279template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
286 RCP<G_t> t_graph = Teuchos::rcp_const_cast<G_t>(Teuchos::rcpFromRef(mtx_->getCrsGraph()));
291template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
296 return mtx_->getGlobalNumRows();
299template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
304 return mtx_->getGlobalNumCols();
307template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
312 return mtx_->getLocalNumRows();
315template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
320 return mtx_->getLocalNumCols();
323template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
328 return mtx_->getGlobalNumEntries();
331template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
336 return mtx_->getLocalNumEntries();
339template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
344 return mtx_->getNumEntriesInLocalRow(localRow);
347template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
352 return mtx_->getNumEntriesInGlobalRow(globalRow);
355template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
357 XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalMaxNumRowEntries");
358 return mtx_->getGlobalMaxNumRowEntries();
361template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
364 return mtx_->getLocalMaxNumRowEntries();
367template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
370 return mtx_->isLocallyIndexed();
373template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
376 return mtx_->isGloballyIndexed();
379template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
382 return mtx_->isFillComplete();
385template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
391template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
394 return mtx_->getFrobeniusNorm();
397template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
400 return mtx_->supportsRowViews();
403template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
408 size_t &NumEntries)
const {
413 mtx_->getLocalRowCopy(LocalRow, indices, values, NumEntries);
414 for (
size_t i = 0; i < NumEntries; ++i) {
415 Indices[i] = indices(i);
416 Values[i] = values(i);
419template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
432template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
446template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
451 size_t &NumEntries)
const {
456 mtx_->getGlobalRowCopy(GlobalRow, indices, values, NumEntries);
457 for (
size_t i = 0; i < NumEntries; ++i) {
458 Indices[i] = indices(i);
459 Values[i] = values(i);
463template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
467template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
478template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
485 bool sumInterfaceValues,
489template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
494 return toXpetra(mtx_->getDomainMap());
497template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
502 return toXpetra(mtx_->getRangeMap());
505template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
510 return mtx_->description();
513template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
518 mtx_->describe(out, verbLevel);
521template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
526 mtx_->setObjectLabel(objectLabel);
529template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
536 "Xpetra::TpetraBlockCrsMatrix.getLocalDiagCopy() only accept Xpetra::TpetraVector as input arguments.");
537 mtx_->getLocalDiagCopy(*tDiag.getTpetra_Vector());
541template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
545 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
549template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
552 const Kokkos::View<const size_t *, typename Node::device_type, Kokkos::MemoryUnmanaged> &offsets)
const {
553 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
556template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
561 const size_t lclNumRows = mtx_->getGraph()->getLocalNumRows();
562 if (
static_cast<size_t>(offsets.
size()) < lclNumRows) {
563 offsets.
resize(lclNumRows);
569 typedef typename Node::device_type device_type;
570 typedef typename device_type::memory_space memory_space;
571 if (std::is_same<memory_space, Kokkos::HostSpace>::value) {
575 typedef Kokkos::View<size_t *, device_type, Kokkos::MemoryUnmanaged> output_type;
577 mtx_->getLocalDiagOffsets(offsetsOut);
579 Kokkos::View<size_t *, device_type> offsetsTmp(
"diagOffsets", offsets.
size());
580 mtx_->getLocalDiagOffsets(offsetsTmp);
581 typedef Kokkos::View<size_t *, Kokkos::HostSpace, Kokkos::MemoryUnmanaged> output_type;
583 Kokkos::deep_copy(offsetsOut, offsetsTmp);
587template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
590 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix::replaceDiag: function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
593template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
596 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
599template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
602 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
605template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
614template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
618 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
622template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
626 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
630template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
634 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
638template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
642 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
645template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
648 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
651template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
654 return !mtx_.is_null();
657template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
662template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
670template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
680template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
684 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
693template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
697 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
700 typename local_matrix_type::host_mirror_type ret;
706template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
708 setAllValues(
const typename local_matrix_type::row_map_type &ptr,
709 const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind,
710 const typename local_matrix_type::values_type &val) {
711 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) +
":" + std::to_string(__LINE__));
#define XPETRA_MONITOR(funcName)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void resize(const size_type n, const T &val=T())
virtual void setObjectLabel(const std::string &objectLabel)
void getLocalRowView(LocalOrdinal LocalRow, local_inds_host_view_type &indices, values_host_view_type &values) const override
void getGlobalRowView(GlobalOrdinal GlobalRow, global_inds_host_view_type &indices, values_host_view_type &values) const override
KokkosSparse::CrsMatrix< impl_scalar_type, LocalOrdinal, execution_space, void, typename local_graph_type::size_type > local_matrix_type
The specialization of Kokkos::CrsMatrix that represents the part of the sparse matrix on each MPI pro...
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying fixed number of entries for each row (not implemented)
local_matrix_type getLocalMatrixDevice() const
void setObjectLabel(const std::string &objectLabel)
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
std::string description() const
A simple one-line description of this object.
virtual bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
size_t getLocalNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix.
typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type local_matrix_type
void allocateAllValues(size_t numNonZeros, ArrayRCP< size_t > &rowptr, ArrayRCP< LocalOrdinal > &colind, ArrayRCP< Scalar > &values)
Allocates and returns ArrayRCPs of the Crs arrays — This is an Xpetra-only routine.
void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calli...
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
local_matrix_type::host_mirror_type getLocalMatrixHost() const
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale operator with given vector values.
void getAllValues(ArrayRCP< const size_t > &rowptr, ArrayRCP< const LocalOrdinal > &colind, ArrayRCP< const Scalar > &values) const
Gets the 1D pointer arrays of the graph (not implemented)
size_t getLocalNumRows() const
Returns the number of matrix rows owned on the calling node.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
bool hasMatrix() const
Does this have an underlying matrix.
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
void setAllValues(const ArrayRCP< size_t > &rowptr, const ArrayRCP< LocalOrdinal > &colind, const ArrayRCP< Scalar > &values)
Sets the 1D pointer arrays of the graph (not impelmented)
void replaceDiag(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag)
Replace the diagonal entries of the matrix.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale operator with given vector values.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
void apply(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=ScalarTraits< Scalar >::one(), Scalar beta=ScalarTraits< Scalar >::zero()) const
Computes the sparse matrix-multivector multiplication.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this operator. This will be null until fillComplete() i...
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the range of this operator, which must be compatible with Y....
virtual ~TpetraBlockCrsMatrix()
Destructor.
size_t getLocalNumEntries() const
Returns the local number of entries in this matrix.
void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete, specifying domain and range maps.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
void resumeFill(const RCP< ParameterList > ¶ms=null)
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView< GlobalOrdinal > &indices, const ArrayView< Scalar > &values, size_t &numEntries) const
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.
void expertStaticFillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &importer=Teuchos::null, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > &exporter=Teuchos::null, const RCP< ParameterList > ¶ms=Teuchos::null)
Expert static fill complete.
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
bool isFillActive() const
Returns true if the matrix is in edit mode.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
void replaceDomainMapAndImporter(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newDomainMap, Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &newImporter)
Replaces the current domainMap and importer with the user-specified objects.
size_t getLocalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of global indices in a specified row of the matrix.
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of local indices in a specified row of the matrix.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toXpetra(RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > graph)
size_t global_size_t
Global size_t object.
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
CombineMode
Xpetra::Combine Mode enumerable type.