Add hypre_Solver object member to ILU (#1030)
This commit is contained in:
parent
70e9dec6bd
commit
bda610a45a
@ -1129,6 +1129,9 @@ typedef struct
|
||||
|
||||
typedef struct hypre_ParILUData_struct
|
||||
{
|
||||
/* Base solver data structure */
|
||||
hypre_Solver base;
|
||||
|
||||
/* General data */
|
||||
HYPRE_Int global_solver;
|
||||
hypre_ParCSRMatrix *matA;
|
||||
|
||||
@ -21,8 +21,15 @@ void *
|
||||
hypre_ILUCreate( void )
|
||||
{
|
||||
hypre_ParILUData *ilu_data;
|
||||
hypre_Solver *base;
|
||||
|
||||
ilu_data = hypre_CTAlloc(hypre_ParILUData, 1, HYPRE_MEMORY_HOST);
|
||||
base = (hypre_Solver*) ilu_data;
|
||||
|
||||
/* Set base solver function pointers */
|
||||
hypre_SolverSetup(base) = (HYPRE_PtrToSolverFcn) HYPRE_ILUSetup;
|
||||
hypre_SolverSolve(base) = (HYPRE_PtrToSolverFcn) HYPRE_ILUSolve;
|
||||
hypre_SolverDestroy(base) = (HYPRE_PtrToDestroyFcn) HYPRE_ILUDestroy;
|
||||
|
||||
#if defined(HYPRE_USING_GPU)
|
||||
hypre_ParILUDataAperm(ilu_data) = NULL;
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
|
||||
typedef struct hypre_ParILUData_struct
|
||||
{
|
||||
/* Base solver data structure */
|
||||
hypre_Solver base;
|
||||
|
||||
/* General data */
|
||||
HYPRE_Int global_solver;
|
||||
hypre_ParCSRMatrix *matA;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user