Actual source code: xxt.h

  1: /*$Id: xxt.h,v 1.2 2001/04/10 19:37:38 bsmith Exp $*/
  2: /*************************************xxt.h************************************
  3: Module Name: xxt
  4: Module Info: need xxt.{c,h} gs.{c,h} comm.{c,h} ivec.{c,h} error.{c,h} 
  5:              bss_malloc.{c,h} bit_mask.{c,h} queue.{c,h} stack.{c,h}

  7: author:  Henry M. Tufo III
  8: e-mail:  hmt@asci.uchicago.edu
  9: contact:
 10: +--------------------------------+--------------------------------+
 11: |MCS Division - Building 221     |Department of Computer Science  |
 12: |Argonne National Laboratory     |Ryerson 152                     |
 13: |9700 S. Cass Avenue             |The University of Chicago       |
 14: |Argonne, IL  60439              |Chicago, IL  60637              |
 15: |(630) 252-5354/5986 ph/fx       |(773) 702-6019/8487 ph/fx       |
 16: +--------------------------------+--------------------------------+

 18: Last Modification: 3.20.01
 19: **************************************xxt.h***********************************/

 21: /*************************************xxt.h************************************
 22: File Description:
 23: **************************************xxt.h***********************************/

 25: /*************************************xxt.h************************************
 26: Notes on Usage: 
 27: **************************************xxt.h***********************************/


 30: #ifndef _xxt_h
 31: #define _xxt_h


 34: typedef struct xxt_CDT *xxt_ADT;


 37: /*************************************xxt.h************************************
 38: Function: XXT_new()

 40: Input :
 41: Output:
 42: Return: ADT ptr or NULL upon failure.
 43: Description: This function allocates and returns an xxt handle
 44: Usage: xxt_handle = xxt_new();
 45: **************************************xxt.h***********************************/
 46: extern xxt_ADT XXT_new(void);


 49: /*************************************xxt.h************************************
 50: Function: XXT_free()

 52: Input : pointer to ADT.
 53: Output:
 54: Return:
 55: Description: This function frees the storage associated with an xxt handle
 56: Usage: XXT_free(xxt_handle);
 57: **************************************xxt.h***********************************/
 58: extern int XXT_free(xxt_ADT xxt_handle);


 61: /*************************************xxt.h************************************
 62: Function: XXT_factor

 64: Input : ADT ptr,  and pointer to object
 65: Output:
 66: Return: 0 on failure, 1 on success
 67: Description: This function sets the xxt solver 

 69: xxt assumptions: given n rows of global coarse matrix (E_loc) where
 70:    o global dofs N = sum_p(n), p=0,P-1 
 71:    (i.e. row dist. with no dof replication)
 72:    (5.21.00 will handle dif replication case)
 73:    o m is the number of columns in E_loc (m>=n)
 74:    o local2global holds global number of column i (i=0,...,m-1)
 75:    o local2global holds global number of row    i (i=0,...,n-1)
 76:    o mylocmatvec performs E_loc . x_loc where x_loc is an vector of
 77:    length m in 1-1 correspondence with local2global
 78:    (note that gs package takes care of communication).
 79:    (note do not zero out upper m-n entries!)
 80:    o mylocmatvec(void *grid_data, double *in, double *out)

 82: ML beliefs/usage: move this to to ML_XXT_factor routine
 83:    o my_ml holds address of ML struct associated w/E_loc, grid_data, grid_tag
 84:    o grid_tag, grid_data, my_ml used in
 85:       ML_Set_CSolve(my_ml, grid_tag, grid_data, ML_Do_CoarseDirect);
 86:    o grid_data used in 
 87:       A_matvec(grid_data,v,u);

 89: Usage: 
 90: **************************************xxt.h***********************************/
 91: extern int XXT_factor(xxt_ADT xxt_handle,   /* prev. allocated xxt  handle */
 92:                       int *local2global,    /* global column mapping       */
 93:                       int n,                /* local num rows              */
 94:                       int m,                /* local num cols              */
 95:                       void *mylocmatvec,    /* b_loc=A_local.x_loc         */
 96:                       void *grid_data       /* grid data for matvec        */
 97:                       );


100: /*************************************xxt.h************************************
101: Function: XXT_solve

103: Input : ADT ptr, b (rhs)
104: Output: x (soln)
105: Return:
106: Description: This function performs x = E^-1.b
107: Usage: 
108: XXT_solve(xxt_handle, double *x, double *b)
109: XXT_solve(xxt_handle, double *x, NULL)
110: assumes x has been initialized to be b
111: impl. issue for FORTRAN interface ... punt for now and disallow NULL opt.
112: **************************************xxt.h***********************************/
113: extern int XXT_solve(xxt_ADT xxt_handle, double *x, double *b);


116: /*************************************xxt.h************************************
117: Function: XXT_stats

119: Input : handle
120: Output:
121: Return:
122: Description:
123: factor stats
124: **************************************xxt.h***********************************/
125: extern int XXT_stats(xxt_ADT xxt_handle);


128: /*************************************xxt.h************************************
129: Function: XXT_sp_1()

131: Input : pointer to ADT
132: Output: 
133: Return: 
134: Description: sets xxt parameter 1 in xxt_handle
135: Usage: implement later

137: void XXT_sp_1(xxt_handle,parameter 1 value)
138: **************************************xxt.h***********************************/


141: #endif