Epetra Package Browser (Single Doxygen Collection)  Development
Epetra_VbrMatrix.h
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Epetra: Linear Algebra Services Package
6 // Copyright 2011 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 Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 */
43 
44 #ifndef EPETRA_VBRMATRIX_H
45 #define EPETRA_VBRMATRIX_H
46 
47 // FIXME long long : whole file
48 
49 #include <Epetra_ConfigDefs.h>
50 #include <Epetra_DistObject.h>
51 #include <Epetra_CompObject.h>
52 #include <Epetra_BLAS.h>
53 #include <Epetra_RowMatrix.h>
54 #include <Epetra_Operator.h>
55 #include <Epetra_CrsGraph.h>
57 class Epetra_BlockMap;
58 class Epetra_Map;
59 class Epetra_Import;
60 class Epetra_Export;
61 class Epetra_Vector;
62 class Epetra_MultiVector;
63 
65 
172 class EPETRA_LIB_DLL_EXPORT Epetra_VbrMatrix : public Epetra_DistObject,
173  public Epetra_CompObject,
174  public Epetra_BLAS,
175  public virtual Epetra_RowMatrix {
176  public:
177 
179 
180 
191  Epetra_VbrMatrix(Epetra_DataAccess CV, const Epetra_BlockMap& RowMap, int *NumBlockEntriesPerRow);
192 
194 
205  Epetra_VbrMatrix(Epetra_DataAccess CV, const Epetra_BlockMap& RowMap, int NumBlockEntriesPerRow);
206 
208 
220  Epetra_VbrMatrix(Epetra_DataAccess CV, const Epetra_BlockMap& RowMap, const Epetra_BlockMap& ColMap, int *NumBlockEntriesPerRow);
221 
223 
236  Epetra_VbrMatrix(Epetra_DataAccess CV, const Epetra_BlockMap& RowMap, const Epetra_BlockMap& ColMap, int NumBlockEntriesPerRow);
237 
239 
249 
251  Epetra_VbrMatrix(const Epetra_VbrMatrix & Matrix);
252 
254  virtual ~Epetra_VbrMatrix();
256 
258 
259 
261 
263 
269  int PutScalar(double ScalarConstant);
270 
272 
278  int Scale(double ScalarConstant);
279 
281 
286  int DirectSubmitBlockEntry(int GlobalBlockRow, int GlobalBlockCol,
287  const double *values, int LDA,
288  int NumRows, int NumCols, bool sum_into);
289 
291 
301  int BeginInsertGlobalValues(int BlockRow,
302  int NumBlockEntries,
303  int * BlockIndices);
304 
306 
316  int BeginInsertMyValues(int BlockRow, int NumBlockEntries, int * BlockIndices);
317 
319 
329  int BeginReplaceGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices);
330 
332 
342  int BeginReplaceMyValues(int BlockRow, int NumBlockEntries, int *BlockIndices);
343 
345 
355  int BeginSumIntoGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices);
356 
358 
368  int BeginSumIntoMyValues(int BlockRow, int NumBlockEntries, int *BlockIndices);
369 
371  /* Submit a block entry that will recorded in the block row that was initiated by one of the
372  Begin routines listed above. Once a one of the following routines: BeginInsertGlobalValues(),
373  BeginInsertMyValues(), BeginReplaceGlobalValues(), BeginReplaceMyValues(), BeginSumIntoGlobalValues(),
374  BeginSumIntoMyValues(), you \e must call SubmitBlockEntry() NumBlockEntries times to register the values
375  corresponding to the block indices passed in to the Begin routine. If the Epetra_VbrMatrix constuctor
376  was called in Copy mode, the values will be copied. However, no copying will be done until the EndSubmitEntries()
377  function is call to complete submission of the current block row. If the constructor was called in View mode, all
378  block entries passed via SubmitBlockEntry() will not be copied, but a pointer will be set to point to the argument Values
379  that was passed in by the user.
380 
381  For performance reasons, SubmitBlockEntry() does minimal processing of data. Any processing that can be
382  delayed is performed in EndSubmitEntries().
383 
384  \param In
385  Values - The starting address of the values.
386  \param In
387  LDA - The stride between successive columns of Values.
388  \param In
389  NumRows - The number of rows passed in.
390  \param In
391  NumCols - The number of columns passed in.
392 
393  \return Integer error code, set to 0 if successful.
394  */
395  int SubmitBlockEntry(double *Values, int LDA, int NumRows, int NumCols);
396 
398  /* Submit a block entry that will recorded in the block row that was initiated by one of the
399  Begin routines listed above. Once a one of the following routines: BeginInsertGlobalValues(),
400  BeginInsertMyValues(), BeginReplaceGlobalValues(), BeginReplaceMyValues(), BeginSumIntoGlobalValues(),
401  BeginSumIntoMyValues(), you \e must call SubmitBlockEntry() NumBlockEntries times to register the values
402  corresponding to the block indices passed in to the Begin routine. If the Epetra_VbrMatrix constuctor
403  was called in Copy mode, the values will be copied. However, no copying will be done until the EndSubmitEntries()
404  function is call to complete submission of the current block row. If the constructor was called in View mode, all
405  block entries passed via SubmitBlockEntry() will not be copied, but a pointer will be set to point to the argument Values
406  that was passed in by the user.
407 
408  For performance reasons, SubmitBlockEntry() does minimal processing of data. Any processing that can be
409  delayed is performed in EndSubmitEntries().
410 
411  \param In
412  Mat - Preformed dense matrix block.
413 
414  \return Integer error code, set to 0 if successful.
415  */
416  int SubmitBlockEntry( Epetra_SerialDenseMatrix &Mat );
417 
419 
424  int EndSubmitEntries();
425 
427 
438  int ReplaceDiagonalValues(const Epetra_Vector & Diagonal);
439 
441  /* This version of FillComplete assumes that the domain and range
442  distributions are identical to the matrix row distributions.
443  \return error code, 0 if successful. Returns a positive warning code of 3
444  if the matrix is rectangular (meaning that the other overloading of
445  FillComplete should have been called, with differen domain-map and
446  range-map specified).
447  */
448  int FillComplete();
449 
451  /* This version of FillComplete requires the explicit specification of the domain
452  and range distribution maps. These maps are used for importing and exporting vector
453  and multi-vector elements that are needed for distributed matrix computations. For
454  example, to compute y = Ax in parallel, we would specify the DomainMap as the distribution
455  of the vector x and the RangeMap as the distribution of the vector y.
456  \param In
457  DomainMap - Map that describes the distribution of vector and multi-vectors in the
458  matrix domain.
459  \param In
460  RangeMap - Map that describes the distribution of vector and multi-vectors in the
461  matrix range.
462 
463  \return error code, 0 if successful. positive warning code of 2 if it is detected that the
464  matrix-graph got out of sync since this matrix was constructed (for instance if
465  graph.FillComplete() was called by another matrix that shares the graph)
466  */
467  int FillComplete(const Epetra_BlockMap& DomainMap, const Epetra_BlockMap& RangeMap);
468 
470  bool Filled() const {return(Graph_->Filled());};
472 
474 
475 
477 
499  int ExtractGlobalBlockRowPointers(int BlockRow, int MaxNumBlockEntries,
500  int & RowDim, int & NumBlockEntries,
501  int * BlockIndices,
502  Epetra_SerialDenseMatrix ** & Values) const;
503 
505 
527  int ExtractMyBlockRowPointers(int BlockRow, int MaxNumBlockEntries,
528  int & RowDim, int & NumBlockEntries,
529  int * BlockIndices,
530  Epetra_SerialDenseMatrix** & Values) const;
531 
533 
549  int BeginExtractGlobalBlockRowCopy(int BlockRow, int MaxNumBlockEntries,
550  int & RowDim, int & NumBlockEntries,
551  int * BlockIndices, int * ColDims) const;
552 
554 
570  int BeginExtractMyBlockRowCopy(int BlockRow, int MaxNumBlockEntries,
571  int & RowDim, int & NumBlockEntries,
572  int * BlockIndices, int * ColDims) const;
573 
575 
590  int ExtractEntryCopy(int SizeOfValues, double * Values, int LDA, bool SumInto) const;
591 
593 
605  int BeginExtractGlobalBlockRowView(int BlockRow, int & RowDim, int & NumBlockEntries,
606  int * & BlockIndices) const;
607 
609 
621  int BeginExtractMyBlockRowView(int BlockRow, int & RowDim, int & NumBlockEntries,
622  int * & BlockIndices) const;
623 
624 
626 
633  int ExtractEntryView(Epetra_SerialDenseMatrix* & entry) const;
634 
636 
650  int ExtractGlobalBlockRowView(int BlockRow, int & RowDim, int & NumBlockEntries,
651  int * & BlockIndices,
652  Epetra_SerialDenseMatrix** & Values) const;
653 
655 
669  int ExtractMyBlockRowView(int BlockRow, int & RowDim, int & NumBlockEntries,
670  int * & BlockIndices,
671  Epetra_SerialDenseMatrix** & Values) const;
672 
673 
675 
681  int ExtractDiagonalCopy(Epetra_Vector & Diagonal) const;
682 
684 
694  int BeginExtractBlockDiagonalCopy(int MaxNumBlockDiagonalEntries,
695  int & NumBlockDiagonalEntries, int * RowColDims ) const;
697 
712  int ExtractBlockDiagonalEntryCopy(int SizeOfValues, double * Values, int LDA, bool SumInto) const;
713 
715 
723  int BeginExtractBlockDiagonalView(int & NumBlockDiagonalEntries, int * & RowColDims ) const;
724 
726 
736  int ExtractBlockDiagonalEntryView(double * & Values, int & LDA) const;
738 
740 
741 
742 
744 
754  int Multiply1(bool TransA, const Epetra_Vector& x, Epetra_Vector& y) const;
755 
757 
767  int Multiply(bool TransA, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
768 
770 
784  int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector& x, Epetra_Vector& y) const;
785 
787 
801  int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
802 
803 
805 
815  int InvRowSums(Epetra_Vector& x) const;
816 
818 
825  int LeftScale(const Epetra_Vector& x);
826 
828 
838  int InvColSums(Epetra_Vector& x) const ;
839 
841 
848  int RightScale(const Epetra_Vector& x);
850 
852 
853 
855  int OptimizeStorage();
856 
858  bool StorageOptimized() const {return(StorageOptimized_);};
859 
861  bool IndicesAreGlobal() const {return(Graph_->IndicesAreGlobal());};
862 
864  bool IndicesAreLocal() const {return(Graph_->IndicesAreLocal());};
865 
867  bool IndicesAreContiguous() const {return(Graph_->IndicesAreContiguous());};
868 
870  bool LowerTriangular() const {return(Graph_->LowerTriangular());};
871 
873  bool UpperTriangular() const {return(Graph_->UpperTriangular());};
874 
876  bool NoDiagonal() const {return(Graph_->NoDiagonal());};
877 
879 
881 
882 
884  /* Returns the quantity \f$ \| A \|_\infty\f$ such that
885  \f[\| A \|_\infty = \max_{1\lei\lem} \sum_{j=1}^n |a_{ij}| \f].
886  \warning The NormInf() method will not properly calculate the infinity norm for a matrix that has entries that are
887  replicated on multiple processors. */
888  double NormInf() const;
889 
891  /* Returns the quantity \f$ \| A \|_1\f$ such that
892  \f[\| A \|_1 = \max_{1\lej\len} \sum_{i=1}^m |a_{ij}| \f].
893  \warning The NormOne() method will not properly calculate the one norm for a matrix that has entries that are
894  */
895  double NormOne() const;
896 
898  /* Returns the quantity \f[ \| A \|_{Frobenius} = \sqrt{\sum_{i=1}^m \sum_{j=1}^n\|a_{ij}\|^2}\f]
899  \warning the NormFrobenius() method will not properly calculate the frobenius norm for a matrix that
900  has entries which are replicated on multiple processors. In that case, the returned
901  norm will be larger than the true norm.
902  */
903  double NormFrobenius() const;
904 
906  int MaxRowDim() const {return(Graph_->MaxRowDim());};
907 
909  int MaxColDim() const {return(Graph_->MaxColDim());};
910 
912  int GlobalMaxRowDim() const {return(Graph_->GlobalMaxRowDim());};
913 
915  int GlobalMaxColDim() const {return(Graph_->GlobalMaxColDim());};
916 
918  int NumMyRows() const {return(Graph_->NumMyRows());};
920  int NumMyCols() const {return(Graph_->NumMyCols());};
921 
923  int NumMyNonzeros() const {return(Graph_->NumMyNonzeros());};
924 
926 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
927  int NumGlobalRows() const {return(Graph_->NumGlobalRows());};
928 #endif
929  long long NumGlobalRows64() const {return(Graph_->NumGlobalRows64());};
930 
932 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
933  int NumGlobalCols() const {return(Graph_->NumGlobalCols());};
934 #endif
935  long long NumGlobalCols64() const {return(Graph_->NumGlobalCols64());};
936 
938  /*
939  Note that if maps are defined such that some nonzeros appear on
940  multiple processors, then those nonzeros will be counted multiple
941  times. If the user wishes to assemble a matrix from overlapping
942  submatrices, they can use Epetra_FEVbrMatrix.
943  */
944 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
945  int NumGlobalNonzeros() const {return(Graph_->NumGlobalNonzeros());};
946 #endif
947  long long NumGlobalNonzeros64() const {return(Graph_->NumGlobalNonzeros64());};
948 
950  int NumMyBlockRows() const {return(Graph_->NumMyBlockRows());};
951 
953  int NumMyBlockCols() const {return(Graph_->NumMyBlockCols());};
954 
956  int NumMyBlockEntries() const {return(Graph_->NumMyEntries());};
957 
959  int NumMyBlockDiagonals() const {return(Graph_->NumMyBlockDiagonals());};
960 
962  int NumMyDiagonals() const {return(Graph_->NumMyDiagonals());};
963 
965 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
966  int NumGlobalBlockRows() const {return(Graph_->NumGlobalBlockRows());};
967 #endif
968  long long NumGlobalBlockRows64() const {return(Graph_->NumGlobalBlockRows64());};
969 
971 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
972  int NumGlobalBlockCols() const {return(Graph_->NumGlobalBlockCols());};
973 #endif
974  long long NumGlobalBlockCols64() const {return(Graph_->NumGlobalBlockCols64());};
975 
977 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
978  int NumGlobalBlockEntries() const {return(Graph_->NumGlobalEntries());};
979 #endif
980  long long NumGlobalBlockEntries64() const {return(Graph_->NumGlobalEntries64());};
981 
983 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
984  int NumGlobalBlockDiagonals() const {return(Graph_->NumGlobalBlockDiagonals());};
985 #endif
986  long long NumGlobalBlockDiagonals64() const {return(Graph_->NumGlobalBlockDiagonals64());};
987 
989 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
990  int NumGlobalDiagonals() const {return(Graph_->NumGlobalDiagonals());};
991 #endif
992  long long NumGlobalDiagonals64() const {return(Graph_->NumGlobalDiagonals64());};
993 
995  int NumGlobalBlockEntries(int Row) const {return(Graph_->NumGlobalIndices(Row));};
996 
998  int NumAllocatedGlobalBlockEntries(int Row) const{return(Graph_->NumAllocatedGlobalIndices(Row));};
999 
1001  int MaxNumBlockEntries() const {return(Graph_->MaxNumIndices());};
1002 
1004  int GlobalMaxNumBlockEntries() const {return(Graph_->GlobalMaxNumIndices());};
1005 
1007  int NumMyBlockEntries(int Row) const {return(Graph_->NumMyIndices(Row));};
1008 
1010  int NumAllocatedMyBlockEntries(int Row) const {return(Graph_->NumAllocatedMyIndices(Row));};
1011 
1013 
1017  int MaxNumNonzeros() const {return(Graph_->MaxNumNonzeros());};
1018 
1020 
1022  int GlobalMaxNumNonzeros() const {return(Graph_->GlobalMaxNumNonzeros());};
1023 
1025 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1026  int IndexBase() const {
1028  if(RowMap().GlobalIndicesInt())
1029  return (int) IndexBase64();
1030  throw "Epetra_VbrMatrix::IndexBase: GlobalIndices not int.";
1031  }
1032 #endif
1033  long long IndexBase64() const {return(Graph_->IndexBase64());};
1034 
1036  const Epetra_CrsGraph & Graph() const {return(*Graph_);};
1037 
1039  const Epetra_Import * Importer() const {return(Graph_->Importer());};
1040 
1042  const Epetra_Export * Exporter() const {return(Graph_->Exporter());};
1043 
1045  const Epetra_BlockMap & DomainMap() const {return(Graph_->DomainMap());};
1046 
1048  const Epetra_BlockMap & RangeMap() const {return(Graph_->RangeMap());};
1049 
1051  const Epetra_BlockMap & RowMap() const {return(Graph_->RowMap());};
1052 
1054  const Epetra_BlockMap & ColMap() const {return(Graph_->ColMap());};
1055 
1057 
1059  const Epetra_Comm & Comm() const {return(Graph_->Comm());};
1060 
1062 
1064 
1065 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1067  int LRID( int GRID_in) const {return(Graph_->LRID(GRID_in));};
1068 #endif
1069 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1070  int LRID( long long GRID_in) const {return(Graph_->LRID(GRID_in));};
1071 #endif
1072 
1074 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1075  int GRID(int LRID_in) const {return(Graph_->GRID(LRID_in));};
1076 #endif
1077  long long GRID64( int LRID_in) const {return(Graph_->GRID64(LRID_in));};
1078 
1080 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1081  int LCID( int GCID_in) const {return(Graph_->LCID(GCID_in));};
1082 #endif
1083 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1084  int LCID( long long GCID_in) const {return(Graph_->LCID(GCID_in));};
1085 #endif
1086 
1088 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1089  int GCID(int LCID_in) const {return(Graph_->GCID(LCID_in));};
1090 #endif
1091  long long GCID64( int LCID_in) const {return(Graph_->GCID64(LCID_in));};
1092 
1094 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1095  bool MyGRID(int GRID_in) const {return(Graph_->MyGRID(GRID_in));};
1096 #endif
1097 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1098  bool MyGRID(long long GRID_in) const {return(Graph_->MyGRID(GRID_in));};
1099 #endif
1100 
1102  bool MyLRID(int LRID_in) const {return(Graph_->MyLRID(LRID_in));};
1103 
1105 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1106  bool MyGCID(int GCID_in) const {return(Graph_->MyGCID(GCID_in));};
1107 #endif
1108 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1109  bool MyGCID(long long GCID_in) const {return(Graph_->MyGCID(GCID_in));};
1110 #endif
1111 
1113  bool MyLCID(int LCID_in) const {return(Graph_->MyLCID(LCID_in));};
1114 
1116 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1117  bool MyGlobalBlockRow(int GID) const {return(Graph_->MyGlobalRow(GID));};
1118 #endif
1119 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1120  bool MyGlobalBlockRow(long long GID) const {return(Graph_->MyGlobalRow(GID));};
1121 #endif
1122 
1123 
1125 
1126 
1128  virtual void Print(std::ostream & os) const;
1130 
1132 
1133 
1135  const char * Label() const {return(Epetra_Object::Label());};
1136 
1138 
1147  int SetUseTranspose(bool UseTranspose_in) {UseTranspose_ = UseTranspose_in; return(0);};
1148 
1150 
1158  int Apply(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
1159 
1161 
1174  int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
1175 
1177  bool HasNormInf() const {return(true);};
1178 
1180  bool UseTranspose() const {return(UseTranspose_);};
1181 
1184  {
1185  if (!HavePointObjects_) GeneratePointObjects();
1186  if (UseTranspose()) return(*OperatorRangeMap_);
1187  else return(*OperatorDomainMap_);
1188  }
1189 
1192  {
1193  if (!HavePointObjects_) GeneratePointObjects();
1194  if (UseTranspose()) return(*OperatorDomainMap_);
1195  else return(*OperatorRangeMap_);
1196  }
1197 
1199 
1201 
1203 
1217  int ExtractGlobalRowCopy(int GlobalRow, int Length, int & NumEntries, double *Values, int * Indices) const;
1218 
1220 
1234  int ExtractMyRowCopy(int MyRow, int Length, int & NumEntries, double *Values, int * Indices) const;
1235 
1237 
1245  int NumMyRowEntries(int MyRow, int & NumEntries) const;
1246 
1248  int MaxNumEntries() const;
1249 
1251  const Epetra_BlockMap& Map() const { return Epetra_DistObject::Map(); }
1252 
1254  const Epetra_Map & RowMatrixRowMap() const
1255  { if (!HavePointObjects_) GeneratePointObjects(); return(*RowMatrixRowMap_); };
1256 
1258  const Epetra_Map & RowMatrixColMap() const
1259  { if (!HavePointObjects_) GeneratePointObjects(); return(*RowMatrixColMap_); };
1260 
1263  { if (!HavePointObjects_) GeneratePointObjects(); return(RowMatrixImporter_); };
1264 
1266 
1268 
1269 
1271  const Epetra_BlockMap & BlockImportMap() const {return(Graph_->ImportMap());};
1272 
1274  int TransformToLocal();
1275 
1277  int TransformToLocal(const Epetra_BlockMap* DomainMap, const Epetra_BlockMap* RangeMap);
1279 
1280  protected:
1281  void DeleteMemory();
1282  bool Allocated() const {return(Allocated_);};
1283  int SetAllocated(bool Flag) {Allocated_ = Flag; return(0);};
1284  Epetra_SerialDenseMatrix *** Values() const {return(Entries_);};
1285 
1286  // Internal utilities
1287 
1288  int DoMultiply(bool TransA, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
1289  int DoSolve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
1290  void InitializeDefaults();
1291  int Allocate();
1292  int BeginInsertValues(int BlockRow, int NumBlockEntries,
1293  int * BlockIndices, bool IndicesAreLocal);
1294  int BeginReplaceValues(int BlockRow, int NumBlockEntries,
1295  int *BlockIndices, bool IndicesAreLocal);
1296  int BeginSumIntoValues(int BlockRow, int NumBlockEntries,
1297  int *BlockIndices, bool IndicesAreLocal);
1298  int SetupForSubmits(int BlockRow, int NumBlockEntries, int * BlockIndices,
1299  bool IndicesAreLocal, Epetra_CombineMode SubmitMode);
1300  int EndReplaceSumIntoValues();
1301  int EndInsertValues();
1302 
1303  int CopyMat(double * A, int LDA, int NumRows, int NumCols,
1304  double * B, int LDB, bool SumInto) const;
1305  int BeginExtractBlockRowCopy(int BlockRow, int MaxNumBlockEntries,
1306  int & RowDim, int & NumBlockEntries,
1307  int * BlockIndices, int * ColDims,
1308  bool IndicesAreLocal) const;
1309  int SetupForExtracts(int BlockRow, int & RowDim, int NumBlockEntries,
1310  bool ExtractView, bool IndicesAreLocal) const;
1311  int ExtractBlockDimsCopy(int NumBlockEntries, int * ColDims) const;
1312  int ExtractBlockRowPointers(int BlockRow, int MaxNumBlockEntries,
1313  int & RowDim, int & NumBlockEntries,
1314  int * BlockIndices,
1315  Epetra_SerialDenseMatrix ** & Values,
1316  bool IndicesAreLocal) const;
1317  int BeginExtractBlockRowView(int BlockRow, int & RowDim, int & NumBlockEntries,
1318  int * & BlockIndices,
1319  bool IndicesAreLocal) const;
1320  int CopyMatDiag(double * A, int LDA, int NumRows, int NumCols,
1321  double * Diagonal) const;
1322  int ReplaceMatDiag(double * A, int LDA, int NumRows, int NumCols,
1323  double * Diagonal);
1324 
1325  //This BlockRowMultiply accepts Alpha and Beta arguments. It is called
1326  //from within the 'solve' methods.
1327  void BlockRowMultiply(bool TransA, int RowDim, int NumEntries,
1328  int * BlockIndices, int RowOff,
1329  int * FirstPointInElementList, int * ElementSizeList,
1330  double Alpha, Epetra_SerialDenseMatrix** As,
1331  double ** X, double Beta, double ** Y, int NumVectors) const;
1332 
1333  //This BlockRowMultiply doesn't accept Alpha and Beta arguments, instead it
1334  //assumes that they are both 1.0. It is called from within the 'Multiply'
1335  //methods.
1336  void BlockRowMultiply(bool TransA, int RowDim, int NumEntries,
1337  int * BlockIndices, int RowOff,
1338  int * FirstPointInElementList,
1339  int * ElementSizeList,
1341  double ** X, double ** Y, int NumVectors) const;
1342  //
1343  // Assumes Alpha=Beta=1 and works only on storage optimized matrices
1344  //
1345  void FastBlockRowMultiply(bool TransA, int RowDim, int NumEntries,
1346  int * BlockIndices, int RowOff,
1347  int * FirstPointInElementList,
1348  int * ElementSizeList,
1350  double ** X, double ** Y, int NumVectors) const;
1351 
1352  int InverseSums(bool DoRows, Epetra_Vector& x) const;
1353  int Scale(bool DoRows, const Epetra_Vector& x);
1354  void BlockRowNormInf(int RowDim, int NumEntries,
1356  double * Y) const;
1357  void BlockRowNormOne(int RowDim, int NumEntries, int * BlockRowIndices,
1359  int * ColFirstPointInElementList, double * x) const;
1360  void SetStaticGraph(bool Flag) {StaticGraph_ = Flag;};
1361 
1362  int CheckSizes(const Epetra_SrcDistObject& A);
1363 
1364  int CopyAndPermute(const Epetra_SrcDistObject & Source,
1365  int NumSameIDs,
1366  int NumPermuteIDs,
1367  int * PermuteToLIDs,
1368  int *PermuteFromLIDs,
1369  const Epetra_OffsetIndex * Indexor,
1370  Epetra_CombineMode CombineMode = Zero);
1371 
1372  int PackAndPrepare(const Epetra_SrcDistObject & Source,
1373  int NumExportIDs,
1374  int * ExportLIDs,
1375  int & LenExports,
1376  char * & Exports,
1377  int & SizeOfPacket,
1378  int * Sizes,
1379  bool & VarSizes,
1380  Epetra_Distributor & Distor);
1381 
1382  int UnpackAndCombine(const Epetra_SrcDistObject & Source,
1383  int NumImportIDs,
1384  int * ImportLIDs,
1385  int LenImports,
1386  char * Imports,
1387  int & SizeOfPacket,
1388  Epetra_Distributor & Distor,
1389  Epetra_CombineMode CombineMode,
1390  const Epetra_OffsetIndex * Indexor);
1391 
1393  int SortEntries();
1394 
1396  bool Sorted() const {return(Graph_->Sorted());};
1397 
1399  int MergeRedundantEntries();
1400 
1402  bool NoRedundancies() const {return(Graph_->NoRedundancies());};
1403 
1404  bool StaticGraph() const {return(StaticGraph_);};
1405 
1406  int GeneratePointObjects() const;
1407  int BlockMap2PointMap(const Epetra_BlockMap & BlockMap, Epetra_Map * & PointMap) const;
1408  int UpdateOperatorXY(const Epetra_MultiVector& X, const Epetra_MultiVector& Y) const;
1409 
1417 
1419 
1421 
1422 
1425  int ** Indices_;
1428 
1430 
1432  double *All_Values_;
1433 
1434  mutable double NormInf_;
1435  mutable double NormOne_;
1436  mutable double NormFrob_;
1437 
1440 
1441  // State variables needed for constructing matrix entry-by-entry
1442  mutable int *TempRowDims_;
1444  mutable int LenTemps_;
1445  mutable int CurBlockRow_;
1446  mutable int CurNumBlockEntries_;
1447  mutable int * CurBlockIndices_;
1448  mutable int CurEntry_;
1449  mutable bool CurIndicesAreLocal_;
1451 
1452  // State variables needed for extracting entries
1453  mutable int CurExtractBlockRow_;
1454  mutable int CurExtractEntry_;
1457  mutable bool CurExtractView_;
1458  mutable int CurRowDim_;
1459 
1460  // State variable for extracting block diagonal entries
1461  mutable int CurBlockDiag_;
1462 
1463  // Maps and importer that support the Epetra_RowMatrix interface
1467 
1468  // Maps that support the Epetra_Operator interface
1473 
1474  // bool to indicate if above four point maps and importer have already been created
1475  mutable bool HavePointObjects_;
1476 
1478 };
1479 
1480 #endif /* EPETRA_VBRMATRIX_H */
Epetra_VbrMatrix::NumGlobalBlockEntries
int NumGlobalBlockEntries(int Row) const
Returns the current number of nonzero Block entries in specified global row on this processor.
Definition: Epetra_VbrMatrix.h:995
Epetra_VbrMatrix::Exporter
const Epetra_Export * Exporter() const
Returns the Epetra_Export object that contains the export operations for distributed operations.
Definition: Epetra_VbrMatrix.h:1042
Epetra_VbrMatrix::NumMyBlockEntries
int NumMyBlockEntries(int Row) const
Returns the current number of nonzero Block entries in specified local row on this processor.
Definition: Epetra_VbrMatrix.h:1007
Epetra_VbrMatrix::GlobalMaxNumBlockEntries
int GlobalMaxNumBlockEntries() const
Returns the maximum number of nonzero entries across all rows on this processor.
Definition: Epetra_VbrMatrix.h:1004
Epetra_VbrMatrix::RowMatrixColMap_
Epetra_Map * RowMatrixColMap_
Definition: Epetra_VbrMatrix.h:1465
Epetra_VbrMatrix::LowerTriangular
bool LowerTriangular() const
If matrix is lower triangular in local index space, this query returns true, otherwise it returns fal...
Definition: Epetra_VbrMatrix.h:870
Epetra_VbrMatrix::NumGlobalDiagonals
int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisions.
Definition: Epetra_VbrMatrix.h:990
Epetra_VbrMatrix::ColMap
const Epetra_BlockMap & ColMap() const
Returns the ColMap as an Epetra_BlockMap (the Epetra_Map base class) needed for implementing Epetra_R...
Definition: Epetra_VbrMatrix.h:1054
Epetra_VbrMatrix::GCID64
long long GCID64(int LCID_in) const
Definition: Epetra_VbrMatrix.h:1091
Epetra_VbrMatrix::CurEntry_
int CurEntry_
Definition: Epetra_VbrMatrix.h:1448
Epetra_VbrMatrix::TempRowDims_
int * TempRowDims_
Definition: Epetra_VbrMatrix.h:1442
Epetra_VbrMatrix::MyGCID
bool MyGCID(long long GCID_in) const
Definition: Epetra_VbrMatrix.h:1109
Epetra_RowMatrix::ExtractDiagonalCopy
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const =0
Returns a copy of the main diagonal in a user-provided vector.
Epetra_Operator::Apply
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
Epetra_VbrMatrix::RowMatrixColMap
const Epetra_Map & RowMatrixColMap() const
Returns the Epetra_Map object associated with columns of this matrix.
Definition: Epetra_VbrMatrix.h:1258
Epetra_VbrMatrix::NumGlobalCols
int NumGlobalCols() const
Returns the number of global matrix columns.
Definition: Epetra_VbrMatrix.h:933
Epetra_VbrMatrix::NumAllocatedMyBlockEntries
int NumAllocatedMyBlockEntries(int Row) const
Returns the allocated number of nonzero Block entries in specified local row on this processor.
Definition: Epetra_VbrMatrix.h:1010
Epetra_VbrMatrix::NumGlobalNonzeros
int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
Definition: Epetra_VbrMatrix.h:945
Epetra_VbrMatrix::CV_
Epetra_DataAccess CV_
Definition: Epetra_VbrMatrix.h:1420
Epetra_VbrMatrix::IndicesAreContiguous
bool IndicesAreContiguous() const
If matrix indices are packed into single array (done in OptimizeStorage()) return true,...
Definition: Epetra_VbrMatrix.h:867
Epetra_VbrMatrix::StorageOptimized
bool StorageOptimized() const
If OptimizeStorage() has been called, this query returns true, otherwise it returns false.
Definition: Epetra_VbrMatrix.h:858
Epetra_VbrMatrix::CurBlockIndices_
int * CurBlockIndices_
Definition: Epetra_VbrMatrix.h:1447
Epetra_VbrMatrix::Filled
bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
Definition: Epetra_VbrMatrix.h:470
Epetra_DistObject::UnpackAndCombine
virtual int UnpackAndCombine(const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor)=0
Perform any unpacking and combining after call to DoTransfer().
Epetra_VbrMatrix::CurExtractEntry_
int CurExtractEntry_
Definition: Epetra_VbrMatrix.h:1454
Epetra_VbrMatrix::RangeMap
const Epetra_BlockMap & RangeMap() const
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
Definition: Epetra_VbrMatrix.h:1048
Epetra_VbrMatrix::MaxNumNonzeros
int MaxNumNonzeros() const
Returns the maximum number of nonzero entries across all block rows on this processor.
Definition: Epetra_VbrMatrix.h:1017
Epetra_DistObject::PackAndPrepare
virtual int PackAndPrepare(const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor)=0
Perform any packing or preparation required for call to DoTransfer().
Epetra_VbrMatrix::NumAllocatedBlockEntriesPerRow_
int * NumAllocatedBlockEntriesPerRow_
Definition: Epetra_VbrMatrix.h:1424
Epetra_VbrMatrix::NumGlobalBlockEntries64
long long NumGlobalBlockEntries64() const
Definition: Epetra_VbrMatrix.h:980
Epetra_VbrMatrix::StaticGraph_
bool StaticGraph_
Definition: Epetra_VbrMatrix.h:1412
Epetra_VbrMatrix::OperatorRangeMap_
Epetra_Map * OperatorRangeMap_
Definition: Epetra_VbrMatrix.h:1470
Epetra_SrcDistObject
Epetra_SrcDistObject: A class for supporting flexible source distributed objects for import/export op...
Definition: Epetra_SrcDistObject.h:63
Epetra_VbrMatrix::Indices_
int ** Indices_
Definition: Epetra_VbrMatrix.h:1425
Epetra_VbrMatrix::All_Values_Orig_
double * All_Values_Orig_
Definition: Epetra_VbrMatrix.h:1431
Epetra_VbrMatrix::Allocated_
bool Allocated_
Definition: Epetra_VbrMatrix.h:1411
Epetra_VbrMatrix::SetUseTranspose
int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
Definition: Epetra_VbrMatrix.h:1147
Epetra_VbrMatrix::BlockImportMap
const Epetra_BlockMap & BlockImportMap() const
Use BlockColMap() instead.
Definition: Epetra_VbrMatrix.h:1271
Epetra_DistObject::Map
const Epetra_BlockMap & Map() const
Returns the address of the Epetra_BlockMap for this multi-vector.
Definition: Epetra_DistObject.h:192
Epetra_RowMatrix.h
Epetra_VbrMatrix::GCID
int GCID(int LCID_in) const
Returns the global column index for give local column index, returns IndexBase-1 if we don't have thi...
Definition: Epetra_VbrMatrix.h:1089
Epetra_RowMatrix::NumMyRowEntries
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const =0
Returns the number of nonzero entries in MyRow.
Epetra_DistObject::CopyAndPermute
virtual int CopyAndPermute(const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero)=0
Perform ID copies and permutations that are on processor.
Epetra_DistObject.h
Epetra_VbrMatrix::ExportVector_
Epetra_MultiVector * ExportVector_
Definition: Epetra_VbrMatrix.h:1439
Epetra_VbrMatrix::HasNormInf
bool HasNormInf() const
Returns true because this class can compute an Inf-norm.
Definition: Epetra_VbrMatrix.h:1177
Epetra_CompObject.h
Epetra_VbrMatrix::LenTemps_
int LenTemps_
Definition: Epetra_VbrMatrix.h:1444
Epetra_VbrMatrix::NormInf_
double NormInf_
Definition: Epetra_VbrMatrix.h:1434
Epetra_VbrMatrix::DomainMap
const Epetra_BlockMap & DomainMap() const
Returns the Epetra_BlockMap object associated with the domain of this matrix operator.
Definition: Epetra_VbrMatrix.h:1045
Epetra_VbrMatrix::NumMyRows
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
Definition: Epetra_VbrMatrix.h:918
Epetra_VbrMatrix::NumMyCols
int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
Definition: Epetra_VbrMatrix.h:920
Epetra_VbrMatrix::RowMap
const Epetra_BlockMap & RowMap() const
Returns the RowMap object as an Epetra_BlockMap (the Epetra_Map base class) needed for implementing E...
Definition: Epetra_VbrMatrix.h:1051
Epetra_VbrMatrix::NumMyNonzeros
int NumMyNonzeros() const
Returns the number of nonzero entriesowned by the calling processor .
Definition: Epetra_VbrMatrix.h:923
Epetra_VbrMatrix::UpperTriangular
bool UpperTriangular() const
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
Definition: Epetra_VbrMatrix.h:873
Epetra_RowMatrix::NormInf
virtual double NormInf() const =0
Returns the infinity norm of the global matrix.
Epetra_VbrMatrix::ImportVector_
Epetra_MultiVector * ImportVector_
Definition: Epetra_VbrMatrix.h:1438
Epetra_VbrMatrix::Map
const Epetra_BlockMap & Map() const
Map() method inherited from Epetra_DistObject.
Definition: Epetra_VbrMatrix.h:1251
Epetra_VbrMatrix::NumGlobalBlockCols
int NumGlobalBlockCols() const
Returns the number of global Block matrix columns.
Definition: Epetra_VbrMatrix.h:972
Epetra_BLAS.h
Epetra_VbrMatrix::UseTranspose_
bool UseTranspose_
Definition: Epetra_VbrMatrix.h:1413
Epetra_VbrMatrix::SetAllocated
int SetAllocated(bool Flag)
Definition: Epetra_VbrMatrix.h:1283
Epetra_VbrMatrix::RowMatrixImporter
const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations.
Definition: Epetra_VbrMatrix.h:1262
Epetra_VbrMatrix::CurExtractIndicesAreLocal_
bool CurExtractIndicesAreLocal_
Definition: Epetra_VbrMatrix.h:1456
Epetra_Comm
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:73
Epetra_VbrMatrix::MyGRID
bool MyGRID(long long GRID_in) const
Definition: Epetra_VbrMatrix.h:1098
Epetra_VbrMatrix::MyGlobalBlockRow
bool MyGlobalBlockRow(long long GID) const
Definition: Epetra_VbrMatrix.h:1120
Epetra_VbrMatrix::NumMyBlockRows
int NumMyBlockRows() const
Returns the number of Block matrix rows owned by the calling processor.
Definition: Epetra_VbrMatrix.h:950
Epetra_RowMatrix::RightScale
virtual int RightScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x.
Zero
Definition: Epetra_CombineMode.h:66
Epetra_VbrMatrix::SetStaticGraph
void SetStaticGraph(bool Flag)
Definition: Epetra_VbrMatrix.h:1360
Epetra_VbrMatrix::MyLCID
bool MyLCID(int LCID_in) const
Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns fa...
Definition: Epetra_VbrMatrix.h:1113
Epetra_VbrMatrix::Label
const char * Label() const
Returns a character string describing the operator.
Definition: Epetra_VbrMatrix.h:1135
Epetra_VbrMatrix::FirstPointInElementList_
int * FirstPointInElementList_
Definition: Epetra_VbrMatrix.h:1427
Epetra_VbrMatrix::NumGlobalBlockRows64
long long NumGlobalBlockRows64() const
Definition: Epetra_VbrMatrix.h:968
Epetra_VbrMatrix::Comm
const Epetra_Comm & Comm() const
Fills a matrix with rows from a source matrix based on the specified importer.
Definition: Epetra_VbrMatrix.h:1059
Epetra_VbrMatrix::Sorted
bool Sorted() const
If SortEntries() has been called, this query returns true, otherwise it returns false.
Definition: Epetra_VbrMatrix.h:1396
Epetra_VbrMatrix::ElementSizeList_
int * ElementSizeList_
Definition: Epetra_VbrMatrix.h:1426
Epetra_VbrMatrix::NumGlobalBlockEntries
int NumGlobalBlockEntries() const
Returns the number of nonzero block entries in the global matrix.
Definition: Epetra_VbrMatrix.h:978
Epetra_VbrMatrix::NumMyBlockRows_
int NumMyBlockRows_
Definition: Epetra_VbrMatrix.h:1418
Epetra_VbrMatrix::All_Values_
double * All_Values_
Definition: Epetra_VbrMatrix.h:1432
Epetra_VbrMatrix::squareFillCompleteCalled_
bool squareFillCompleteCalled_
Definition: Epetra_VbrMatrix.h:1477
Epetra_VbrMatrix::NumMyBlockCols
int NumMyBlockCols() const
Returns the number of Block matrix columns owned by the calling processor.
Definition: Epetra_VbrMatrix.h:953
Epetra_VbrMatrix::NumGlobalRows64
long long NumGlobalRows64() const
Definition: Epetra_VbrMatrix.h:929
Epetra_VbrMatrix::Allocated
bool Allocated() const
Definition: Epetra_VbrMatrix.h:1282
Epetra_VbrMatrix::MaxRowDim
int MaxRowDim() const
Returns the maximum row dimension of all block entries on this processor.
Definition: Epetra_VbrMatrix.h:906
Epetra_VbrMatrix::matrixFillCompleteCalled_
bool matrixFillCompleteCalled_
Definition: Epetra_VbrMatrix.h:1415
Epetra_CompObject::operator=
Epetra_CompObject & operator=(const Epetra_CompObject &src)
Definition: Epetra_CompObject.h:114
Epetra_VbrMatrix::MaxColDim
int MaxColDim() const
Returns the maximum column dimension of all block entries on this processor.
Definition: Epetra_VbrMatrix.h:909
Epetra_VbrMatrix::RowMatrixImporter_
Epetra_Import * RowMatrixImporter_
Definition: Epetra_VbrMatrix.h:1466
Epetra_VbrMatrix::OperatorRangeMap
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this matrix operator.
Definition: Epetra_VbrMatrix.h:1191
Epetra_RowMatrix
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices.
Definition: Epetra_RowMatrix.h:68
Epetra_VbrMatrix::NumGlobalCols64
long long NumGlobalCols64() const
Definition: Epetra_VbrMatrix.h:935
Epetra_VbrMatrix::NumGlobalNonzeros64
long long NumGlobalNonzeros64() const
Definition: Epetra_VbrMatrix.h:947
Epetra_DataAccess
Epetra_DataAccess
Definition: Epetra_DataAccess.h:55
Epetra_VbrMatrix::MyGlobalBlockRow
bool MyGlobalBlockRow(int GID) const
Returns true of GID is owned by the calling processor, otherwise it returns false.
Definition: Epetra_VbrMatrix.h:1117
Epetra_Operator::ApplyInverse
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.
Epetra_VbrMatrix::RowMatrixRowMap_
Epetra_Map * RowMatrixRowMap_
Definition: Epetra_VbrMatrix.h:1464
Epetra_VbrMatrix::NumMyBlockEntries
int NumMyBlockEntries() const
Returns the number of nonzero block entries in the calling processor's portion of the matrix.
Definition: Epetra_VbrMatrix.h:956
Epetra_VbrMatrix::OperatorY_
Epetra_MultiVector * OperatorY_
Definition: Epetra_VbrMatrix.h:1472
Epetra_VbrMatrix::TempEntries_
Epetra_SerialDenseMatrix ** TempEntries_
Definition: Epetra_VbrMatrix.h:1443
Epetra_VbrMatrix::LCID
int LCID(int GCID_in) const
Returns the local column index for given global column index, returns -1 if no local column for this ...
Definition: Epetra_VbrMatrix.h:1081
Epetra_VbrMatrix::Graph
const Epetra_CrsGraph & Graph() const
Returns a pointer to the Epetra_CrsGraph object associated with this matrix.
Definition: Epetra_VbrMatrix.h:1036
Epetra_Object::Label
virtual const char * Label() const
Epetra_Object Label access funtion.
Definition: Epetra_Object.cpp:130
Epetra_VbrMatrix::CurRowDim_
int CurRowDim_
Definition: Epetra_VbrMatrix.h:1458
Epetra_RowMatrix::LeftScale
virtual int LeftScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x.
Epetra_VbrMatrix::Values
Epetra_SerialDenseMatrix *** Values() const
Definition: Epetra_VbrMatrix.h:1284
Epetra_VbrMatrix::OperatorDomainMap_
Epetra_Map * OperatorDomainMap_
Definition: Epetra_VbrMatrix.h:1469
Epetra_RowMatrix::InvRowSums
virtual int InvRowSums(Epetra_Vector &x) const =0
Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x.
Epetra_BLAS
Epetra_BLAS: The Epetra BLAS Wrapper Class.
Definition: Epetra_BLAS.h:70
Epetra_BlockMap
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Definition: Epetra_BlockMap.h:194
Epetra_VbrMatrix::MaxNumBlockEntries
int MaxNumBlockEntries() const
Returns the maximum number of nonzero entries across all rows on this processor.
Definition: Epetra_VbrMatrix.h:1001
Epetra_Vector
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.
Definition: Epetra_Vector.h:142
Epetra_VbrMatrix::StorageOptimized_
bool StorageOptimized_
Definition: Epetra_VbrMatrix.h:1416
Epetra_VbrMatrix::GlobalMaxColDim
int GlobalMaxColDim() const
Returns the maximum column dimension of all block entries across all processors.
Definition: Epetra_VbrMatrix.h:915
Epetra_CombineMode
Epetra_CombineMode
Definition: Epetra_CombineMode.h:64
Epetra_VbrMatrix::IndexBase64
long long IndexBase64() const
Definition: Epetra_VbrMatrix.h:1033
Epetra_VbrMatrix::CurExtractView_
bool CurExtractView_
Definition: Epetra_VbrMatrix.h:1457
Epetra_VbrMatrix::MyGRID
bool MyGRID(int GRID_in) const
Returns true if the GRID passed in belongs to the calling processor in this map, otherwise returns fa...
Definition: Epetra_VbrMatrix.h:1095
Epetra_OffsetIndex
Epetra_OffsetIndex: This class builds index for efficient mapping of data from one Epetra_CrsGraph ba...
Definition: Epetra_OffsetIndex.h:60
Epetra_SerialDenseMatrix.h
Epetra_VbrMatrix::LCID
int LCID(long long GCID_in) const
Definition: Epetra_VbrMatrix.h:1084
Epetra_VbrMatrix::CurBlockRow_
int CurBlockRow_
Definition: Epetra_VbrMatrix.h:1445
Epetra_VbrMatrix::constructedWithFilledGraph_
bool constructedWithFilledGraph_
Definition: Epetra_VbrMatrix.h:1414
Epetra_RowMatrix::ExtractMyRowCopy
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const =0
Returns a copy of the specified local row in user-provided arrays.
Epetra_VbrMatrix::NormOne_
double NormOne_
Definition: Epetra_VbrMatrix.h:1435
Epetra_VbrMatrix::GRID64
long long GRID64(int LRID_in) const
Definition: Epetra_VbrMatrix.h:1077
Epetra_ConfigDefs.h
Epetra_VbrMatrix::GRID
int GRID(int LRID_in) const
Returns the global row index for give local row index, returns IndexBase-1 if we don't have this loca...
Definition: Epetra_VbrMatrix.h:1075
Epetra_VbrMatrix::HavePointObjects_
bool HavePointObjects_
Definition: Epetra_VbrMatrix.h:1475
Epetra_VbrMatrix::CurExtractNumBlockEntries_
int CurExtractNumBlockEntries_
Definition: Epetra_VbrMatrix.h:1455
Epetra_RowMatrix::MaxNumEntries
virtual int MaxNumEntries() const =0
Returns the maximum of NumMyRowEntries() over all rows.
Epetra_VbrMatrix::NumBlockEntriesPerRow_
int * NumBlockEntriesPerRow_
Definition: Epetra_VbrMatrix.h:1423
Epetra_VbrMatrix::NumGlobalDiagonals64
long long NumGlobalDiagonals64() const
Definition: Epetra_VbrMatrix.h:992
Epetra_CrsGraph
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs.
Definition: Epetra_CrsGraph.h:213
Epetra_VbrMatrix::RowMatrixRowMap
const Epetra_Map & RowMatrixRowMap() const
Returns the EpetraMap object associated with the rows of this matrix.
Definition: Epetra_VbrMatrix.h:1254
Epetra_VbrMatrix::CurBlockDiag_
int CurBlockDiag_
Definition: Epetra_VbrMatrix.h:1461
Epetra_VbrMatrix::NumGlobalBlockDiagonals
int NumGlobalBlockDiagonals() const
Returns the number of global nonzero block diagonal entries, based on global row/column index compari...
Definition: Epetra_VbrMatrix.h:984
Epetra_VbrMatrix::StaticGraph
bool StaticGraph() const
Definition: Epetra_VbrMatrix.h:1404
Epetra_VbrMatrix::OperatorX_
Epetra_MultiVector * OperatorX_
Definition: Epetra_VbrMatrix.h:1471
Epetra_MultiVector
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
Definition: Epetra_MultiVector.h:184
Epetra_VbrMatrix::IndicesAreGlobal
bool IndicesAreGlobal() const
If matrix indices has not been transformed to local, this query returns true, otherwise it returns fa...
Definition: Epetra_VbrMatrix.h:861
Epetra_VbrMatrix::Graph_
Epetra_CrsGraph * Graph_
Definition: Epetra_VbrMatrix.h:1410
Epetra_RowMatrix::Solve
virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X a...
A
Epetra_VbrMatrix::NumAllocatedGlobalBlockEntries
int NumAllocatedGlobalBlockEntries(int Row) const
Returns the allocated number of nonzero Block entries in specified global row on this processor.
Definition: Epetra_VbrMatrix.h:998
Epetra_DistObject
Epetra_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in pa...
Definition: Epetra_DistObject.h:80
Epetra_VbrMatrix::NumGlobalBlockCols64
long long NumGlobalBlockCols64() const
Definition: Epetra_VbrMatrix.h:974
Epetra_CrsGraph.h
Epetra_VbrMatrix::CurNumBlockEntries_
int CurNumBlockEntries_
Definition: Epetra_VbrMatrix.h:1446
Epetra_VbrMatrix::UseTranspose
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: Epetra_VbrMatrix.h:1180
Epetra_CompObject
Epetra_CompObject: Functionality and data that is common to all computational classes.
Definition: Epetra_CompObject.h:57
Epetra_VbrMatrix::NormFrob_
double NormFrob_
Definition: Epetra_VbrMatrix.h:1436
Epetra_VbrMatrix::Importer
const Epetra_Import * Importer() const
Returns the Epetra_Import object that contains the import operations for distributed operations.
Definition: Epetra_VbrMatrix.h:1039
Epetra_VbrMatrix::NoDiagonal
bool NoDiagonal() const
If matrix has no diagonal entries based on global row/column index comparisons, this query returns tr...
Definition: Epetra_VbrMatrix.h:876
Epetra_DistObject::Print
virtual void Print(std::ostream &os) const
Print method.
Definition: Epetra_DistObject.cpp:294
Epetra_VbrMatrix::MyLRID
bool MyLRID(int LRID_in) const
Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns fa...
Definition: Epetra_VbrMatrix.h:1102
Epetra_VbrMatrix::Entries_
Epetra_SerialDenseMatrix *** Entries_
Definition: Epetra_VbrMatrix.h:1429
Epetra_Distributor
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
Definition: Epetra_Distributor.h:61
Epetra_VbrMatrix::CurIndicesAreLocal_
bool CurIndicesAreLocal_
Definition: Epetra_VbrMatrix.h:1449
Epetra_VbrMatrix::NumGlobalRows
int NumGlobalRows() const
Returns the number of global matrix rows.
Definition: Epetra_VbrMatrix.h:927
Epetra_VbrMatrix::NoRedundancies
bool NoRedundancies() const
If MergeRedundantEntries() has been called, this query returns true, otherwise it returns false.
Definition: Epetra_VbrMatrix.h:1402
Epetra_VbrMatrix
Epetra_VbrMatrix: A class for the construction and use of real-valued double-precision variable block...
Definition: Epetra_VbrMatrix.h:172
Epetra_VbrMatrix::NumGlobalBlockRows
int NumGlobalBlockRows() const
Returns the number of global Block matrix rows.
Definition: Epetra_VbrMatrix.h:966
Epetra_Operator::UseTranspose
virtual bool UseTranspose() const =0
Returns the current UseTranspose setting.
Epetra_VbrMatrix::LRID
int LRID(int GRID_in) const
Returns the local row index for given global row index, returns -1 if no local row for this global ro...
Definition: Epetra_VbrMatrix.h:1067
Epetra_VbrMatrix::NumMyDiagonals
int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
Definition: Epetra_VbrMatrix.h:962
Epetra_Export
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements.
Definition: Epetra_Export.h:62
Epetra_VbrMatrix::CurExtractBlockRow_
int CurExtractBlockRow_
Definition: Epetra_VbrMatrix.h:1453
Epetra_VbrMatrix::GlobalMaxNumNonzeros
int GlobalMaxNumNonzeros() const
Returns the maximum number of nonzero entries across all block rows on all processors.
Definition: Epetra_VbrMatrix.h:1022
Epetra_SerialDenseMatrix
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
Definition: Epetra_SerialDenseMatrix.h:107
Epetra_Map
Epetra_Map: A class for partitioning vectors and matrices.
Definition: Epetra_Map.h:119
Epetra_RowMatrix::NormOne
virtual double NormOne() const =0
Returns the one norm of the global matrix.
Epetra_VbrMatrix::NumGlobalBlockDiagonals64
long long NumGlobalBlockDiagonals64() const
Definition: Epetra_VbrMatrix.h:986
Epetra_VbrMatrix::NumMyBlockDiagonals
int NumMyBlockDiagonals() const
Returns the number of local nonzero block diagonal entries, based on global row/column index comparis...
Definition: Epetra_VbrMatrix.h:959
Epetra_RowMatrix::Multiply
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y.
Epetra_VbrMatrix::GlobalMaxRowDim
int GlobalMaxRowDim() const
Returns the maximum row dimension of all block entries across all processors.
Definition: Epetra_VbrMatrix.h:912
Epetra_Operator.h
Epetra_Import
Epetra_Import: This class builds an import object for efficient importing of off-processor elements.
Definition: Epetra_Import.h:63
Epetra_DistObject::CheckSizes
virtual int CheckSizes(const Epetra_SrcDistObject &Source)=0
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.
Epetra_RowMatrix::InvColSums
virtual int InvColSums(Epetra_Vector &x) const =0
Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x.
Epetra_VbrMatrix::MyGCID
bool MyGCID(int GCID_in) const
Returns true if the GCID passed in belongs to the calling processor in this map, otherwise returns fa...
Definition: Epetra_VbrMatrix.h:1106
B
Epetra_VbrMatrix::IndicesAreLocal
bool IndicesAreLocal() const
If matrix indices has been transformed to local, this query returns true, otherwise it returns false.
Definition: Epetra_VbrMatrix.h:864
Epetra_VbrMatrix::CurSubmitMode_
Epetra_CombineMode CurSubmitMode_
Definition: Epetra_VbrMatrix.h:1450
Epetra_VbrMatrix::OperatorDomainMap
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this matrix operator.
Definition: Epetra_VbrMatrix.h:1183
Epetra_VbrMatrix::LRID
int LRID(long long GRID_in) const
Definition: Epetra_VbrMatrix.h:1070