42 #ifndef EPETRAEXT_HYPREIJMATRIX_H_
43 #define EPETRAEXT_HYPREIJMATRIX_H_
45 #if defined(EpetraExt_SHOW_DEPRECATED_WARNINGS)
47 #warning "The EpetraExt package is deprecated"
61 #include "HYPRE_parcsr_ls.h"
62 #include "_hypre_parcsr_mv.h"
63 #include "HYPRE_parcsr_mv.h"
64 #include "HYPRE_IJ_mv.h"
65 #include "_hypre_IJ_mv.h"
135 int ExtractMyRowCopy(
int MyRow,
int Length,
int & NumEntries,
double *Values,
int * Indices)
const;
159 int ExtractMyEntryView(
int CurEntry,
const double *&Value,
int &RowIndex,
int &ColIndex)
const;
370 {
return HYPRE_BoomerAMGCreate(solver);}
374 {
return HYPRE_ParaSailsCreate(comm, solver);}
378 {
return HYPRE_EuclidCreate(comm, solver);}
382 {
return HYPRE_AMSCreate(solver);}
386 {
return HYPRE_ParCSRHybridCreate(solver);}
390 {
return HYPRE_ParCSRPCGCreate(comm, solver);}
394 {
return HYPRE_ParCSRGMRESCreate(comm, solver);}
398 {
return HYPRE_ParCSRFlexGMRESCreate(comm, solver);}
402 {
return HYPRE_ParCSRLGMRESCreate(comm, solver);}
406 {
return HYPRE_ParCSRBiCGSTABCreate(comm, solver);}
434 int (*
SolverSetupPtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector);
435 int (*
SolverSolvePtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector);
436 int (*
SolverPrecondPtr_)(HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver);
439 int (*
PrecondSetupPtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector);
440 int (*
PrecondSolvePtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector);
int ExtractMyEntryView(int CurEntry, double *&Value, int &RowIndex, int &ColIndex)
Returns a reference to the ith entry in the matrix, along with its row and column index...
int Hypre_ParCSRLGMRESCreate(MPI_Comm comm, HYPRE_Solver *solver)
LGMRES Create passing function.
bool * IsSolverSetup_
Flag to know if solver needs to be destoyed.
virtual ~EpetraExt_HypreIJMatrix()
EpetraExt_HypreIJMatrix Destructor.
int LeftScale(const Epetra_Vector &X)
Scales the EpetraExt_HypreIJMatrix on the left with a Epetra_Vector x.
int InitializeDefaults()
Set global variables to default values.
int(* SolverSetupPtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector)
int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a EpetraExt_HypreIJMatrix solving a Epetra_MultiVector X in Y...
int(* PrecondDestroyPtr_)(HYPRE_Solver)
HYPRE_Solver Preconditioner_
int(* PrecondSolvePtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector)
int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a EpetraExt_HypreIJMatrix multiplied by a Epetra_MultiVector X in Y...
int MyRowEnd_
Last row on local processor.
int Hypre_ParCSRPCGCreate(MPI_Comm comm, HYPRE_Solver *solver)
PCG Create passing function.
int(* SolverDestroyPtr_)(HYPRE_Solver)
int(* SolverSolvePtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector)
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
EpetraExt_HypreIJMatrix(HYPRE_IJMatrix matrix)
Epetra_HypreIJMatrix constructor.
HYPRE_IJMatrix & GetMatrix()
Return a reference to the Hypre matrix.
int MyRowStart_
First row on local processor.
int NumMyRowEntries(int MyRow, int &NumEntries) const
Return the current number of values stored for the specified local row.
int NumGlobalCols_
Number of columns across all processors.
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y...
virtual bool UpperTriangular() const
Hypre_Chooser
Enumerated type to choose to solve or precondition.
int(* PrecondSetupPtr_)(HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector)
Hypre_Chooser SolveOrPrec_
Choose to solve or apply preconditioner.
int Hypre_ParCSRGMRESCreate(MPI_Comm comm, HYPRE_Solver *solver)
GMRES Create passing function.
int(EpetraExt_HypreIJMatrix::* PrecondCreatePtr_)(MPI_Comm, HYPRE_Solver *)
HYPRE_ParCSRMatrix ParMatrix_
int RightScale(const Epetra_Vector &X)
Scales the EpetraExt_HypreIJMatrix on the right with a Epetra_Vector x.
int(EpetraExt_HypreIJMatrix::* SolverCreatePtr_)(MPI_Comm, HYPRE_Solver *)
int Hypre_ParCSRFlexGMRESCreate(MPI_Comm comm, HYPRE_Solver *solver)
FlexGMRES Create passing function.
int MatType_
Hypre matrix type (parCSR).
int NumGlobalRows_
Number of rows across all processors.
int CreatePrecond()
Create the preconditioner with selected type.
int(* SolverPrecondPtr_)(HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver)
int Hypre_ParaSailsCreate(MPI_Comm comm, HYPRE_Solver *solver)
ParaSails Create passing function.
int Hypre_AMSCreate(MPI_Comm comm, HYPRE_Solver *solver)
AMS Create passing function.
int Hypre_BoomerAMGCreate(MPI_Comm comm, HYPRE_Solver *solver)
AMG Create passing function.
Hypre_Solver
Enumerated type for Hypre solvers.
int Hypre_EuclidCreate(MPI_Comm comm, HYPRE_Solver *solver)
Euclid Create passing function.
int Hypre_ParCSRHybridCreate(MPI_Comm comm, HYPRE_Solver *solver)
Hybrid Create passing function.
int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
Returns a copy of the specified local row in user-provided arrays.
bool * IsPrecondSetup_
Flag to know if preconditioner needs to be destroyed.
bool TransposeSolve_
Do a transpose solve, only BoomerAMG.
int NumMyRows_
Number of rows on local processor.
int SetParameter(Hypre_Chooser chooser, int(*pt2Func)(HYPRE_Solver, int), int parameter)
Set a parameter that takes a single int.
int Hypre_ParCSRBiCGSTABCreate(MPI_Comm comm, HYPRE_Solver *solver)
BiCGSTAB Create passing function.
int CreateSolver()
Create the solver with selected type.
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.