47 #include <Epetra_LinearProblem.h> 48 #include <Epetra_CrsMatrix.h> 49 #include <Epetra_MultiVector.h> 50 #include <Epetra_Map.h> 59 if( MatTrans_ )
delete MatTrans_;
60 if( LHSTrans_ )
delete LHSTrans_;
61 if( RHSTrans_ )
delete RHSTrans_;
63 if( NewRowMapOwned_ )
delete NewRowMap_;
70 Epetra_CrsMatrix * OldMatrix =
dynamic_cast<Epetra_CrsMatrix*
>( orig.GetMatrix() );
71 Epetra_MultiVector * OldRHS = orig.GetRHS();
72 Epetra_MultiVector * OldLHS = orig.GetLHS();
73 const Epetra_BlockMap & OldRowMap = OldMatrix->Map();
78 int NumMyElements = OldRowMap.NumMyElements();
79 int NumGlobalElements = OldRowMap.NumGlobalElements();
81 NewRowMap_ =
new Epetra_Map( NumGlobalElements, NumMyElements, 0, OldRowMap.Comm() );
82 NewRowMapOwned_ =
true;
89 Epetra_CrsMatrix * NewMatrix = &((*MatTrans_)( *OldMatrix ));
90 Epetra_MultiVector * NewLHS = &((*LHSTrans_)( *OldLHS ));
91 Epetra_MultiVector * NewRHS = &((*RHSTrans_)( *OldRHS ));
93 newObj_ =
new Epetra_LinearProblem( NewMatrix, NewLHS, NewRHS );
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.
~LinearProblem_Reindex()
Destructor.
NewTypeRef operator()(OriginalTypeRef orig)
Constructs a new view the original LP, "reindexed" using the given NewRowMap.
Given an Epetra_CrsMatrix, a "reindexed" version is returned based on the new row map...
Given an input Epetra_MultiVector, a "reindexed" view is returned.