Actual source code: pgmresimpl.h

  1: #pragma once

  3: #define KSPGMRES_NO_MACROS
  4: #include <../src/ksp/ksp/impls/gmres/gmresimpl.h>

  6: typedef struct {
  7:   KSPGMRESHEADER
  8: } KSP_PGMRES;

 10: #define HH(a, b) (pgmres->hh_origin + (b) * (pgmres->max_k + 2) + (a))
 11: /* HH will be size (max_k+2)*(max_k+1)  -  think of HH as being stored columnwise for access purposes. */
 12: #define HES(a, b) (pgmres->hes_origin + (b) * (pgmres->max_k + 1) + (a))
 13: /* HES will be size (max_k + 1) * (max_k + 1) -  again, think of HES as being stored columnwise */
 14: #define CC(a) (pgmres->cc_origin + (a)) /* CC will be length (max_k+1) - cosines */
 15: #define SS(a) (pgmres->ss_origin + (a)) /* SS will be length (max_k+1) - sines */
 16: #define RS(a) (pgmres->rs_origin + (a)) /* RS will be length (max_k+2) - rt side */

 18: /* vector names */
 19: #define VEC_OFFSET     2
 20: #define VEC_TEMP       pgmres->vecs[0]              /* work space */
 21: #define VEC_TEMP_MATOP pgmres->vecs[1]              /* work space */
 22: #define VEC_VV(i)      pgmres->vecs[VEC_OFFSET + i] /* use to access othog basis vectors */

 24: #define PGMRES_DELTA_DIRECTIONS 10
 25: #define PGMRES_DEFAULT_MAXK     30