Actual source code: xyt.h
1: /*$Id: xyt.h,v 1.2 2001/04/10 19:37:38 bsmith Exp $*/
2: /*************************************xyt.h************************************
3: Module Name: xyt
4: Module Info: need xyt.{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: **************************************xyt.h***********************************/
21: /*************************************xyt.h************************************
22: File Description:
23: **************************************xyt.h***********************************/
25: /*************************************xyt.h************************************
26: Notes on Usage:
27: **************************************xyt.h***********************************/
30: #ifndef _xyt_h
31: #define _xyt_h
34: typedef struct xyt_CDT *xyt_ADT;
37: /*************************************xyt.h************************************
38: Function: XYT_new()
40: Input :
41: Output:
42: Return: ADT ptr or NULL upon failure.
43: Description: This function allocates and returns an xyt handle
44: Usage: xyt_handle = xyt_new();
45: **************************************xyt.h***********************************/
46: extern xyt_ADT XYT_new(void);
49: /*************************************xyt.h************************************
50: Function: XYT_free()
52: Input : pointer to ADT.
53: Output:
54: Return:
55: Description: This function frees the storage associated with an xyt handle
56: Usage: XYT_free(xyt_handle);
57: **************************************xyt.h***********************************/
58: extern int XYT_free(xyt_ADT xyt_handle);
61: /*************************************xyt.h************************************
62: Function: XYT_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 xyt solver
69: xyt 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_XYT_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: **************************************xyt.h***********************************/
91: extern int XYT_factor(xyt_ADT xyt_handle, /* prev. allocated xyt 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: /*************************************xyt.h************************************
101: Function: XYT_solve
103: Input : ADT ptr, b (rhs)
104: Output: x (soln)
105: Return:
106: Description: This function performs x = E^-1.b
107: Usage: XYT_solve(xyt_handle, double *x, double *b)
108: **************************************xyt.h***********************************/
109: extern int XYT_solve(xyt_ADT xyt_handle, double *x, double *b);
112: /*************************************xyt.h************************************
113: Function: XYT_stats
115: Input : handle
116: Output:
117: Return:
118: Description:
119: factor stats
120: **************************************xyt.h***********************************/
121: extern int XYT_stats(xyt_ADT xyt_handle);
124: /*************************************xyt.h************************************
125: Function: XYT_sp_1()
127: Input : pointer to ADT
128: Output:
129: Return:
130: Description: sets xyt parameter 1 in xyt_handle
131: Usage: implement later
133: void XYT_sp_1(xyt_handle,parameter 1 value)
134: **************************************xyt.h***********************************/
136: #endif