Add hypre_Solver object member to ILU (#1030)

This commit is contained in:
Victor A. P. Magri 2023-12-11 13:39:46 -05:00 committed by GitHub
parent 70e9dec6bd
commit bda610a45a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -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;

View File

@ -20,9 +20,16 @@
void *
hypre_ILUCreate( void )
{
hypre_ParILUData *ilu_data;
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;

View File

@ -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;