| [2aa6644] | 1 | /*BHEADER**********************************************************************
|
|---|
| 2 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 3 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 4 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 5 | *
|
|---|
| 6 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 7 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 8 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 9 | *
|
|---|
| 10 | * $Revision: 2.4 $
|
|---|
| 11 | ***********************************************************************EHEADER*/
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 | /******************************************************************************
|
|---|
| 17 | *
|
|---|
| 18 | * WARNING: The file krylov.h should NOT be edited by hand.
|
|---|
| 19 | * It is automatically generated by the script "headers", which should be run
|
|---|
| 20 | * frequently. Almost every other hypre directory is set up this way, the
|
|---|
| 21 | * krylov directory is no different.
|
|---|
| 22 | *
|
|---|
| 23 | *****************************************************************************
|
|---|
| 24 | *
|
|---|
| 25 | * krylov solver headers
|
|---|
| 26 | *
|
|---|
| 27 | *****************************************************************************/
|
|---|
| 28 |
|
|---|
| 29 | #ifndef HYPRE_ALL_KRYLOV_HEADER
|
|---|
| 30 | #define HYPRE_ALL_KRYLOV_HEADER
|
|---|
| 31 |
|
|---|
| 32 | #include <stdlib.h>
|
|---|
| 33 | #include <stdio.h>
|
|---|
| 34 | #include <math.h>
|
|---|
| 35 |
|
|---|
| 36 | /*
|
|---|
| 37 | #ifndef max
|
|---|
| 38 | #define max(a,b) (((a)<(b)) ? (b) : (a))
|
|---|
| 39 | #endif
|
|---|
| 40 | */
|
|---|
| 41 |
|
|---|
| 42 | #define hypre_CTAllocF(type, count, funcs) \
|
|---|
| 43 | ( (type *)(*(funcs->CAlloc))\
|
|---|
| 44 | ((unsigned int)(count), (unsigned int)sizeof(type)) )
|
|---|
| 45 |
|
|---|
| 46 | #define hypre_TFreeF( ptr, funcs ) \
|
|---|
| 47 | ( (*(funcs->Free))((char *)ptr), ptr = NULL )
|
|---|
| 48 |
|
|---|
| 49 | /* A pointer to a type which is never defined, sort of works like void* ... */
|
|---|
| 50 | #ifndef HYPRE_SOLVER_STRUCT
|
|---|
| 51 | #define HYPRE_SOLVER_STRUCT
|
|---|
| 52 | struct hypre_Solver_struct;
|
|---|
| 53 | typedef struct hypre_Solver_struct *HYPRE_Solver;
|
|---|
| 54 | /* similar pseudo-void* for Matrix and Vector: */
|
|---|
| 55 | #endif
|
|---|
| 56 | #ifndef HYPRE_MATRIX_STRUCT
|
|---|
| 57 | #define HYPRE_MATRIX_STRUCT
|
|---|
| 58 | struct hypre_Matrix_struct;
|
|---|
| 59 | typedef struct hypre_Matrix_struct *HYPRE_Matrix;
|
|---|
| 60 | #endif
|
|---|
| 61 | #ifndef HYPRE_VECTOR_STRUCT
|
|---|
| 62 | #define HYPRE_VECTOR_STRUCT
|
|---|
| 63 | struct hypre_Vector_struct;
|
|---|
| 64 | typedef struct hypre_Vector_struct *HYPRE_Vector;
|
|---|
| 65 | #endif
|
|---|
| 66 |
|
|---|
| 67 | typedef int (*HYPRE_PtrToSolverFcn)(HYPRE_Solver,
|
|---|
| 68 | HYPRE_Matrix,
|
|---|
| 69 | HYPRE_Vector,
|
|---|
| 70 | HYPRE_Vector);
|
|---|
| 71 |
|
|---|
| 72 | #endif
|
|---|
| 73 |
|
|---|
| 74 | /******************************************************************************
|
|---|
| 75 | *
|
|---|
| 76 | * GMRES gmres
|
|---|
| 77 | *
|
|---|
| 78 | *****************************************************************************/
|
|---|
| 79 |
|
|---|
| 80 | #ifndef HYPRE_KRYLOV_GMRES_HEADER
|
|---|
| 81 | #define HYPRE_KRYLOV_GMRES_HEADER
|
|---|
| 82 |
|
|---|
| 83 | /*--------------------------------------------------------------------------
|
|---|
| 84 | *--------------------------------------------------------------------------*/
|
|---|
| 85 |
|
|---|
| 86 | /**
|
|---|
| 87 | * @name Generic GMRES Interface
|
|---|
| 88 | *
|
|---|
| 89 | * A general description of the interface goes here...
|
|---|
| 90 | *
|
|---|
| 91 | * @memo A generic GMRES linear solver interface
|
|---|
| 92 | * @version 0.1
|
|---|
| 93 | * @author Jeffrey F. Painter
|
|---|
| 94 | **/
|
|---|
| 95 | /*@{*/
|
|---|
| 96 |
|
|---|
| 97 | /*--------------------------------------------------------------------------
|
|---|
| 98 | *--------------------------------------------------------------------------*/
|
|---|
| 99 |
|
|---|
| 100 | /*--------------------------------------------------------------------------
|
|---|
| 101 | * hypre_GMRESData and hypre_GMRESFunctions
|
|---|
| 102 | *--------------------------------------------------------------------------*/
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 | /**
|
|---|
| 106 | * @name GMRES structs
|
|---|
| 107 | *
|
|---|
| 108 | * Description...
|
|---|
| 109 | **/
|
|---|
| 110 | /*@{*/
|
|---|
| 111 |
|
|---|
| 112 | /**
|
|---|
| 113 | * The {\tt hypre\_GMRESFunctions} object ...
|
|---|
| 114 | **/
|
|---|
| 115 |
|
|---|
| 116 | typedef struct
|
|---|
| 117 | {
|
|---|
| 118 | char * (*CAlloc) ( int count, int elt_size );
|
|---|
| 119 | int (*Free) ( char *ptr );
|
|---|
| 120 | int (*CommInfo) ( void *A, int *my_id, int *num_procs );
|
|---|
| 121 | void * (*CreateVector) ( void *vector );
|
|---|
| 122 | void * (*CreateVectorArray) ( int size, void *vectors );
|
|---|
| 123 | int (*DestroyVector) ( void *vector );
|
|---|
| 124 | void * (*MatvecCreate) ( void *A, void *x );
|
|---|
| 125 | int (*Matvec) ( void *matvec_data, double alpha, void *A,
|
|---|
| 126 | void *x, double beta, void *y );
|
|---|
| 127 | int (*MatvecDestroy) ( void *matvec_data );
|
|---|
| 128 | double (*InnerProd) ( void *x, void *y );
|
|---|
| 129 | int (*CopyVector) ( void *x, void *y );
|
|---|
| 130 | int (*ClearVector) ( void *x );
|
|---|
| 131 | int (*ScaleVector) ( double alpha, void *x );
|
|---|
| 132 | int (*Axpy) ( double alpha, void *x, void *y );
|
|---|
| 133 |
|
|---|
| [f02928c9] | 134 | int (*precond)(void *vdata, void *A, void *b, void *x );
|
|---|
| 135 | int (*precond_setup)(void *vdata, void *A, void *b, void *x );
|
|---|
| [2aa6644] | 136 |
|
|---|
| 137 | } hypre_GMRESFunctions;
|
|---|
| 138 |
|
|---|
| 139 | /**
|
|---|
| 140 | * The {\tt hypre\_GMRESData} object ...
|
|---|
| 141 | **/
|
|---|
| 142 |
|
|---|
| 143 | /* rel_change!=0 means: if pass the other stopping criteria,
|
|---|
| 144 | also check the relative change in the solution x.
|
|---|
| 145 | stop_crit!=0 means: absolute error tolerance rather than
|
|---|
| 146 | the usual relative error tolerance on the residual. Never
|
|---|
| 147 | applies if rel_change!=0.
|
|---|
| 148 | */
|
|---|
| 149 |
|
|---|
| 150 | typedef struct
|
|---|
| 151 | {
|
|---|
| 152 | int k_dim;
|
|---|
| 153 | int min_iter;
|
|---|
| 154 | int max_iter;
|
|---|
| 155 | int rel_change;
|
|---|
| 156 | int stop_crit;
|
|---|
| 157 | int converged;
|
|---|
| 158 | double tol;
|
|---|
| 159 | double cf_tol;
|
|---|
| 160 | double rel_residual_norm;
|
|---|
| 161 |
|
|---|
| 162 | void *A;
|
|---|
| 163 | void *r;
|
|---|
| 164 | void *w;
|
|---|
| 165 | void **p;
|
|---|
| 166 |
|
|---|
| 167 | void *matvec_data;
|
|---|
| 168 | void *precond_data;
|
|---|
| 169 |
|
|---|
| 170 | hypre_GMRESFunctions * functions;
|
|---|
| 171 |
|
|---|
| 172 | /* log info (always logged) */
|
|---|
| 173 | int num_iterations;
|
|---|
| 174 |
|
|---|
| 175 | int print_level; /* printing when print_level>0 */
|
|---|
| 176 | int logging; /* extra computations for logging when logging>0 */
|
|---|
| 177 | double *norms;
|
|---|
| 178 | char *log_file_name;
|
|---|
| 179 |
|
|---|
| 180 | } hypre_GMRESData;
|
|---|
| 181 |
|
|---|
| 182 | #ifdef __cplusplus
|
|---|
| 183 | extern "C" {
|
|---|
| 184 | #endif
|
|---|
| 185 |
|
|---|
| 186 | /**
|
|---|
| 187 | * @name generic GMRES Solver
|
|---|
| 188 | *
|
|---|
| 189 | * Description...
|
|---|
| 190 | **/
|
|---|
| 191 | /*@{*/
|
|---|
| 192 |
|
|---|
| 193 | /**
|
|---|
| 194 | * Description...
|
|---|
| 195 | *
|
|---|
| 196 | * @param param [IN] ...
|
|---|
| 197 | **/
|
|---|
| 198 |
|
|---|
| 199 | hypre_GMRESFunctions *
|
|---|
| 200 | hypre_GMRESFunctionsCreate(
|
|---|
| 201 | char * (*CAlloc) ( int count, int elt_size ),
|
|---|
| 202 | int (*Free) ( char *ptr ),
|
|---|
| 203 | int (*CommInfo) ( void *A, int *my_id, int *num_procs ),
|
|---|
| 204 | void * (*CreateVector) ( void *vector ),
|
|---|
| 205 | void * (*CreateVectorArray) ( int size, void *vectors ),
|
|---|
| 206 | int (*DestroyVector) ( void *vector ),
|
|---|
| 207 | void * (*MatvecCreate) ( void *A, void *x ),
|
|---|
| 208 | int (*Matvec) ( void *matvec_data, double alpha, void *A,
|
|---|
| 209 | void *x, double beta, void *y ),
|
|---|
| 210 | int (*MatvecDestroy) ( void *matvec_data ),
|
|---|
| 211 | double (*InnerProd) ( void *x, void *y ),
|
|---|
| 212 | int (*CopyVector) ( void *x, void *y ),
|
|---|
| 213 | int (*ClearVector) ( void *x ),
|
|---|
| 214 | int (*ScaleVector) ( double alpha, void *x ),
|
|---|
| 215 | int (*Axpy) ( double alpha, void *x, void *y ),
|
|---|
| 216 | int (*PrecondSetup) ( void *vdata, void *A, void *b, void *x ),
|
|---|
| 217 | int (*Precond) ( void *vdata, void *A, void *b, void *x )
|
|---|
| 218 | );
|
|---|
| 219 |
|
|---|
| 220 | /**
|
|---|
| 221 | * Description...
|
|---|
| 222 | *
|
|---|
| 223 | * @param param [IN] ...
|
|---|
| 224 | **/
|
|---|
| 225 |
|
|---|
| 226 | void *
|
|---|
| 227 | hypre_GMRESCreate( hypre_GMRESFunctions *gmres_functions );
|
|---|
| 228 |
|
|---|
| 229 | #ifdef __cplusplus
|
|---|
| 230 | }
|
|---|
| 231 | #endif
|
|---|
| 232 | #endif
|
|---|
| 233 |
|
|---|
| 234 | /******************************************************************************
|
|---|
| 235 | *
|
|---|
| 236 | * Preconditioned conjugate gradient (Omin) headers
|
|---|
| 237 | *
|
|---|
| 238 | *****************************************************************************/
|
|---|
| 239 |
|
|---|
| 240 | #ifndef HYPRE_KRYLOV_PCG_HEADER
|
|---|
| 241 | #define HYPRE_KRYLOV_PCG_HEADER
|
|---|
| 242 |
|
|---|
| 243 | /*--------------------------------------------------------------------------
|
|---|
| 244 | *--------------------------------------------------------------------------*/
|
|---|
| 245 |
|
|---|
| 246 | /**
|
|---|
| 247 | * @name Generic PCG Interface
|
|---|
| 248 | *
|
|---|
| 249 | * A general description of the interface goes here...
|
|---|
| 250 | *
|
|---|
| 251 | * @memo A generic PCG linear solver interface
|
|---|
| 252 | * @version 0.1
|
|---|
| 253 | * @author Jeffrey F. Painter
|
|---|
| 254 | **/
|
|---|
| 255 | /*@{*/
|
|---|
| 256 |
|
|---|
| 257 | /*--------------------------------------------------------------------------
|
|---|
| 258 | *--------------------------------------------------------------------------*/
|
|---|
| 259 |
|
|---|
| 260 | /*--------------------------------------------------------------------------
|
|---|
| 261 | * hypre_PCGData and hypre_PCGFunctions
|
|---|
| 262 | *--------------------------------------------------------------------------*/
|
|---|
| 263 |
|
|---|
| 264 |
|
|---|
| 265 | /**
|
|---|
| 266 | * @name PCG structs
|
|---|
| 267 | *
|
|---|
| 268 | * Description...
|
|---|
| 269 | **/
|
|---|
| 270 | /*@{*/
|
|---|
| 271 |
|
|---|
| 272 | /**
|
|---|
| 273 | * The {\tt hypre\_PCGSFunctions} object ...
|
|---|
| 274 | **/
|
|---|
| 275 |
|
|---|
| 276 | typedef struct
|
|---|
| 277 | {
|
|---|
| 278 | char * (*CAlloc) ( int count, int elt_size );
|
|---|
| 279 | int (*Free) ( char *ptr );
|
|---|
| 280 | int (*CommInfo) ( void *A, int *my_id, int *num_procs );
|
|---|
| 281 | void * (*CreateVector) ( void *vector );
|
|---|
| 282 | int (*DestroyVector) ( void *vector );
|
|---|
| 283 | void * (*MatvecCreate) ( void *A, void *x );
|
|---|
| 284 | int (*Matvec) ( void *matvec_data, double alpha, void *A,
|
|---|
| 285 | void *x, double beta, void *y );
|
|---|
| 286 | int (*MatvecDestroy) ( void *matvec_data );
|
|---|
| 287 | double (*InnerProd) ( void *x, void *y );
|
|---|
| 288 | int (*CopyVector) ( void *x, void *y );
|
|---|
| 289 | int (*ClearVector) ( void *x );
|
|---|
| 290 | int (*ScaleVector) ( double alpha, void *x );
|
|---|
| 291 | int (*Axpy) ( double alpha, void *x, void *y );
|
|---|
| 292 |
|
|---|
| [f02928c9] | 293 | int (*precond)(void *vdata, void *A, void *b, void *x );
|
|---|
| 294 | int (*precond_setup)(void *vdata, void *A, void *b, void *x );
|
|---|
| 295 |
|
|---|
| [2aa6644] | 296 | } hypre_PCGFunctions;
|
|---|
| 297 |
|
|---|
| 298 | /**
|
|---|
| 299 | * The {\tt hypre\_PCGData} object ...
|
|---|
| 300 | **/
|
|---|
| 301 |
|
|---|
| 302 | /*
|
|---|
| 303 | Summary of Parameters to Control Stopping Test:
|
|---|
| 304 | - Standard (default) error tolerance: |delta-residual|/|right-hand-side|<tol
|
|---|
| 305 | where the norm is an energy norm wrt preconditioner, |r|=sqrt(<Cr,r>).
|
|---|
| 306 | - two_norm!=0 means: the norm is the L2 norm, |r|=sqrt(<r,r>)
|
|---|
| 307 | - rel_change!=0 means: if pass the other stopping criteria, also check the
|
|---|
| 308 | relative change in the solution x.
|
|---|
| 309 | - stop_crit!=0 means: pure absolute error tolerance rather than a pure relative
|
|---|
| 310 | error tolerance on the residual. Never applies if rel_change!=0 or atolf!=0.
|
|---|
| 311 | - atolf = absolute error tolerance factor to be used _together_ with the
|
|---|
| 312 | relative error tolerance, |delta-residual| / ( atolf + |right-hand-side| ) < tol
|
|---|
| 313 | - tol = relative error tolerance, as above
|
|---|
| 314 | - cf_tol = convergence factor tolerance; if >0 used for special test
|
|---|
| 315 | for slow convergence
|
|---|
| 316 | */
|
|---|
| 317 |
|
|---|
| 318 | typedef struct
|
|---|
| 319 | {
|
|---|
| 320 | double tol;
|
|---|
| 321 | double atolf;
|
|---|
| 322 | double cf_tol;
|
|---|
| 323 | int max_iter;
|
|---|
| 324 | int two_norm;
|
|---|
| 325 | int rel_change;
|
|---|
| 326 | int stop_crit;
|
|---|
| 327 | int converged;
|
|---|
| 328 |
|
|---|
| 329 | void *A;
|
|---|
| 330 | void *p;
|
|---|
| 331 | void *s;
|
|---|
| 332 | void *r; /* ...contains the residual. This is currently kept permanently.
|
|---|
| 333 | If that is ever changed, it still must be kept if logging>1 */
|
|---|
| 334 |
|
|---|
| 335 | int owns_matvec_data; /* normally 1; if 0, don't delete it */
|
|---|
| 336 | void *matvec_data;
|
|---|
| 337 | void *precond_data;
|
|---|
| 338 |
|
|---|
| 339 | hypre_PCGFunctions * functions;
|
|---|
| 340 |
|
|---|
| 341 | /* log info (always logged) */
|
|---|
| 342 | int num_iterations;
|
|---|
| 343 | double rel_residual_norm;
|
|---|
| 344 |
|
|---|
| 345 | int print_level; /* printing when print_level>0 */
|
|---|
| 346 | int logging; /* extra computations for logging when logging>0 */
|
|---|
| 347 | double *norms;
|
|---|
| 348 | double *rel_norms;
|
|---|
| 349 |
|
|---|
| 350 | } hypre_PCGData;
|
|---|
| 351 |
|
|---|
| 352 | #define hypre_PCGDataOwnsMatvecData(pcgdata) ((pcgdata) -> owns_matvec_data)
|
|---|
| 353 |
|
|---|
| 354 | #ifdef __cplusplus
|
|---|
| 355 | extern "C" {
|
|---|
| 356 | #endif
|
|---|
| 357 |
|
|---|
| 358 |
|
|---|
| 359 | /**
|
|---|
| 360 | * @name generic PCG Solver
|
|---|
| 361 | *
|
|---|
| 362 | * Description...
|
|---|
| 363 | **/
|
|---|
| 364 | /*@{*/
|
|---|
| 365 |
|
|---|
| 366 | /**
|
|---|
| 367 | * Description...
|
|---|
| 368 | *
|
|---|
| 369 | * @param param [IN] ...
|
|---|
| 370 | **/
|
|---|
| 371 |
|
|---|
| 372 | hypre_PCGFunctions *
|
|---|
| 373 | hypre_PCGFunctionsCreate(
|
|---|
| 374 | char * (*CAlloc) ( int count, int elt_size ),
|
|---|
| 375 | int (*Free) ( char *ptr ),
|
|---|
| 376 | int (*CommInfo) ( void *A, int *my_id, int *num_procs ),
|
|---|
| 377 | void * (*CreateVector) ( void *vector ),
|
|---|
| 378 | int (*DestroyVector) ( void *vector ),
|
|---|
| 379 | void * (*MatvecCreate) ( void *A, void *x ),
|
|---|
| 380 | int (*Matvec) ( void *matvec_data, double alpha, void *A,
|
|---|
| 381 | void *x, double beta, void *y ),
|
|---|
| 382 | int (*MatvecDestroy) ( void *matvec_data ),
|
|---|
| 383 | double (*InnerProd) ( void *x, void *y ),
|
|---|
| 384 | int (*CopyVector) ( void *x, void *y ),
|
|---|
| 385 | int (*ClearVector) ( void *x ),
|
|---|
| 386 | int (*ScaleVector) ( double alpha, void *x ),
|
|---|
| 387 | int (*Axpy) ( double alpha, void *x, void *y ),
|
|---|
| 388 | int (*PrecondSetup) ( void *vdata, void *A, void *b, void *x ),
|
|---|
| 389 | int (*Precond) ( void *vdata, void *A, void *b, void *x )
|
|---|
| 390 | );
|
|---|
| 391 |
|
|---|
| 392 | /**
|
|---|
| 393 | * Description...
|
|---|
| 394 | *
|
|---|
| 395 | * @param param [IN] ...
|
|---|
| 396 | **/
|
|---|
| 397 |
|
|---|
| 398 | void *
|
|---|
| 399 | hypre_PCGCreate( hypre_PCGFunctions *pcg_functions );
|
|---|
| 400 |
|
|---|
| 401 | #ifdef __cplusplus
|
|---|
| 402 | }
|
|---|
| 403 | #endif
|
|---|
| 404 |
|
|---|
| 405 | #endif
|
|---|
| 406 |
|
|---|
| 407 | #ifndef hypre_KRYLOV_HEADER
|
|---|
| 408 | #define hypre_KRYLOV_HEADER
|
|---|
| 409 |
|
|---|
| 410 | #ifdef __cplusplus
|
|---|
| 411 | extern "C" {
|
|---|
| 412 | #endif
|
|---|
| 413 |
|
|---|
| 414 | /* gmres.c */
|
|---|
| 415 | hypre_GMRESFunctions *hypre_GMRESFunctionsCreate ( char *(*CAlloc )(int count ,int elt_size ), int (*Free )(char *ptr ), int (*CommInfo )(void *A ,int *my_id ,int *num_procs ), void *(*CreateVector )(void *vector ), void *(*CreateVectorArray )(int size ,void *vectors ), int (*DestroyVector )(void *vector ), void *(*MatvecCreate )(void *A ,void *x ), int (*Matvec )(void *matvec_data ,double alpha ,void *A ,void *x ,double beta ,void *y ), int (*MatvecDestroy )(void *matvec_data ), double (*InnerProd )(void *x ,void *y ), int (*CopyVector )(void *x ,void *y ), int (*ClearVector )(void *x ), int (*ScaleVector )(double alpha ,void *x ), int (*Axpy )(double alpha ,void *x ,void *y ), int (*PrecondSetup )(void *vdata ,void *A ,void *b ,void *x ), int (*Precond )(void *vdata ,void *A ,void *b ,void *x ));
|
|---|
| 416 | void *hypre_GMRESCreate ( hypre_GMRESFunctions *gmres_functions );
|
|---|
| 417 | int hypre_GMRESDestroy ( void *gmres_vdata );
|
|---|
| 418 | int hypre_GMRESGetResidual ( void *gmres_vdata , void **residual );
|
|---|
| 419 | int hypre_GMRESSetup ( void *gmres_vdata , void *A , void *b , void *x );
|
|---|
| 420 | int hypre_GMRESSolve ( void *gmres_vdata , void *A , void *b , void *x );
|
|---|
| 421 | int hypre_GMRESSetKDim ( void *gmres_vdata , int k_dim );
|
|---|
| 422 | int hypre_GMRESGetKDim ( void *gmres_vdata , int *k_dim );
|
|---|
| 423 | int hypre_GMRESSetTol ( void *gmres_vdata , double tol );
|
|---|
| 424 | int hypre_GMRESGetTol ( void *gmres_vdata , double *tol );
|
|---|
| 425 | int hypre_GMRESSetConvergenceFactorTol ( void *gmres_vdata , double cf_tol );
|
|---|
| 426 | int hypre_GMRESGetConvergenceFactorTol ( void *gmres_vdata , double *cf_tol );
|
|---|
| 427 | int hypre_GMRESSetMinIter ( void *gmres_vdata , int min_iter );
|
|---|
| 428 | int hypre_GMRESGetMinIter ( void *gmres_vdata , int *min_iter );
|
|---|
| 429 | int hypre_GMRESSetMaxIter ( void *gmres_vdata , int max_iter );
|
|---|
| 430 | int hypre_GMRESGetMaxIter ( void *gmres_vdata , int *max_iter );
|
|---|
| 431 | int hypre_GMRESSetRelChange ( void *gmres_vdata , int rel_change );
|
|---|
| 432 | int hypre_GMRESGetRelChange ( void *gmres_vdata , int *rel_change );
|
|---|
| 433 | int hypre_GMRESSetStopCrit ( void *gmres_vdata , int stop_crit );
|
|---|
| 434 | int hypre_GMRESGetStopCrit ( void *gmres_vdata , int *stop_crit );
|
|---|
| [f02928c9] | 435 | int hypre_GMRESSetPrecond ( void *gmres_vdata , int (*precond )(void *vdata, void *A, void *b, void *x), int (*precond_setup )(void *vdata, void *A, void *b, void *x), void *precond_data );
|
|---|
| [2aa6644] | 436 | int hypre_GMRESGetPrecond ( void *gmres_vdata , HYPRE_Solver *precond_data_ptr );
|
|---|
| 437 | int hypre_GMRESSetPrintLevel ( void *gmres_vdata , int level );
|
|---|
| 438 | int hypre_GMRESGetPrintLevel ( void *gmres_vdata , int *level );
|
|---|
| 439 | int hypre_GMRESSetLogging ( void *gmres_vdata , int level );
|
|---|
| 440 | int hypre_GMRESGetLogging ( void *gmres_vdata , int *level );
|
|---|
| 441 | int hypre_GMRESGetNumIterations ( void *gmres_vdata , int *num_iterations );
|
|---|
| 442 | int hypre_GMRESGetConverged ( void *gmres_vdata , int *converged );
|
|---|
| 443 | int hypre_GMRESGetFinalRelativeResidualNorm ( void *gmres_vdata , double *relative_residual_norm );
|
|---|
| 444 |
|
|---|
| 445 | /* HYPRE_gmres.c */
|
|---|
| 446 | int HYPRE_GMRESSetup ( HYPRE_Solver solver , HYPRE_Matrix A , HYPRE_Vector b , HYPRE_Vector x );
|
|---|
| 447 | int HYPRE_GMRESSolve ( HYPRE_Solver solver , HYPRE_Matrix A , HYPRE_Vector b , HYPRE_Vector x );
|
|---|
| 448 | int HYPRE_GMRESSetKDim ( HYPRE_Solver solver , int k_dim );
|
|---|
| 449 | int HYPRE_GMRESGetKDim ( HYPRE_Solver solver , int *k_dim );
|
|---|
| 450 | int HYPRE_GMRESSetTol ( HYPRE_Solver solver , double tol );
|
|---|
| 451 | int HYPRE_GMRESGetTol ( HYPRE_Solver solver , double *tol );
|
|---|
| 452 | int HYPRE_GMRESSetConvergenceFactorTol ( HYPRE_Solver solver , double cf_tol );
|
|---|
| 453 | int HYPRE_GMRESGetConvergenceFactorTol ( HYPRE_Solver solver , double *cf_tol );
|
|---|
| 454 | int HYPRE_GMRESSetMinIter ( HYPRE_Solver solver , int min_iter );
|
|---|
| 455 | int HYPRE_GMRESGetMinIter ( HYPRE_Solver solver , int *min_iter );
|
|---|
| 456 | int HYPRE_GMRESSetMaxIter ( HYPRE_Solver solver , int max_iter );
|
|---|
| 457 | int HYPRE_GMRESGetMaxIter ( HYPRE_Solver solver , int *max_iter );
|
|---|
| 458 | int HYPRE_GMRESSetStopCrit ( HYPRE_Solver solver , int stop_crit );
|
|---|
| 459 | int HYPRE_GMRESGetStopCrit ( HYPRE_Solver solver , int *stop_crit );
|
|---|
| 460 | int HYPRE_GMRESSetRelChange ( HYPRE_Solver solver , int rel_change );
|
|---|
| 461 | int HYPRE_GMRESGetRelChange ( HYPRE_Solver solver , int *rel_change );
|
|---|
| 462 | int HYPRE_GMRESSetPrecond ( HYPRE_Solver solver , HYPRE_PtrToSolverFcn precond , HYPRE_PtrToSolverFcn precond_setup , HYPRE_Solver precond_solver );
|
|---|
| 463 | int HYPRE_GMRESGetPrecond ( HYPRE_Solver solver , HYPRE_Solver *precond_data_ptr );
|
|---|
| 464 | int HYPRE_GMRESSetPrintLevel ( HYPRE_Solver solver , int level );
|
|---|
| 465 | int HYPRE_GMRESGetPrintLevel ( HYPRE_Solver solver , int *level );
|
|---|
| 466 | int HYPRE_GMRESSetLogging ( HYPRE_Solver solver , int level );
|
|---|
| 467 | int HYPRE_GMRESGetLogging ( HYPRE_Solver solver , int *level );
|
|---|
| 468 | int HYPRE_GMRESGetNumIterations ( HYPRE_Solver solver , int *num_iterations );
|
|---|
| 469 | int HYPRE_GMRESGetConverged ( HYPRE_Solver solver , int *converged );
|
|---|
| 470 | int HYPRE_GMRESGetFinalRelativeResidualNorm ( HYPRE_Solver solver , double *norm );
|
|---|
| 471 | int HYPRE_GMRESGetResidual ( HYPRE_Solver solver , void **residual );
|
|---|
| 472 |
|
|---|
| 473 | /* HYPRE_pcg.c */
|
|---|
| 474 | int HYPRE_PCGSetup ( HYPRE_Solver solver , HYPRE_Matrix A , HYPRE_Vector b , HYPRE_Vector x );
|
|---|
| 475 | int HYPRE_PCGSolve ( HYPRE_Solver solver , HYPRE_Matrix A , HYPRE_Vector b , HYPRE_Vector x );
|
|---|
| 476 | int HYPRE_PCGSetTol ( HYPRE_Solver solver , double tol );
|
|---|
| 477 | int HYPRE_PCGGetTol ( HYPRE_Solver solver , double *tol );
|
|---|
| 478 | int HYPRE_PCGSetAbsoluteTolFactor ( HYPRE_Solver solver , double abstolf );
|
|---|
| 479 | int HYPRE_PCGGetAbsoluteTolFactor ( HYPRE_Solver solver , double *abstolf );
|
|---|
| 480 | int HYPRE_PCGSetConvergenceFactorTol ( HYPRE_Solver solver , double cf_tol );
|
|---|
| 481 | int HYPRE_PCGGetConvergenceFactorTol ( HYPRE_Solver solver , double *cf_tol );
|
|---|
| 482 | int HYPRE_PCGSetMaxIter ( HYPRE_Solver solver , int max_iter );
|
|---|
| 483 | int HYPRE_PCGGetMaxIter ( HYPRE_Solver solver , int *max_iter );
|
|---|
| 484 | int HYPRE_PCGSetStopCrit ( HYPRE_Solver solver , int stop_crit );
|
|---|
| 485 | int HYPRE_PCGGetStopCrit ( HYPRE_Solver solver , int *stop_crit );
|
|---|
| 486 | int HYPRE_PCGSetTwoNorm ( HYPRE_Solver solver , int two_norm );
|
|---|
| 487 | int HYPRE_PCGGetTwoNorm ( HYPRE_Solver solver , int *two_norm );
|
|---|
| 488 | int HYPRE_PCGSetRelChange ( HYPRE_Solver solver , int rel_change );
|
|---|
| 489 | int HYPRE_PCGGetRelChange ( HYPRE_Solver solver , int *rel_change );
|
|---|
| 490 | int HYPRE_PCGSetPrecond ( HYPRE_Solver solver , HYPRE_PtrToSolverFcn precond , HYPRE_PtrToSolverFcn precond_setup , HYPRE_Solver precond_solver );
|
|---|
| 491 | int HYPRE_PCGGetPrecond ( HYPRE_Solver solver , HYPRE_Solver *precond_data_ptr );
|
|---|
| 492 | int HYPRE_PCGSetLogging ( HYPRE_Solver solver , int level );
|
|---|
| 493 | int HYPRE_PCGGetLogging ( HYPRE_Solver solver , int *level );
|
|---|
| 494 | int HYPRE_PCGSetPrintLevel ( HYPRE_Solver solver , int level );
|
|---|
| 495 | int HYPRE_PCGGetPrintLevel ( HYPRE_Solver solver , int *level );
|
|---|
| 496 | int HYPRE_PCGGetNumIterations ( HYPRE_Solver solver , int *num_iterations );
|
|---|
| 497 | int HYPRE_PCGGetConverged ( HYPRE_Solver solver , int *converged );
|
|---|
| 498 | int HYPRE_PCGGetFinalRelativeResidualNorm ( HYPRE_Solver solver , double *norm );
|
|---|
| 499 | int HYPRE_PCGGetResidual ( HYPRE_Solver solver , void **residual );
|
|---|
| 500 |
|
|---|
| 501 | /* pcg.c */
|
|---|
| 502 | hypre_PCGFunctions *hypre_PCGFunctionsCreate ( char *(*CAlloc )(int count ,int elt_size ), int (*Free )(char *ptr ), int (*CommInfo )(void *A ,int *my_id ,int *num_procs ), void *(*CreateVector )(void *vector ), int (*DestroyVector )(void *vector ), void *(*MatvecCreate )(void *A ,void *x ), int (*Matvec )(void *matvec_data ,double alpha ,void *A ,void *x ,double beta ,void *y ), int (*MatvecDestroy )(void *matvec_data ), double (*InnerProd )(void *x ,void *y ), int (*CopyVector )(void *x ,void *y ), int (*ClearVector )(void *x ), int (*ScaleVector )(double alpha ,void *x ), int (*Axpy )(double alpha ,void *x ,void *y ), int (*PrecondSetup )(void *vdata ,void *A ,void *b ,void *x ), int (*Precond )(void *vdata ,void *A ,void *b ,void *x ));
|
|---|
| 503 | void *hypre_PCGCreate ( hypre_PCGFunctions *pcg_functions );
|
|---|
| 504 | int hypre_PCGDestroy ( void *pcg_vdata );
|
|---|
| 505 | int hypre_PCGGetResidual ( void *pcg_vdata , void **residual );
|
|---|
| 506 | int hypre_PCGSetup ( void *pcg_vdata , void *A , void *b , void *x );
|
|---|
| 507 | int hypre_PCGSolve ( void *pcg_vdata , void *A , void *b , void *x );
|
|---|
| 508 | int hypre_PCGSetTol ( void *pcg_vdata , double tol );
|
|---|
| 509 | int hypre_PCGGetTol ( void *pcg_vdata , double *tol );
|
|---|
| 510 | int hypre_PCGSetAbsoluteTolFactor ( void *pcg_vdata , double atolf );
|
|---|
| 511 | int hypre_PCGGetAbsoluteTolFactor ( void *pcg_vdata , double *atolf );
|
|---|
| 512 | int hypre_PCGSetConvergenceFactorTol ( void *pcg_vdata , double cf_tol );
|
|---|
| 513 | int hypre_PCGGetConvergenceFactorTol ( void *pcg_vdata , double *cf_tol );
|
|---|
| 514 | int hypre_PCGSetMaxIter ( void *pcg_vdata , int max_iter );
|
|---|
| 515 | int hypre_PCGGetMaxIter ( void *pcg_vdata , int *max_iter );
|
|---|
| 516 | int hypre_PCGSetTwoNorm ( void *pcg_vdata , int two_norm );
|
|---|
| 517 | int hypre_PCGGetTwoNorm ( void *pcg_vdata , int *two_norm );
|
|---|
| 518 | int hypre_PCGSetRelChange ( void *pcg_vdata , int rel_change );
|
|---|
| 519 | int hypre_PCGGetRelChange ( void *pcg_vdata , int *rel_change );
|
|---|
| 520 | int hypre_PCGSetStopCrit ( void *pcg_vdata , int stop_crit );
|
|---|
| 521 | int hypre_PCGGetStopCrit ( void *pcg_vdata , int *stop_crit );
|
|---|
| 522 | int hypre_PCGGetPrecond ( void *pcg_vdata , HYPRE_Solver *precond_data_ptr );
|
|---|
| [f02928c9] | 523 | int hypre_PCGSetPrecond ( void *pcg_vdata , int (*precond )(void *vdata, void *A, void *b, void *x), int (*precond_setup )(void *vdata, void *A, void *b, void *x), void *precond_data );
|
|---|
| [2aa6644] | 524 | int hypre_PCGSetPrintLevel ( void *pcg_vdata , int level );
|
|---|
| 525 | int hypre_PCGGetPrintLevel ( void *pcg_vdata , int *level );
|
|---|
| 526 | int hypre_PCGSetLogging ( void *pcg_vdata , int level );
|
|---|
| 527 | int hypre_PCGGetLogging ( void *pcg_vdata , int *level );
|
|---|
| 528 | int hypre_PCGGetNumIterations ( void *pcg_vdata , int *num_iterations );
|
|---|
| 529 | int hypre_PCGGetConverged ( void *pcg_vdata , int *converged );
|
|---|
| 530 | int hypre_PCGPrintLogging ( void *pcg_vdata , int myid );
|
|---|
| 531 | int hypre_PCGGetFinalRelativeResidualNorm ( void *pcg_vdata , double *relative_residual_norm );
|
|---|
| 532 |
|
|---|
| 533 | #ifdef __cplusplus
|
|---|
| 534 | }
|
|---|
| 535 | #endif
|
|---|
| 536 |
|
|---|
| 537 | #endif
|
|---|
| 538 |
|
|---|