52#include <Teuchos_TimeMonitor.hpp>
62 double *tmp =
new double[nnew];
63 for(
int i=0; i<nold; i++)
86#ifdef ENABLE_TRANSPOSE_TIMINGS
87 Teuchos::Time myTime(
"global");
88 Teuchos::TimeMonitor MM(myTime);
89 Teuchos::RCP<Teuchos::Time> mtime;
90 mtime=MM.getNewTimer(
"Transpose: CreateTransposeLocal 1");
99 const Epetra_Map & TransMap = orig.RowMatrixColMap();
100 int TransNnz = orig.NumMyNonzeros();
111 TransColind.
Resize(TransNnz);
123 if (err != 0)
throw OrigGraph.
ReportError(
"ExtractMyRowView failed",err);
124 for (j=0; j<NumIndices; j++) ++CurrentStart[
Indices_[j]];
139 std::cerr <<
"ExtractMyRowCopy failed."<<std::endl;
142 for (j=0; j<NumIndices; j++) ++CurrentStart[
Indices_[j]];
148 for (i=1;i<
NumMyCols_+1; i++) TransRowptr[i] = CurrentStart[i-1] + TransRowptr[i-1];
149 for (i=0;i<
NumMyCols_; i++) CurrentStart[i] = TransRowptr[i];
159 std::cerr <<
"ExtractMyRowCopy failed."<<std::endl;
163 for (j=0; j<NumIndices; j++)
165 int idx = CurrentStart[
Indices_[j]];
166 TransColind[idx] = i;
172#ifdef ENABLE_TRANSPOSE_TIMINGS
174 mtime=MM.getNewTimer(
"Transpose: CreateTransposeLocal 2");
187#ifdef ENABLE_TRANSPOSE_TIMINGS
189 mtime=MM.getNewTimer(
"Transpose: CreateTransposeLocal 3");
196 throw TempTransA1->
ReportError(
"ExpertStaticFillComplete failed.",err);
199#ifdef ENABLE_TRANSPOSE_TIMINGS
238#ifdef ENABLE_TRANSPOSE_TIMINGS
239 Teuchos::Time myTime(
"global");
240 Teuchos::TimeMonitor MM(myTime);
241 Teuchos::RCP<Teuchos::Time> mtime;
242 mtime=MM.getNewTimer(
"Transpose: Final FusedExport");
250#ifdef ENABLE_TRANSPOSE_TIMINGS
264 bool DeleteExporter =
false;
276 if(DeleteExporter)
delete TransposeExporter;
#define EPETRA_CHK_ERR(a)
bool rvs()
Reverse Data Migration.
Epetra_CrsMatrix * CreateTransposeLocal(OriginalTypeRef orig)
Local-only transpose operator. Don't use this unless you're sure you know what you're doing.
~RowMatrix_Transpose()
Destructor.
bool fwd()
Foward Data Migration.
Epetra_CrsMatrix * TransposeMatrix_
bool OrigMatrixIsCrsMatrix_
NewTypeRef operator()(OriginalTypeRef orig)
Transpose Transform Operator.
Epetra_Map * TransposeRowMap_
int ExtractMyRowView(int LocalRow, int &NumIndices, int *&Indices) const
const Epetra_Export * Exporter() const
int ExtractMyRowView(int MyRow, int &NumEntries, double *&Values, int *&Indices) const
int ExpertStaticFillComplete(const Epetra_Map &DomainMap, const Epetra_Map &RangeMap, const Epetra_Import *Importer=0, const Epetra_Export *Exporter=0, int NumMyDiagonals=-1)
const Epetra_CrsGraph & Graph() const
Epetra_IntSerialDenseVector & ExpertExtractIndexOffset()
const Epetra_Import * Importer() const
Epetra_IntSerialDenseVector & ExpertExtractIndices()
double *& ExpertExtractValues()
int Resize(int Length_in)
virtual int ReportError(const std::string Message, int ErrorCode) const
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.
void resize_doubles(int nold, int nnew, double *&d)