Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra_TpetraBlockCrsMatrix_def.hpp
Go to the documentation of this file.
1 // @HEADER
2 //
3 // ***********************************************************************
4 //
5 // Xpetra: A linear algebra interface package
6 // Copyright 2012 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact
39 // Jonathan Hu (jhu@sandia.gov)
40 // Andrey Prokopenko (aprokop@sandia.gov)
41 // Ray Tuminaro (rstumin@sandia.gov)
42 //
43 // ***********************************************************************
44 //
45 // @HEADER
46 #ifndef XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
47 #define XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
48 
50 
51 namespace Xpetra {
52 
53 
55  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
58  size_t maxNumEntriesPerRow,
59  const Teuchos::RCP< Teuchos::ParameterList > &params)
60  {
61  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
62  }
63 
64 
66  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
69  const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc,
70  const Teuchos::RCP< Teuchos::ParameterList > &params)
71  {
72  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
73  }
74 
75 
77  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
80  const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap,
81  size_t maxNumEntriesPerRow,
82  const Teuchos::RCP< Teuchos::ParameterList > &params)
83  {
84  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
85  }
86 
87 
89  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
92  const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap,
93  const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc,
94  const Teuchos::RCP< Teuchos::ParameterList > &params)
95  {
96  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
97  }
98 
99 
101  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
104  const Teuchos::RCP< Teuchos::ParameterList > &params)
105  // : mtx_(Teuchos::rcp(new Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >(toTpetra(graph), params)))
106  // * there is no Tpetra::BlockCrsMatrix(graph, params) c'tor. We throw anyways here so no need to set mtx_.
107  {
108  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
109  }
110 
111 
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)))
118  { }
119 
120 
122  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
124  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
126  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
127  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
128  const Teuchos::RCP<Teuchos::ParameterList>& params)
129  {
130  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
131  }
132 
133 
135  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
137  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
139  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
140  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
141  const Teuchos::RCP<Teuchos::ParameterList>& params)
142  {
143  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
144  }
145 
146 
148  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
150  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
151  const Import<LocalOrdinal,GlobalOrdinal,Node> & RowImporter,
152  const Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > DomainImporter,
153  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
154  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
155  const Teuchos::RCP<Teuchos::ParameterList>& params)
156  {
157  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
158  }
159 
160 
162  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
164  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
165  const Export<LocalOrdinal,GlobalOrdinal,Node> & RowExporter,
166  const Teuchos::RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > DomainExporter,
167  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
168  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
169  const Teuchos::RCP<Teuchos::ParameterList>& params)
170  {
171  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
172  }
173 
174 
176  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
179 
180 
182 
183 
185  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
186  void
188  insertGlobalValues(GlobalOrdinal globalRow,
189  const ArrayView< const GlobalOrdinal > &cols,
190  const ArrayView< const Scalar > &vals)
191  {
192  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
193  }
194 
195 
197  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
198  void
200  insertLocalValues(LocalOrdinal localRow,
201  const ArrayView< const LocalOrdinal > &cols,
202  const ArrayView< const Scalar > &vals)
203  {
204  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
205  }
206 
207 
209  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
210  void
212  replaceGlobalValues(GlobalOrdinal globalRow,
213  const ArrayView< const GlobalOrdinal > &cols,
214  const ArrayView< const Scalar > &vals)
215  {
216  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
217  }
218 
219 
221  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
222  void
224  replaceLocalValues (LocalOrdinal localRow,const ArrayView<const LocalOrdinal> &cols,const ArrayView<const Scalar> &vals)
225  {
226  XPETRA_MONITOR("TpetraBlockCrsMatrix::replaceLocalValues");
227  mtx_->replaceLocalValues(localRow,cols.getRawPtr(),vals.getRawPtr(),cols.size());
228  }
229 
230 
232  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
233  void
235  setAllToScalar(const Scalar &alpha)
236  {
237  XPETRA_MONITOR("TpetraBlockCrsMatrix::setAllToScalar"); mtx_->setAllToScalar(alpha);
238  }
239 
240 
242  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
243  void
245  scale(const Scalar &alpha)
246  {
247  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
248  }
249 
250 
252  //** \warning This is an expert-only routine and should not be called from user code. (not implemented)
253  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
254  void
256  allocateAllValues(size_t numNonZeros,ArrayRCP<size_t> & rowptr, ArrayRCP<LocalOrdinal> & colind, ArrayRCP<Scalar> & values)
257  {
258  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
259  }
260 
261 
263  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
264  void
266  setAllValues(const ArrayRCP<size_t> & rowptr, const ArrayRCP<LocalOrdinal> & colind, const ArrayRCP<Scalar> & values)
267  {
268  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
269  }
270 
271 
273  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
274  void
276  getAllValues(ArrayRCP<const size_t>& rowptr,
277  ArrayRCP<const LocalOrdinal>& colind,
278  ArrayRCP<const Scalar>& values) const
279  {
280  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
281  }
282 
283 
285 
286  // Transformational Methods
288 
289 
290  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
291  void
293  resumeFill(const RCP< ParameterList > &params)
294  {
295  /*noop*/
296  }
297 
298 
299  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
300  void
303  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap,
304  const RCP< ParameterList > &params)
305  {
306  /*noop*/
307  }
308 
309 
310  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
311  void
313  fillComplete(const RCP< ParameterList > &params)
314  {
315  /*noop*/
316  }
317 
318 
319  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
320  void
323  Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > & newImporter)
324  {
325  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
326  }
327 
328 
329  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
330  void
333  const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & rangeMap,
334  const RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > &importer,
335  const RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > &exporter,
336  const RCP<ParameterList> &params)
337  {
338  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
339  }
340 
342 
343 
345 
346 
347  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
348  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
350  getRowMap() const
351  {
352  XPETRA_MONITOR("TpetraBlockCrsMatrix::getRowMap"); return toXpetra(mtx_->getRowMap());
353  }
354 
355 
356  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
357  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
359  getColMap() const
360  {
361  XPETRA_MONITOR("TpetraBlockCrsMatrix::getColMap"); return toXpetra(mtx_->getColMap());
362  }
363 
364 
365  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
366  RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> >
369  {
370  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
371  }
372 
373 
374  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
378  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getGlobalNumRows"); return mtx_->getGlobalNumRows(); }
379 
380 
381  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
385  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getGlobalNumCols"); return mtx_->getGlobalNumCols(); }
386 
387 
388  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
389  size_t
392  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getNodeNumRows"); return mtx_->getNodeNumRows(); }
393 
394 
395  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
396  size_t
399  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getNodeNumCols"); return mtx_->getNodeNumCols(); }
400 
401 
402  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
406  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getGlobalNumEntries"); return mtx_->getGlobalNumEntries(); }
407 
408 
409  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
410  size_t
413  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getNodeNumEntries"); return mtx_->getNodeNumEntries(); }
414 
415 
416  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
417  size_t
419  getNumEntriesInLocalRow(LocalOrdinal localRow) const
420  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getNumEntriesInLocalRow"); return mtx_->getNumEntriesInLocalRow(localRow); }
421 
422 
423  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
424  size_t
426  getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
427  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getNumEntriesInGlobalRow"); return mtx_->getNumEntriesInGlobalRow(globalRow); }
428 
429 
430  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
432  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getGlobalMaxNumRowEntries"); return mtx_->getGlobalMaxNumRowEntries(); }
433 
434 
435  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
437  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getNodeMaxNumRowEntries"); return mtx_->getNodeMaxNumRowEntries(); }
438 
439 
440  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
442  { XPETRA_MONITOR("TpetraBlockCrsMatrix::isLocallyIndexed"); return mtx_->isLocallyIndexed(); }
443 
444 
445  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
447  { XPETRA_MONITOR("TpetraBlockCrsMatrix::isGloballyIndexed"); return mtx_->isGloballyIndexed(); }
448 
449 
450  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
452  { XPETRA_MONITOR("TpetraBlockCrsMatrix::isFillComplete"); return mtx_->isFillComplete(); }
453 
454 
455  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
457  { XPETRA_MONITOR("TpetraBlockCrsMatrix::isFillActive"); return false; }
458 
459 
460  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
461  typename ScalarTraits< Scalar >::magnitudeType TpetraBlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node>::getFrobeniusNorm() const
462  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getFrobeniusNorm"); return mtx_->getFrobeniusNorm(); }
463 
464 
465  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
467  { XPETRA_MONITOR("TpetraBlockCrsMatrix::supportsRowViews"); return mtx_->supportsRowViews(); }
468 
469 
470  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
471  void
473  getLocalRowCopy(LocalOrdinal LocalRow,
474  const ArrayView< LocalOrdinal > &Indices,
475  const ArrayView< Scalar > &Values,
476  size_t &NumEntries) const
477  {
478  XPETRA_MONITOR("TpetraBlockCrsMatrix::getLocalRowCopy");
479  mtx_->getLocalRowCopy(LocalRow, Indices, Values, NumEntries);
480  }
481 
482 
483  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
484  void
486  getGlobalRowView(GlobalOrdinal GlobalRow,
487  ArrayView< const GlobalOrdinal > &indices,
488  ArrayView< const Scalar > &values) const
489  {
490  XPETRA_MONITOR("TpetraBlockCrsMatrix::getGlobalRowView");
491  mtx_->getGlobalRowView(GlobalRow, indices, values);
492  }
493 
494 
495  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
496  void
498  getGlobalRowCopy(GlobalOrdinal GlobalRow,
499  const ArrayView< GlobalOrdinal > &indices,
500  const ArrayView< Scalar > &values,
501  size_t &numEntries) const
502  {
503  XPETRA_MONITOR("TpetraBlockCrsMatrix::getGlobalRowCopy");
504  mtx_->getGlobalRowCopy(GlobalRow, indices, values, numEntries);
505  }
506 
507 
508  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
509  void
511  getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices,
512  ArrayView< const Scalar > &values) const
513  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getLocalRowView"); mtx_->getLocalRowView(LocalRow, indices, values); }
514 
515 
516  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
517  bool
520  { return true; }
521 
522 
523  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
527  Teuchos::ETransp mode,
528  Scalar alpha,
529  Scalar beta) const
530  { XPETRA_MONITOR("TpetraBlockCrsMatrix::apply"); mtx_->apply(toTpetra(X), toTpetra(Y), mode, alpha, beta); }
531 
532 
533  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
534  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
537  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getDomainMap"); return toXpetra(mtx_->getDomainMap()); }
538 
539 
540  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
541  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
544  { XPETRA_MONITOR("TpetraBlockCrsMatrix::getRangeMap"); return toXpetra(mtx_->getRangeMap()); }
545 
546 
547  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
548  std::string
551  { XPETRA_MONITOR("TpetraBlockCrsMatrix::description"); return mtx_->description(); }
552 
553 
554  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
555  void
557  describe(Teuchos::FancyOStream &out,
558  const Teuchos::EVerbosityLevel verbLevel) const
559  {
560  XPETRA_MONITOR("TpetraBlockCrsMatrix::describe");
561  mtx_->describe(out, verbLevel);
562  }
563 
564 
565  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
566  void
568  setObjectLabel( const std::string &objectLabel )
569  {
570  XPETRA_MONITOR("TpetraCrsMatrix::setObjectLabel");
571  Teuchos::LabeledObject::setObjectLabel(objectLabel);
572  mtx_->setObjectLabel(objectLabel);
573  }
574 
575 
576 
577  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
578  void
581  {
582  XPETRA_MONITOR("TpetraBlockCrsMatrix::getLocalDiagCopy");
584  diag,
585  tDiag,
586  "Xpetra::TpetraBlockCrsMatrix.getLocalDiagCopy() only accept Xpetra::TpetraVector as input arguments.");
587  mtx_->getLocalDiagCopy(*tDiag.getTpetra_Vector());
588  }
589 
590 
592  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
593  void
596  const Teuchos::ArrayView<const size_t> &offsets) const
597  {
598  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
599  }
600 
601 
602 
603  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
604  void
606  getLocalDiagOffsets(Teuchos::ArrayRCP<size_t> &offsets) const
607  {
608  XPETRA_MONITOR("TpetraBlockCrsMatrix::getLocalDiagOffsets");
609 
610  const size_t lclNumRows = mtx_->getGraph()->getNodeNumRows();
611  if (static_cast<size_t>(offsets.size()) < lclNumRows)
612  {
613  offsets.resize(lclNumRows);
614  }
615 
616  // The input ArrayRCP must always be a host pointer. Thus, if
617  // device_type::memory_space is Kokkos::HostSpace, it's OK for us
618  // to write to that allocation directly as a Kokkos::View.
619  typedef typename Node::device_type device_type;
620  typedef typename device_type::memory_space memory_space;
621  if (std::is_same<memory_space, Kokkos::HostSpace>::value)
622  {
623  // It is always syntactically correct to assign a raw host
624  // pointer to a device View, so this code will compile correctly
625  // even if this branch never runs.
626  typedef Kokkos::View<size_t*, device_type, Kokkos::MemoryUnmanaged> output_type;
627  output_type offsetsOut (offsets.getRawPtr(), offsets.size());
628  mtx_->getLocalDiagOffsets(offsetsOut);
629  }
630  else
631  {
632  Kokkos::View<size_t*, device_type> offsetsTmp ("diagOffsets", offsets.size());
633  mtx_->getLocalDiagOffsets(offsetsTmp);
634  typedef Kokkos::View<size_t*, Kokkos::HostSpace, Kokkos::MemoryUnmanaged> output_type;
635  output_type offsetsOut(offsets.getRawPtr(), offsets.size());
636  Kokkos::deep_copy(offsetsOut, offsetsTmp);
637  }
638  }
639 
640 
641  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
642  void
645  {
646  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix::replaceDiag: function not implemented");
647  }
648 
649 
650  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
651  void
654  {
655  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
656  }
657 
658 
659  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
660  void
663  {
664  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
665  }
666 
667 
668  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
669  Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
671  getMap() const
672  {
673  XPETRA_MONITOR("TpetraBlockCrsMatrix::getMap"); return rcp( new TpetraMap< LocalOrdinal, GlobalOrdinal, Node >(mtx_->getMap()) );
674  }
675 
676 
678  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
679  void
683  {
684  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
685  }
686 
687 
689  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
690  void
694  {
695  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
696  }
697 
698 
700  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
701  void
705  {
706  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
707  }
708 
709 
711  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
712  void
716  {
717  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
718  }
719 
720 
721  template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
722  void
725  {
726  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix function not implemented");
727  }
728 
729 
730 template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
731 bool
733 hasMatrix() const
734 {
735  return !mtx_.is_null();
736 }
737 
738 
739 template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
741 TpetraBlockCrsMatrix(const Teuchos::RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > &mtx)
742 : mtx_(mtx)
743 { }
744 
745 
746 template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
747 RCP<const Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
750 {
751  return mtx_;
752 }
753 
754 
755 // TODO: remove
756 template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
757 RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
760 {
761  return mtx_;
762 }
763 
764 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
765 #ifdef HAVE_XPETRA_TPETRA
766 
767 // was: typedef typename Xpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::local_matrix_type local_matrix_type;
768 //using local_matrix_type = typename CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::local_matrix_type;
769 
770 template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
773 getLocalMatrix () const
774 {
775  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
776 
777 #ifndef __NVCC__
778  local_matrix_type ret;
779 #endif // __NVCC__
780 
781  TEUCHOS_UNREACHABLE_RETURN(ret);
782 }
783 
784 
785 template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
786 void
788 setAllValues (const typename local_matrix_type::row_map_type& ptr,
789  const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
790  const typename local_matrix_type::values_type& val)
791 {
792  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
793 }
794 
795 #endif // HAVE_XPETRA_TPETRA
796 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
797 
798 
799 #ifdef HAVE_XPETRA_EPETRA
800 
801 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
802  (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
803 
804 
805  // specialization of TpetraBlockCrsMatrix for GO=LO=int and Node=EpetraNode
806  template <class Scalar>
807  class TpetraBlockCrsMatrix<Scalar,int,int,EpetraNode>
808  : public CrsMatrix<Scalar,int,int,EpetraNode>//, public TpetraRowMatrix<Scalar,int,int,Node>
809  {
810 
811  // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro.
812  typedef int LocalOrdinal;
813  typedef int GlobalOrdinal;
814  typedef EpetraNode Node;
819 
820  public:
821 
823 
825  TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null) {
827  }
828 
830  TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null) {
832  }
833 
835  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 > &params=Teuchos::null) {
837  }
838 
840  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 > &params=Teuchos::null) {
842  }
843 
845  TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> > &graph, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null) {
847  }
848 
850  TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> > &graph, const LocalOrdinal blockSize) {
852  }
853 
855  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
857  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap = Teuchos::null,
858  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap = Teuchos::null,
859  const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
861 
863  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
865  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap = Teuchos::null,
866  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap = Teuchos::null,
867  const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
869 
871  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
872  const Import<LocalOrdinal,GlobalOrdinal,Node> & RowImporter,
873  const Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > DomainImporter,
874  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
875  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
876  const Teuchos::RCP<Teuchos::ParameterList>& params)
878 
880  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
881  const Export<LocalOrdinal,GlobalOrdinal,Node> & RowExporter,
882  const Teuchos::RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > DomainExporter,
883  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
884  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
885  const Teuchos::RCP<Teuchos::ParameterList>& params)
886  {
888  }
889 
892 
893 
895 
897  void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
898  {}
899 
901  void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
902  {}
903 
905  void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
906  {}
907 
909  void replaceLocalValues (LocalOrdinal localRow,const ArrayView<const LocalOrdinal> &cols,const ArrayView<const Scalar> &vals)
910  {}
911 
913  void setAllToScalar(const Scalar &alpha) {}
914 
916  void scale(const Scalar &alpha)
917  {}
918 
920  //** \warning This is an expert-only routine and should not be called from user code. (not implemented)
921  void allocateAllValues(size_t numNonZeros,ArrayRCP<size_t> & rowptr, ArrayRCP<LocalOrdinal> & colind, ArrayRCP<Scalar> & values)
922  {}
923 
925  void setAllValues(const ArrayRCP<size_t> & rowptr, const ArrayRCP<LocalOrdinal> & colind, const ArrayRCP<Scalar> & values)
926  {}
927 
929  void getAllValues(ArrayRCP<const size_t>& rowptr, ArrayRCP<const LocalOrdinal>& colind, ArrayRCP<const Scalar>& values) const
930  {}
931 
932 
934 
936  void resumeFill(const RCP< ParameterList > &params=null) { /*noop*/ }
937 
939  void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null) { /*noop*/ }
940 
942  void fillComplete(const RCP< ParameterList > &params=null) { /*noop*/ }
943 
944 
946  void replaceDomainMapAndImporter(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >& newDomainMap, Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > & newImporter)
947  {}
948 
951  const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & rangeMap,
952  const RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > &importer=Teuchos::null,
953  const RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > &exporter=Teuchos::null,
954  const RCP<ParameterList> &params=Teuchos::null)
955  {}
956 
957 
959 
961  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const { return Teuchos::null; }
962 
964  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const { return Teuchos::null; }
965 
967  RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> > getCrsGraph() const
968  {return Teuchos::null;}
969 
971  global_size_t getGlobalNumRows() const { return 0; }
972 
974  global_size_t getGlobalNumCols() const { return 0; }
975 
977  size_t getNodeNumRows() const { return 0; }
978 
980  size_t getNodeNumCols() const { return 0; }
981 
983  global_size_t getGlobalNumEntries() const { return 0; }
984 
986  size_t getNodeNumEntries() const { return 0; }
987 
989  size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; }
990 
992  size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; }
993 
995  size_t getGlobalMaxNumRowEntries() const { return 0; }
996 
998  size_t getNodeMaxNumRowEntries() const { return 0; }
999 
1001  bool isLocallyIndexed() const { return false; }
1002 
1004  bool isGloballyIndexed() const { return false; }
1005 
1007  bool isFillComplete() const { return false; }
1008 
1010  bool isFillActive() const { return false; }
1011 
1013  typename ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const { return Teuchos::ScalarTraits<Scalar>::magnitude(Teuchos::ScalarTraits<Scalar>::zero()); }
1014 
1016  bool supportsRowViews() const { return false; }
1017 
1019  void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const { }
1020 
1022  void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const { }
1023 
1025  void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView< GlobalOrdinal > &indices, const ArrayView< Scalar > &values, size_t &numEntries) const { }
1026 
1028  void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const { }
1029 
1031  bool haveGlobalConstants() const {return false;}
1032 
1033 
1035 
1037  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 { }
1038 
1040  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const { return Teuchos::null; }
1041 
1043  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const { return Teuchos::null; }
1044 
1045 
1047 
1049  std::string description() const { return std::string(""); }
1050 
1052  void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const { }
1053 
1054 
1057 
1060 
1062  void getLocalDiagOffsets(Teuchos::ArrayRCP<size_t> &offsets) const { }
1063 
1065  void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag, const Teuchos::ArrayView<const size_t> &offsets) const
1066  {}
1067 
1069 
1072 
1073 
1075 
1077  Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const { return Teuchos::null; }
1078 
1082  {}
1083 
1087  {}
1088 
1092  {}
1093 
1097  {}
1098 
1100  {}
1101 
1102 
1103 
1105 
1107  bool hasMatrix() const { return false; }
1108 
1110  TpetraBlockCrsMatrix(const Teuchos::RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > &mtx) {
1112  }
1113 
1115  RCP<const Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > getTpetra_BlockCrsMatrix() const { return Teuchos::null; }
1116 
1118  RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > getTpetra_BlockCrsMatrixNonConst() const { return Teuchos::null; }
1119 
1120 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
1121 #ifdef HAVE_XPETRA_TPETRA
1123 
1124  local_matrix_type getLocalMatrix () const {
1125  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1126  local_matrix_type ret;
1127  return ret; // make compiler happy
1128  }
1129 
1130  void setAllValues (const typename local_matrix_type::row_map_type& ptr,
1131  const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
1132  const typename local_matrix_type::values_type& val)
1133  {
1134  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1135  }
1136 #endif // HAVE_XPETRA_TPETRA
1137 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
1138 
1139  }; // TpetraBlockCrsMatrix class
1140 
1141 
1142 #endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT)))
1143 
1144 
1145 
1146 
1147 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
1148  (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
1149 
1150  // specialization of TpetraBlockCrsMatrix for GO=long long and Node=EpetraNode
1151  template <class Scalar>
1152  class TpetraBlockCrsMatrix<Scalar,int,long long,EpetraNode>
1153  : public CrsMatrix<Scalar,int,long long,EpetraNode>//, public TpetraRowMatrix<Scalar,int,int,Node>
1154  {
1155 
1156  // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro.
1157  typedef int LocalOrdinal;
1158  typedef long long GlobalOrdinal;
1159  typedef EpetraNode Node;
1164 
1165  public:
1166 
1168 
1170  TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
1172 
1174  TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
1176 
1178  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 > &params=Teuchos::null)
1180 
1182  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 > &params=Teuchos::null)
1184 
1186  TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> > &graph, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
1188 
1190  TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> > &graph, const LocalOrdinal blockSize)
1192 
1193 
1194 
1195 
1197  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1198  const Import<LocalOrdinal,GlobalOrdinal,Node> & importer,
1199  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap = Teuchos::null,
1200  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap = Teuchos::null,
1201  const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
1203 
1205  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1206  const Export<LocalOrdinal,GlobalOrdinal,Node> & exporter,
1207  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap = Teuchos::null,
1208  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap = Teuchos::null,
1209  const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
1211 
1213  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1214  const Import<LocalOrdinal,GlobalOrdinal,Node> & RowImporter,
1215  const Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > DomainImporter,
1216  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
1217  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
1218  const Teuchos::RCP<Teuchos::ParameterList>& params)
1220 
1222  TpetraBlockCrsMatrix(const Teuchos::RCP<const Tpetra::BlockCrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& sourceMatrix,
1223  const Export<LocalOrdinal,GlobalOrdinal,Node> & RowExporter,
1224  const Teuchos::RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > DomainExporter,
1225  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& domainMap,
1226  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& rangeMap,
1227  const Teuchos::RCP<Teuchos::ParameterList>& params)
1229 
1232 
1233 
1235 
1237  void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
1238  {}
1239 
1241  void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
1242  {}
1243 
1245  void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
1246  {}
1247 
1249  void replaceLocalValues (LocalOrdinal localRow,const ArrayView<const LocalOrdinal> &cols,const ArrayView<const Scalar> &vals)
1250  {}
1251 
1253  void setAllToScalar(const Scalar &alpha) {}
1254 
1256  void scale(const Scalar &alpha)
1257  {}
1258 
1260  //** \warning This is an expert-only routine and should not be called from user code. (not implemented)
1261  void allocateAllValues(size_t numNonZeros,ArrayRCP<size_t> & rowptr, ArrayRCP<LocalOrdinal> & colind, ArrayRCP<Scalar> & values)
1262  {}
1263 
1265  void setAllValues(const ArrayRCP<size_t> & rowptr, const ArrayRCP<LocalOrdinal> & colind, const ArrayRCP<Scalar> & values)
1266  {}
1267 
1269  void getAllValues(ArrayRCP<const size_t>& rowptr, ArrayRCP<const LocalOrdinal>& colind, ArrayRCP<const Scalar>& values) const
1270  {}
1271 
1272 
1274 
1276  void resumeFill(const RCP< ParameterList > &params=null) { /*noop*/ }
1277 
1279  void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null) { /*noop*/ }
1280 
1282  void fillComplete(const RCP< ParameterList > &params=null) { /*noop*/ }
1283 
1284 
1286  void replaceDomainMapAndImporter(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >& newDomainMap, Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > & newImporter)
1287  {}
1288 
1291  const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & rangeMap,
1292  const RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > &importer=Teuchos::null,
1293  const RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > &exporter=Teuchos::null,
1294  const RCP<ParameterList> &params=Teuchos::null)
1295  {}
1296 
1297 
1299 
1301  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const { return Teuchos::null; }
1302 
1304  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const { return Teuchos::null; }
1305 
1307  RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node> > getCrsGraph() const
1308  {return Teuchos::null;}
1309 
1311  global_size_t getGlobalNumRows() const { return 0; }
1312 
1314  global_size_t getGlobalNumCols() const { return 0; }
1315 
1317  size_t getNodeNumRows() const { return 0; }
1318 
1320  size_t getNodeNumCols() const { return 0; }
1321 
1323  global_size_t getGlobalNumEntries() const { return 0; }
1324 
1326  size_t getNodeNumEntries() const { return 0; }
1327 
1329  size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; }
1330 
1332  size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; }
1333 
1335  size_t getGlobalMaxNumRowEntries() const { return 0; }
1336 
1338  size_t getNodeMaxNumRowEntries() const { return 0; }
1339 
1341  bool isLocallyIndexed() const { return false; }
1342 
1344  bool isGloballyIndexed() const { return false; }
1345 
1347  bool isFillComplete() const { return false; }
1348 
1350  bool isFillActive() const { return false; }
1351 
1353  typename ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const { return Teuchos::ScalarTraits<Scalar>::magnitude(Teuchos::ScalarTraits<Scalar>::zero()); }
1354 
1356  bool supportsRowViews() const { return false; }
1357 
1359  void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const { }
1360 
1362  void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const { }
1363 
1365  void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView< GlobalOrdinal > &indices, const ArrayView< Scalar > &values, size_t &numEntries) const { }
1366 
1368  void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const { }
1369 
1371  bool haveGlobalConstants() const {return true;}
1372 
1373 
1375 
1377  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 { }
1378 
1380  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const { return Teuchos::null; }
1381 
1383  const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const { return Teuchos::null; }
1384 
1385 
1387 
1389  std::string description() const { return std::string(""); }
1390 
1392  void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const { }
1393 
1396 
1399 
1401  void getLocalDiagOffsets(Teuchos::ArrayRCP<size_t> &offsets) const { }
1402 
1404  void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag, const Teuchos::ArrayView<const size_t> &offsets) const
1405  {}
1406 
1408 
1411 
1413 
1415  Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const { return Teuchos::null; }
1416 
1420  {}
1421 
1425  {}
1426 
1430  {}
1431 
1435  {}
1436 
1438  {}
1439 
1440 
1441 
1443 
1445  bool hasMatrix() const { return false; }
1446 
1448  TpetraBlockCrsMatrix(const Teuchos::RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > &mtx) {
1450  }
1451 
1453  RCP<const Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > getTpetra_BlockCrsMatrix() const { return Teuchos::null; }
1454 
1456  RCP<Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > getTpetra_BlockCrsMatrixNonConst() const { return Teuchos::null; }
1457 
1458 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
1459 #ifdef HAVE_XPETRA_TPETRA
1461 
1462  local_matrix_type getLocalMatrix () const {
1463  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1464  local_matrix_type ret;
1465  TEUCHOS_UNREACHABLE_RETURN(ret);
1466  }
1467 
1468  void setAllValues (const typename local_matrix_type::row_map_type& ptr,
1469  const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
1470  const typename local_matrix_type::values_type& val)
1471  {
1472  throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1473  }
1474 #endif // HAVE_XPETRA_TPETRA
1475 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
1476 
1477  }; // TpetraBlockCrsMatrix class
1478 
1479 
1480 #endif // IF ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))
1481 
1482 
1483 
1484 
1485 #endif // HAVE_XPETRA_EPETRA
1486 
1487 
1488 } // Xpetra namespace
1489 
1490 #endif // XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
1491 
1492 
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
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 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 fillComplete(const RCP< ParameterList > &params=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)
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 removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
void replaceDiag(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
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...
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null)
Signal that data entry is complete, specifying domain and range maps.
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 getNodeNumEntries() const
Returns the local number of entries in this matrix.
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.
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.
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 insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (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 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.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with 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 insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra 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 replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
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 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 > &params=Teuchos::null)
Expert static fill complete.
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
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 rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale operator with given vector values.
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
bool hasMatrix() const
Does this have an underlying 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...
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra 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 > &params=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 > &params=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row (not implemented) ...
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale matrix using the given vector entries.
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
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 > &params=Teuchos::null)
Expert static fill complete.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
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 > &params=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row (not implemented) ...
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix. ...
void setObjectLabel(const std::string &objectLabel)
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
#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.
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 removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
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.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
std::string description() const
A simple one-line description of this object.
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 > &params=Teuchos::null)
Constructor specifying fixed number of entries for each row (not implemented)
void fillComplete(const RCP< ParameterList > &params=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 &amp; blocksize.
TpetraBlockCrsMatrix(const Teuchos::RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &mtx)
TpetraBlockCrsMatrix constructor to wrap a Tpetra::BlockCrsMatrix object.
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 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 replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix. ...
bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
virtual bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
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)
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 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 > &params=Teuchos::null)
Constructor specifying column Map and number of entries in each row (not implemented) ...
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
void replaceDiag(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag)
Replace the diagonal entries of the matrix.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
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 > &params=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row (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.
std::string description() const
A simple one-line description of this object.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
std::string description() const
A simple one-line description of this object.
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
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
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 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 > &params)
Constructor for a fused export (not implemented(.
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 isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
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 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 > &params)
Constructor for a fused import (not implemented)
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null)
Signal that data entry is complete, specifying domain and range maps.
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale matrix using the given vector entries.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
global_size_t getGlobalNumCols() const
Number of global columns in the 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.
bool isFillActive() const
Returns true if the matrix is in edit mode.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
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.
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 > &params=Teuchos::null)
Constructor for a fused export (not implemented(.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
size_t global_size_t
Global size_t object.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this 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)
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 > &params=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 > &params=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)
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.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
Constructor specifying a previously constructed graph ( not implemented )
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
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)
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale matrix using the given vector entries.
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > &params=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 > &params=Teuchos::null)
Constructor for a fused import (not implemented)
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 > &params=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 &amp; blocksize.
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.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra 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.
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this 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 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)
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
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 doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
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)
global_size_t getGlobalNumEntries() const
Returns the global number of entries in 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...
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 > &params=null)
Signal that data entry is complete, specifying domain and range maps.
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 > &params=Teuchos::null)
Expert static fill complete.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
CombineMode
Xpetra::Combine Mode enumerable type.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
#define XPETRA_MONITOR(funcName)
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 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.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
Constructor specifying fixed number of entries for each row (not implemented)
bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
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 > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraVectorClass
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.
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
bool isFillActive() const
Returns true if the matrix is in edit mode.
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
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 > &params)
Constructor for a fused export (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.
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
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 insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
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 > &params)
Constructor for a fused import ( not implemented )
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 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.
bool isFillActive() const
Returns true if the matrix is in edit mode.
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row 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 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.
void resumeFill(const RCP< ParameterList > &params=null)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row (not implemented) ...
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
TpetraExport< LocalOrdinal, GlobalOrdinal, Node > TpetraExportClass