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_;
73 Epetra_CrsMatrix * OldMatrix =
dynamic_cast<Epetra_CrsMatrix*
>( orig.GetMatrix() );
74 Epetra_MultiVector * OldRHS = orig.GetRHS();
75 Epetra_MultiVector * OldLHS = orig.GetLHS();
76 const Epetra_BlockMap & OldRowMap = OldMatrix->Map();
81 int NumMyElements = OldRowMap.NumMyElements();
82 int NumGlobalElements = OldRowMap.NumGlobalElements();
84 NewRowMap_ =
new Epetra_Map( NumGlobalElements, NumMyElements, 0, OldRowMap.Comm() );
85 NewRowMapOwned_ =
true;
92 Epetra_CrsMatrix * NewMatrix = &((*MatTrans_)( *OldMatrix ));
93 Epetra_MultiVector * NewLHS = &((*LHSTrans_)( *OldLHS ));
94 Epetra_MultiVector * NewRHS = &((*RHSTrans_)( *OldRHS ));
96 newObj_ =
new Epetra_LinearProblem( NewMatrix, NewLHS, NewRHS );
103 Epetra_MultiVector * OldRHS =
origObj_->GetRHS();
104 Epetra_MultiVector * OldLHS =
origObj_->GetLHS();
111 Epetra_MultiVector * NewLHS = &((*LHSTrans_)( *OldLHS ));
112 Epetra_MultiVector * NewRHS = &((*RHSTrans_)( *OldRHS ));
bool fwd()
Forward transfer of data from orig object input in the operator() method call to the new object creat...
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.
NewTypeRef operator()(OriginalTypeRef orig)
Constructs a new view the original LP, "reindexed" using the given NewRowMap.
~LinearProblem_Reindex2()
Destructor.
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.