46 #ifndef XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP 47 #define XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP 55 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
58 size_t maxNumEntriesPerRow,
59 const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
61 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
66 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
69 const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc,
70 const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
72 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
77 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
81 size_t maxNumEntriesPerRow,
82 const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
84 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
89 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
93 const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc,
94 const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
96 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
101 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
104 const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
108 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
113 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
116 const LocalOrdinal blockSize)
117 : mtx_(Teuchos::rcp(new Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>(*
toTpetra(graph), blockSize)))
122 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
124 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
128 const Teuchos::RCP<Teuchos::ParameterList>& params)
130 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
135 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
137 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
141 const Teuchos::RCP<Teuchos::ParameterList>& params)
143 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
148 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
150 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
155 const Teuchos::RCP<Teuchos::ParameterList>& params)
157 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
162 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
164 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
169 const Teuchos::RCP<Teuchos::ParameterList>& params)
171 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
176 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
185 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
189 const ArrayView< const GlobalOrdinal > &cols,
190 const ArrayView< const Scalar > &vals)
192 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
197 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
201 const ArrayView< const LocalOrdinal > &cols,
202 const ArrayView< const Scalar > &vals)
204 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
209 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
213 const ArrayView< const GlobalOrdinal > &cols,
214 const ArrayView< const Scalar > &vals)
216 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in"+std::string(__FILE__)+
":"+std::to_string(__LINE__));
221 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
224 replaceLocalValues (LocalOrdinal localRow,
const ArrayView<const LocalOrdinal> &cols,
const ArrayView<const Scalar> &vals)
227 mtx_->replaceLocalValues(localRow,cols.getRawPtr(),vals.getRawPtr(),cols.size());
232 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
237 XPETRA_MONITOR(
"TpetraBlockCrsMatrix::setAllToScalar"); mtx_->setAllToScalar(alpha);
242 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
247 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
253 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
256 allocateAllValues(
size_t numNonZeros,ArrayRCP<size_t> & rowptr, ArrayRCP<LocalOrdinal> & colind, ArrayRCP<Scalar> & values)
258 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
263 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
266 setAllValues(
const ArrayRCP<size_t> & rowptr,
const ArrayRCP<LocalOrdinal> & colind,
const ArrayRCP<Scalar> & values)
268 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
273 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
277 ArrayRCP<const LocalOrdinal>& colind,
278 ArrayRCP<const Scalar>& values)
const 280 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
284 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
289 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
300 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
309 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
314 const RCP< ParameterList > ¶ms)
320 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
329 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
335 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
339 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
346 const RCP<ParameterList> ¶ms)
348 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
357 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
358 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
366 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
367 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
375 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
376 RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> >
380 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
384 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
388 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalNumRows");
return mtx_->getGlobalNumRows(); }
391 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
395 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalNumCols");
return mtx_->getGlobalNumCols(); }
398 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
402 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeNumRows");
return mtx_->getNodeNumRows(); }
405 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
409 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeNumCols");
return mtx_->getNodeNumCols(); }
412 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
416 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalNumEntries");
return mtx_->getGlobalNumEntries(); }
419 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
423 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeNumEntries");
return mtx_->getNodeNumEntries(); }
426 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
430 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNumEntriesInLocalRow");
return mtx_->getNumEntriesInLocalRow(localRow); }
433 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
437 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNumEntriesInGlobalRow");
return mtx_->getNumEntriesInGlobalRow(globalRow); }
440 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
442 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalMaxNumRowEntries");
return mtx_->getGlobalMaxNumRowEntries(); }
445 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
447 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeMaxNumRowEntries");
return mtx_->getNodeMaxNumRowEntries(); }
450 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
452 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isLocallyIndexed");
return mtx_->isLocallyIndexed(); }
455 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
457 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isGloballyIndexed");
return mtx_->isGloballyIndexed(); }
460 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
462 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isFillComplete");
return mtx_->isFillComplete(); }
465 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
467 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isFillActive");
return false; }
470 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
472 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getFrobeniusNorm");
return mtx_->getFrobeniusNorm(); }
475 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
477 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::supportsRowViews");
return mtx_->supportsRowViews(); }
480 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
484 const ArrayView< LocalOrdinal > &Indices,
485 const ArrayView< Scalar > &Values,
486 size_t &NumEntries)
const 489 typename Tpetra::CrsGraph<LocalOrdinal,GlobalOrdinal,Node>::nonconst_local_inds_host_view_type indices(
"indices",Indices.size());
490 typename Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node>::nonconst_values_host_view_type values(
"values", Values.size());
492 mtx_->getLocalRowCopy(LocalRow, indices, values, NumEntries);
493 for (
size_t i=0;i<NumEntries; ++i) {
494 Indices[i]=indices(i);
498 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
502 ArrayView< const Scalar > &Values)
const 505 typename Tpetra::CrsGraph<LocalOrdinal,GlobalOrdinal,Node>::local_inds_host_view_type indices;
506 typename Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node>::values_host_view_type values;
508 mtx_->getLocalRowView(LocalRow, indices, values);
509 Indices = ArrayView<const LocalOrdinal> (indices.data(), indices.extent(0));
510 Values = ArrayView<const Scalar> (
reinterpret_cast<const Scalar*
>(values.data()), values.extent(0));
514 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
518 ArrayView< const GlobalOrdinal > &Indices,
519 ArrayView< const Scalar > &Values)
const 522 typename Tpetra::CrsGraph<LocalOrdinal,GlobalOrdinal,Node>::global_inds_host_view_type indices;
523 typename Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node>::values_host_view_type values;
525 mtx_->getGlobalRowView(GlobalRow, indices, values);
526 Indices = ArrayView<const GlobalOrdinal> (indices.data(), indices.extent(0));
527 Values = ArrayView<const Scalar> (
reinterpret_cast<const Scalar*
>(values.data()), values.extent(0));
531 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
535 const ArrayView< GlobalOrdinal > &Indices,
536 const ArrayView< Scalar > &Values,
537 size_t &NumEntries)
const 540 typename Tpetra::CrsGraph<LocalOrdinal,GlobalOrdinal,Node>::nonconst_global_inds_host_view_type indices(
"indices",Indices.size());
541 typename Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node>::nonconst_values_host_view_type values(
"values", Values.size());
543 mtx_->getGlobalRowCopy(GlobalRow, indices, values, NumEntries);
544 for (
size_t i=0;i<NumEntries; ++i) {
545 Indices[i]=indices(i);
551 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
558 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
562 Teuchos::ETransp mode,
567 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
571 Teuchos::ETransp mode,
574 bool sumInterfaceValues,
576 const Teuchos::ArrayRCP<LocalOrdinal>& regionInterfaceLIDs)
const 580 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
581 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
587 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
588 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
594 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
598 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::description");
return mtx_->description(); }
601 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
605 const Teuchos::EVerbosityLevel verbLevel)
const 608 mtx_->describe(out, verbLevel);
612 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
618 Teuchos::LabeledObject::setObjectLabel(objectLabel);
619 mtx_->setObjectLabel(objectLabel);
624 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
633 "Xpetra::TpetraBlockCrsMatrix.getLocalDiagCopy() only accept Xpetra::TpetraVector as input arguments.");
634 mtx_->getLocalDiagCopy(*tDiag.getTpetra_Vector());
639 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
643 const Teuchos::ArrayView<const size_t> &offsets)
const 645 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
650 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
657 const size_t lclNumRows = mtx_->getGraph()->getNodeNumRows();
658 if (static_cast<size_t>(offsets.size()) < lclNumRows)
660 offsets.resize(lclNumRows);
666 typedef typename Node::device_type device_type;
667 typedef typename device_type::memory_space memory_space;
668 if (std::is_same<memory_space, Kokkos::HostSpace>::value)
673 typedef Kokkos::View<size_t*, device_type, Kokkos::MemoryUnmanaged> output_type;
674 output_type offsetsOut (offsets.getRawPtr(), offsets.size());
675 mtx_->getLocalDiagOffsets(offsetsOut);
679 Kokkos::View<size_t*, device_type> offsetsTmp (
"diagOffsets", offsets.size());
680 mtx_->getLocalDiagOffsets(offsetsTmp);
681 typedef Kokkos::View<size_t*, Kokkos::HostSpace, Kokkos::MemoryUnmanaged> output_type;
682 output_type offsetsOut(offsets.getRawPtr(), offsets.size());
683 Kokkos::deep_copy(offsetsOut, offsetsTmp);
688 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
693 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix::replaceDiag: function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
697 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
702 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
706 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
711 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
715 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
716 Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
725 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
731 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
736 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
742 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
747 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
753 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
758 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
764 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
768 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
773 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
777 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
782 return !mtx_.is_null();
786 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
788 TpetraBlockCrsMatrix(
const Teuchos::RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > &mtx)
793 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
794 RCP<const Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
803 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
804 RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
811 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 812 #ifdef HAVE_XPETRA_TPETRA 817 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
822 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__));
825 local_matrix_type ret;
828 TEUCHOS_UNREACHABLE_RETURN(ret);
831 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
832 typename CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node>::local_matrix_type::HostMirror
833 TpetraBlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node>::
834 getLocalMatrixHost ()
const 836 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__));
839 typename local_matrix_type::HostMirror ret;
842 TEUCHOS_UNREACHABLE_RETURN(ret);
846 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
849 setAllValues (
const typename local_matrix_type::row_map_type& ptr,
850 const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
851 const typename local_matrix_type::values_type& val)
853 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__));
856 #endif // HAVE_XPETRA_TPETRA 857 #endif // HAVE_XPETRA_KOKKOS_REFACTOR 860 #ifdef HAVE_XPETRA_EPETRA 862 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 863 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 867 template <
class Scalar>
869 :
public CrsMatrix<Scalar,int,int,EpetraNode>
916 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
920 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
924 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
928 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
932 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
937 const Teuchos::RCP<Teuchos::ParameterList>& params)
941 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
946 const Teuchos::RCP<Teuchos::ParameterList>& params)
982 void allocateAllValues(
size_t numNonZeros,ArrayRCP<size_t> & rowptr, ArrayRCP<LocalOrdinal> & colind, ArrayRCP<Scalar> & values)
986 void setAllValues(
const ArrayRCP<size_t> & rowptr,
const ArrayRCP<LocalOrdinal> & colind,
const ArrayRCP<Scalar> & values)
990 void getAllValues(ArrayRCP<const size_t>& rowptr, ArrayRCP<const LocalOrdinal>& colind, ArrayRCP<const Scalar>& values)
const 1019 const RCP<ParameterList> ¶ms=Teuchos::null)
1026 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getRowMap()
const {
return Teuchos::null; }
1029 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getColMap()
const {
return Teuchos::null; }
1032 RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> >
getCrsGraph()
const 1033 {
return Teuchos::null;}
1078 typename ScalarTraits< Scalar >::magnitudeType
getFrobeniusNorm()
const {
return Teuchos::ScalarTraits<Scalar>::magnitude(Teuchos::ScalarTraits<Scalar>::zero()); }
1084 void getLocalRowCopy(
LocalOrdinal LocalRow,
const ArrayView< LocalOrdinal > &Indices,
const ArrayView< Scalar > &Values,
size_t &NumEntries)
const { }
1102 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 { }
1105 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getDomainMap()
const {
return Teuchos::null; }
1108 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getRangeMap()
const {
return Teuchos::null; }
1117 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const { }
1142 Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getMap()
const {
return Teuchos::null; }
1175 TpetraBlockCrsMatrix(
const Teuchos::RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > &mtx) {
1180 RCP<const Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
getTpetra_BlockCrsMatrix()
const {
return Teuchos::null; }
1185 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 1186 #ifdef HAVE_XPETRA_TPETRA 1189 local_matrix_type getLocalMatrix ()
const {
1190 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__));
1191 local_matrix_type ret;
1195 void setAllValues (
const typename local_matrix_type::row_map_type& ptr,
1196 const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
1197 const typename local_matrix_type::values_type& val)
1199 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__));
1201 #endif // HAVE_XPETRA_TPETRA 1202 #endif // HAVE_XPETRA_KOKKOS_REFACTOR 1207 #endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) 1212 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ 1213 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) 1216 template <
class Scalar>
1218 :
public CrsMatrix<Scalar,int,long long,EpetraNode>
1262 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1266 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
1270 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1274 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
1278 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1283 const Teuchos::RCP<Teuchos::ParameterList>& params)
1287 TpetraBlockCrsMatrix(
const Teuchos::RCP<
const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1292 const Teuchos::RCP<Teuchos::ParameterList>& params)
1326 void allocateAllValues(
size_t numNonZeros,ArrayRCP<size_t> & rowptr, ArrayRCP<LocalOrdinal> & colind, ArrayRCP<Scalar> & values)
1330 void setAllValues(
const ArrayRCP<size_t> & rowptr,
const ArrayRCP<LocalOrdinal> & colind,
const ArrayRCP<Scalar> & values)
1334 void getAllValues(ArrayRCP<const size_t>& rowptr, ArrayRCP<const LocalOrdinal>& colind, ArrayRCP<const Scalar>& values)
const 1364 const RCP<ParameterList> ¶ms=Teuchos::null)
1371 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getRowMap()
const {
return Teuchos::null; }
1374 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getColMap()
const {
return Teuchos::null; }
1377 RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> >
getCrsGraph()
const 1378 {
return Teuchos::null;}
1423 typename ScalarTraits< Scalar >::magnitudeType
getFrobeniusNorm()
const {
return Teuchos::ScalarTraits<Scalar>::magnitude(Teuchos::ScalarTraits<Scalar>::zero()); }
1429 void getLocalRowCopy(
LocalOrdinal LocalRow,
const ArrayView< LocalOrdinal > &Indices,
const ArrayView< Scalar > &Values,
size_t &NumEntries)
const { }
1447 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 { }
1450 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getDomainMap()
const {
return Teuchos::null; }
1453 const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getRangeMap()
const {
return Teuchos::null; }
1462 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const { }
1485 Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getMap()
const {
return Teuchos::null; }
1518 TpetraBlockCrsMatrix(
const Teuchos::RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > &mtx) {
1523 RCP<const Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
getTpetra_BlockCrsMatrix()
const {
return Teuchos::null; }
1528 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 1529 #ifdef HAVE_XPETRA_TPETRA 1532 local_matrix_type getLocalMatrix ()
const {
1533 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__));
1534 local_matrix_type ret;
1535 TEUCHOS_UNREACHABLE_RETURN(ret);
1538 void setAllValues (
const typename local_matrix_type::row_map_type& ptr,
1539 const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
1540 const typename local_matrix_type::values_type& val)
1542 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__));
1544 #endif // HAVE_XPETRA_TPETRA 1545 #endif // HAVE_XPETRA_KOKKOS_REFACTOR 1550 #endif // IF ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) 1555 #endif // HAVE_XPETRA_EPETRA 1560 #endif // XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP 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...
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
TpetraBlockCrsMatrix(const TpetraBlockCrsMatrix &matrix)
Deep copy constructor.
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...
TpetraExport< LocalOrdinal, GlobalOrdinal, Node > TpetraExportClass
void fillComplete(const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
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...
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
std::string description() const
A simple one-line description of this object.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
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.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
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...
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale matrix using the given vector entries.
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
TpetraBlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraBlockCrsMatrixClass
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.
std::string description() const
A simple one-line description of this object.
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
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 getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
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.
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 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)
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale operator with given vector values.
void resumeFill(const RCP< ParameterList > ¶ms=null)
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor for a fused import ( not implemented )
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row (not implemented) ...
bool isFillActive() const
Returns true if the matrix is in edit mode.
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale matrix using the given vector entries.
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.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
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.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
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.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row (not implemented) ...
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...
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 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)
void setObjectLabel(const std::string &objectLabel)
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
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.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm 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.
std::string description() const
A simple one-line description of this object.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
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)
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)
void fillComplete(const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete.
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const LocalOrdinal blockSize)
Constructor specifying a previously constructed graph & blocksize.
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
bool isFillActive() const
Returns true if the matrix is in edit mode.
TpetraBlockCrsMatrix(const Teuchos::RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &mtx)
TpetraBlockCrsMatrix constructor to wrap a Tpetra::BlockCrsMatrix object.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraVectorClass
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
bool hasMatrix() const
Does this have an underlying matrix.
void getAllValues(ArrayRCP< Scalar > &values)
Gets the 1D pointer arrays of the graph (not implemented)
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
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)
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
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.
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying column Map and number of entries in each row (not implemented) ...
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
void resumeFill(const RCP< ParameterList > ¶ms=null)
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
~TpetraBlockCrsMatrix()
Destructor.
void replaceDiag(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag)
Replace the diagonal entries of the matrix.
TpetraImport< LocalOrdinal, GlobalOrdinal, Node > TpetraImportClass
TpetraImport< LocalOrdinal, GlobalOrdinal, Node > TpetraImportClass
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row (not implemented) ...
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of 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)
TpetraBlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraBlockCrsMatrixClass
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...
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
bool hasMatrix() const
Does this have an underlying matrix.
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > DomainExporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused export (not implemented(.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
void replaceDiag(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > DomainImporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused import (not implemented)
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.
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale matrix using the given vector entries.
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
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.
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.
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...
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor for a fused export (not implemented(.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag, const Teuchos::ArrayView< const size_t > &offsets) const
Get a copy of the diagonal entries owned by this node, with local row indices.
~TpetraBlockCrsMatrix()
Destructor.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
size_t global_size_t
Global size_t object.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
void getAllValues(ArrayRCP< Scalar > &values)
Gets the 1D pointer arrays of the graph (not implemented)
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...
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.
bool isFillActive() const
Returns true if the matrix is in edit mode.
bool hasMatrix() const
Does this have an underlying matrix.
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
TpetraBlockCrsMatrix(const TpetraBlockCrsMatrix &matrix)
Deep copy constructor.
void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
virtual ~TpetraBlockCrsMatrix()
Destructor.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor for a fused export (not implemented)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying column Map and number of entries in each row (not implemented) ...
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
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.
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag, const Teuchos::ArrayView< const size_t > &offsets) const
Get a copy of the diagonal entries owned by this node, with local row indices.
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying a previously constructed graph ( not implemented )
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale matrix using the given vector entries.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix. ...
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying a previously constructed graph ( not implemented )
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor for a fused import (not implemented)
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
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)
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const LocalOrdinal blockSize)
Constructor specifying a previously constructed graph & blocksize.
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
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.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale operator with given vector values.
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
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.
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
void replaceDiag(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag)
Replace the diagonal entries of the matrix.
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
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.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix. ...
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.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix. ...
CombineMode
Xpetra::Combine Mode enumerable type.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
#define XPETRA_MONITOR(funcName)
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)
TpetraBlockCrsMatrix(const Teuchos::RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &mtx)
TpetraBlockCrsMatrix constructor to wrap a Tpetra::BlockCrsMatrix object.
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...
TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraVectorClass
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 getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > DomainExporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused export (not implemented)
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
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 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)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > DomainImporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused import ( not implemented )
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...
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 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.
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 doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
virtual bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
void resumeFill(const RCP< ParameterList > ¶ms=null)
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...
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row (not implemented) ...
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
TpetraExport< LocalOrdinal, GlobalOrdinal, Node > TpetraExportClass