44 #include <Epetra_Export.h>
45 #include <Epetra_Import.h>
46 #include <Epetra_LinearProblem.h>
47 #include <Epetra_CrsGraph.h>
48 #include <Epetra_CrsMatrix.h>
49 #include <Epetra_MultiVector.h>
50 #include <Epetra_Vector.h>
51 #include <Epetra_IntVector.h>
52 #include <Epetra_Map.h>
53 #include <Epetra_Comm.h>
60 if( MatExporter_ )
delete MatExporter_;
61 if( VecExporter_ )
delete VecExporter_;
62 if( Importer_ )
delete Importer_;
64 if( NewProblem_ )
delete NewProblem_;
65 if( NewRHS_ )
delete NewRHS_;
66 if( NewLHS_ )
delete NewLHS_;
67 if( NewMatrix_ )
delete NewMatrix_;
75 OldMatrix_ = dynamic_cast<Epetra_CrsMatrix*>( orig.GetMatrix() );
76 OldGraph_ = const_cast<Epetra_CrsGraph*>(&OldMatrix_->
Graph());
77 OldRHS_ = orig.GetRHS();
78 OldLHS_ = orig.GetLHS();
79 OldRowMap_ = const_cast<Epetra_Map*>(&OldMatrix_->
RowMap());
84 if( !OldMatrix_ ) ierr = -2;
85 if( !OldRHS_ ) ierr = -3;
86 if( !OldLHS_ ) ierr = -4;
111 NewMatrix_->
Export( *OldMatrix_, *MatExporter_,
Insert );