47 #include <Epetra_LinearProblem.h> 48 #include <Epetra_CrsMatrix.h> 49 #include <Epetra_MultiVector.h> 50 #include <Epetra_Map.h> 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();
83 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 84 if(OldRowMap.GlobalIndicesInt()) {
85 int NumGlobalElements = OldRowMap.NumGlobalElements();
86 NewRowMap_ =
new Epetra_Map( NumGlobalElements, NumMyElements, 0, OldRowMap.Comm() );
90 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 91 if(OldRowMap.GlobalIndicesLongLong()) {
92 long long NumGlobalElements = OldRowMap.NumGlobalElements64();
93 NewRowMap_ =
new Epetra_Map( NumGlobalElements, NumMyElements, 0LL, OldRowMap.Comm() );
97 throw "LinearProblem_Reindex2::operator(): GlobalIndices type unknown";
106 Epetra_CrsMatrix * NewMatrix = &((*MatTrans_)( *OldMatrix ));
107 Epetra_MultiVector * NewLHS = &((*LHSTrans_)( *OldLHS ));
108 Epetra_MultiVector * NewRHS = &((*RHSTrans_)( *OldRHS ));
110 newObj_ =
new Epetra_LinearProblem( NewMatrix, NewLHS, NewRHS );
117 Epetra_MultiVector * OldRHS =
origObj_->GetRHS();
118 Epetra_MultiVector * OldLHS =
origObj_->GetLHS();
125 Epetra_MultiVector * NewLHS = &((*LHSTrans_)( *OldLHS ));
126 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...
MultiVector_Reindex * LHSTrans_
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...
CrsMatrix_Reindex * MatTrans_
Given an input Epetra_MultiVector, a "reindexed" view is returned.
MultiVector_Reindex * RHSTrans_