Add "Get" functions corresponding to new "Set" functions for weighted

Jacobi weights.
This commit is contained in:
painter 2007-03-09 23:59:58 +00:00
parent 7a049e54f8
commit 7dcb11dbb9
4 changed files with 30 additions and 3 deletions

View File

@ -246,8 +246,14 @@ int HYPRE_StructPFMGSetNonZeroGuess(HYPRE_StructSolver solver);
int HYPRE_StructPFMGSetRelaxType(HYPRE_StructSolver solver,
int relax_type);
/*
* (Optional) Set Jacobi weight (this is purposely not documented)
*/
int HYPRE_StructPFMGSetJacobiWeight(HYPRE_StructSolver solver,
double weight);
int HYPRE_StructPFMGGetJacobiWeight(HYPRE_StructSolver solver,
double *weight);
/**
* (Optional) Set type of coarse-grid operator to use.

View File

@ -189,7 +189,9 @@ HYPRE_StructPFMGSetNonZeroGuess( HYPRE_StructSolver solver )
/*--------------------------------------------------------------------------
* HYPRE_StructPFMGSetRelaxType, HYPRE_StructPFMGGetRelaxType,
* HYPRE_StructPFMGSetJacobiWeight
* HYPRE_StructPFMGSetJacobiWeight, HYPRE_StructPFMGGetJacobiWeight
* GetJacobiWeight will not return the actual weight
* if SetJacobiWeight has not been called.
*--------------------------------------------------------------------------*/
int
@ -212,6 +214,13 @@ HYPRE_StructPFMGSetJacobiWeight(HYPRE_StructSolver solver,
{
return( hypre_PFMGSetJacobiWeight( (void *) solver, weight) );
}
int
HYPRE_StructPFMGGetJacobiWeight(HYPRE_StructSolver solver,
double *weight)
{
return( hypre_PFMGGetJacobiWeight( (void *) solver, weight) );
}
/*--------------------------------------------------------------------------
* HYPRE_StructPFMGSetRAPType, HYPRE_StructPFMGGetRAPType
*--------------------------------------------------------------------------*/

View File

@ -193,6 +193,7 @@ int HYPRE_StructPFMGSetNonZeroGuess ( HYPRE_StructSolver solver );
int HYPRE_StructPFMGSetRelaxType ( HYPRE_StructSolver solver , int relax_type );
int HYPRE_StructPFMGGetRelaxType ( HYPRE_StructSolver solver , int *relax_type );
int HYPRE_StructPFMGSetJacobiWeight ( HYPRE_StructSolver solver , double weight );
int HYPRE_StructPFMGGetJacobiWeight ( HYPRE_StructSolver solver , double *weight );
int HYPRE_StructPFMGSetRAPType ( HYPRE_StructSolver solver , int rap_type );
int HYPRE_StructPFMGGetRAPType ( HYPRE_StructSolver solver , int *rap_type );
int HYPRE_StructPFMGSetNumPreRelax ( HYPRE_StructSolver solver , int num_pre_relax );
@ -336,6 +337,7 @@ int hypre_PFMGGetZeroGuess ( void *pfmg_vdata , int *zero_guess );
int hypre_PFMGSetRelaxType ( void *pfmg_vdata , int relax_type );
int hypre_PFMGGetRelaxType ( void *pfmg_vdata , int *relax_type );
int hypre_PFMGSetJacobiWeight ( void *pfmg_vdata , double weight );
int hypre_PFMGGetJacobiWeight ( void *pfmg_vdata , double *weight );
int hypre_PFMGSetRAPType ( void *pfmg_vdata , int rap_type );
int hypre_PFMGGetRAPType ( void *pfmg_vdata , int *rap_type );
int hypre_PFMGSetNumPreRelax ( void *pfmg_vdata , int num_pre_relax );
@ -419,7 +421,6 @@ int hypre_PointRelaxSetTempVec ( void *relax_vdata , hypre_StructVector *t );
int hypre_PointRelaxGetFinalRelativeResidualNorm ( void *relax_vdata , double *norm );
int hypre_relax_wtx ( void *relax_vdata , int pointset , hypre_StructVector *t , hypre_StructVector *x );
int hypre_relax_copy ( void *relax_vdata , int pointset , hypre_StructVector *t , hypre_StructVector *x );
int hypre_sumsqdiff_pointset ( void *relax_vdata , int pointset , hypre_StructVector *t , hypre_StructVector *x , hypre_StructMatrix *A , double *sumsq );
/* red_black_constantcoef_gs.c */
int hypre_RedBlackConstantCoefGS ( void *relax_vdata , hypre_StructMatrix *A , hypre_StructVector *b , hypre_StructVector *x );

View File

@ -317,7 +317,7 @@ hypre_PFMGGetRelaxType( void *pfmg_vdata,
}
/*--------------------------------------------------------------------------
* hypre_PFMGSetJacobiWeight
* hypre_PFMGSetJacobiWeight, hypre_PFMGGetJacobiWeight
*--------------------------------------------------------------------------*/
int
hypre_PFMGSetJacobiWeight( void *pfmg_vdata,
@ -331,6 +331,17 @@ hypre_PFMGSetJacobiWeight( void *pfmg_vdata,
return hypre_error_flag;
}
int
hypre_PFMGGetJacobiWeight( void *pfmg_vdata,
double *weight )
{
hypre_PFMGData *pfmg_data = pfmg_vdata;
*weight = (pfmg_data -> jacobi_weight);
return hypre_error_flag;
}
/*--------------------------------------------------------------------------
* hypre_PFMGSetRAPType, hypre_PFMGGetRAPType