xref: /petsc/src/ksp/pc/impls/tfs/tfs.h (revision 52f87cdab2191b5e933e56fedaec062d60660400)
1 
2 #if !defined(__TFS_H)
3 #define __TFS_H
4 
5 /**********************************const.h*************************************
6 
7 Author: Henry M. Tufo III
8 
9 e-mail: hmt@cs.brown.edu
10 
11 snail-mail:
12 Division of Applied Mathematics
13 Brown University
14 Providence, RI 02912
15 
16 Last Modification:
17 6.21.97
18 ***********************************const.h************************************/
19 
20 /**********************************const.h*************************************
21 File Description:
22 -----------------
23 
24 ***********************************const.h************************************/
25 #include "petsc.h"
26 #include "petscsys.h"
27 #if defined(PETSC_HAVE_STDLIB_H)
28 #include <stdlib.h>
29 #endif
30 #if defined(PETSC_HAVE_MALLOC_H)
31 #include <malloc.h>
32 #endif
33 #include "petscblaslapack.h"
34 #include <limits.h>
35 #include <float.h>
36 
37 #define X          0
38 #define Y          1
39 #define Z          2
40 #define XY         3
41 #define XZ         4
42 #define YZ         5
43 
44 
45 #define THRESH          0.2
46 #define N_HALF          4096
47 #define PRIV_BUF_SZ     45
48 
49 /*4096 8192 32768 65536 1048576 */
50 #define MAX_MSG_BUF     32768
51 
52 #define FULL          2
53 #define PARTIAL       1
54 #define NONE          0
55 
56 #define BYTE		8
57 #define BIT_0		0x1
58 #define BIT_1		0x2
59 #define BIT_2		0x4
60 #define BIT_3		0x8
61 #define BIT_4		0x10
62 #define BIT_5		0x20
63 #define BIT_6		0x40
64 #define BIT_7		0x80
65 #define TOP_BIT         INT_MIN
66 #define ALL_ONES        -1
67 
68 #define FALSE		0
69 #define TRUE		1
70 
71 #define C		0
72 
73 
74 #define MAX_VEC		1674
75 #define FORMAT		30
76 #define MAX_COL_LEN    	100
77 #define MAX_LINE	FORMAT*MAX_COL_LEN
78 #define   DELIM         " \n \t"
79 #define LINE		12
80 #define C_LINE		80
81 
82 #define REAL_MAX	DBL_MAX
83 #define REAL_MIN	DBL_MIN
84 
85 #define   UT            5               /* dump upper 1/2 */
86 #define   LT            6               /* dump lower 1/2 */
87 #define   SYMM          8               /* we assume symm and dump upper 1/2 */
88 #define   NON_SYMM      9
89 
90 #define   ROW          10
91 #define   COL          11
92 
93 #define EPS   1.0e-14
94 #define EPS2  1.0e-07
95 
96 
97 #define MPI   1
98 #define NX    2
99 
100 #define LOG2(x)		(PetscScalar)log((double)x)/log(2)
101 #define SWAP(a,b)       temp=(a); (a)=(b); (b)=temp;
102 #define P_SWAP(a,b)     ptr=(a); (a)=(b); (b)=ptr;
103 
104 #define MAX_FABS(x,y)   ((double)fabs(x)>(double)fabs(y)) ? ((PetscScalar)x) : ((PetscScalar)y)
105 #define MIN_FABS(x,y)   ((double)fabs(x)<(double)fabs(y)) ? ((PetscScalar)x) : ((PetscScalar)y)
106 
107 /* specer's existence ... can be done w/MAX_ABS */
108 #define EXISTS(x,y)     ((x)==0.0) ? (y) : (x)
109 
110 #define MULT_NEG_ONE(a) (a) *= -1;
111 #define NEG(a)          (a) |= BIT_31;
112 #define POS(a)          (a) &= INT_MAX;
113 
114 
115 
116 
117 /**********************************types.h*************************************
118 
119 Author: Henry M. Tufo III
120 
121 e-mail: hmt@cs.brown.edu
122 
123 snail-mail:
124 Division of Applied Mathematics
125 Brown University
126 Providence, RI 02912
127 
128 Last Modification:
129 6.21.97
130 ***********************************types.h************************************/
131 
132 /**********************************types.h*************************************
133 File Description:
134 -----------------
135 
136 ***********************************types.h************************************/
137 typedef PetscErrorCode (*vfp)(void*,void*,int,...);
138 typedef PetscErrorCode (*rbfp)(PetscScalar *, PetscScalar *, PetscInt len);
139 #define vbfp MPI_User_function *
140 typedef PetscInt (*bfp)(void*, void *, PetscInt *len, MPI_Datatype *dt);
141 
142 /***********************************comm.h*************************************
143 
144 Author: Henry M. Tufo III
145 
146 e-mail: hmt@cs.brown.edu
147 
148 snail-mail:
149 Division of Applied Mathematics
150 Brown University
151 Providence, RI 02912
152 
153 Last Modification:
154 6.21.97
155 ***********************************comm.h*************************************/
156 
157 /***********************************comm.h*************************************
158 File Description:
159 -----------------
160 
161 ***********************************comm.h*************************************/
162 
163 /***********************************comm.h*************************************
164 Function:
165 
166 Input :
167 Output:
168 Return:
169 Description:
170 Usage:
171 ***********************************comm.h*************************************/
172 extern PetscMPIInt my_id;
173 extern PetscMPIInt num_nodes;
174 extern PetscMPIInt floor_num_nodes;
175 extern PetscMPIInt i_log2_num_nodes;
176 
177 extern PetscErrorCode giop(PetscInt *vals, PetscInt *work, PetscInt n, PetscInt *oprs);
178 extern PetscErrorCode grop(PetscScalar *vals, PetscScalar *work, PetscInt n, PetscInt *oprs);
179 extern PetscErrorCode gfop(void *vals, void *wk, PetscInt n, vbfp fp, MPI_Datatype dt, PetscInt comm_type);
180 extern PetscErrorCode comm_init(void);
181 extern PetscErrorCode giop_hc(PetscInt *vals, PetscInt *work, PetscInt n, PetscInt *oprs, PetscInt dim);
182 extern PetscErrorCode grop_hc(PetscScalar *vals, PetscScalar *work, PetscInt n, PetscInt *oprs, PetscInt dim);
183 extern PetscErrorCode ssgl_radd(PetscScalar *vals, PetscScalar *work, PetscInt level, PetscInt *segs);
184 
185 #define MSGTAG0 101
186 #define MSGTAG1 1001
187 #define MSGTAG2 76207
188 #define MSGTAG3 100001
189 #define MSGTAG4 163841
190 #define MSGTAG5 249439
191 #define MSGTAG6 10000001
192 
193 
194 /**********************************error.h*************************************
195 
196 Author: Henry M. Tufo III
197 
198 e-mail: hmt@cs.brown.edu
199 
200 snail-mail:
201 Division of Applied Mathematics
202 Brown University
203 Providence, RI 02912
204 
205 Last Modification:
206 6.21.97
207 **********************************error.h*************************************/
208 
209 /**********************************error.h*************************************
210 File Description:
211 -----------------
212 
213 **********************************error.h*************************************/
214 
215 /**********************************error.h*************************************
216 Function: error_msg_fatal()
217 
218 Input : formatted string and arguments.
219 Output: conversion printed to stdout.
220 Return: na.
221 Description: prints error message and terminates program.
222 Usage: error_msg_fatal("this is my %d'st test",test_num)
223 **********************************error.h*************************************/
224 extern PetscErrorCode error_msg_fatal(const char msg[], ...);
225 
226 
227 
228 /**********************************error.h*************************************
229 Function: error_msg_warning()
230 
231 Input : formatted string and arguments.
232 Output: conversion printed to stdout.
233 Return: na.
234 Description: prints error message.
235 Usage: error_msg_warning("this is my %d'st test",test_num)
236 **********************************error.h*************************************/
237 extern PetscErrorCode error_msg_warning(const char msg[], ...);
238 
239 /*$Id: vector.c,v 1.228 2001/03/23 23:21:22 balay Exp $*/
240 /**********************************ivec.h**************************************
241 
242 Author: Henry M. Tufo III
243 
244 e-mail: hmt@cs.brown.edu
245 
246 snail-mail:
247 Division of Applied Mathematics
248 Brown University
249 Providence, RI 02912
250 
251 Last Modification:
252 6.21.97
253 ***********************************ivec.h*************************************/
254 
255 /**********************************ivec.h**************************************
256 File Description:
257 -----------------
258 
259 ***********************************ivec.h*************************************/
260 
261 #define SORT_REAL		1
262 #define SORT_INTEGER	        0
263 #define SORT_INT_PTR	        2
264 
265 
266 #define NON_UNIFORM     0
267 #define GL_MAX          1
268 #define GL_MIN          2
269 #define GL_MULT         3
270 #define GL_ADD          4
271 #define GL_B_XOR        5
272 #define GL_B_OR         6
273 #define GL_B_AND        7
274 #define GL_L_XOR        8
275 #define GL_L_OR         9
276 #define GL_L_AND        10
277 #define GL_MAX_ABS      11
278 #define GL_MIN_ABS      12
279 #define GL_EXISTS       13
280 
281 
282 
283 /**********************************ivec.h**************************************
284 Function:
285 
286 Input :
287 Output:
288 Return:
289 Description:
290 Usage:
291 ***********************************ivec.h*************************************/
292 extern PetscInt *ivec_copy(PetscInt *arg1, PetscInt *arg2, PetscInt n);
293 
294 extern PetscErrorCode ivec_zero(PetscInt *arg1, PetscInt n);
295 extern PetscErrorCode ivec_set(PetscInt *arg1, PetscInt arg2, PetscInt n);
296 
297 extern PetscInt ivec_lb(PetscInt *work, PetscInt n);
298 extern PetscInt ivec_ub(PetscInt *work, PetscInt n);
299 extern PetscInt ivec_sum(PetscInt *arg1, PetscInt n);
300 
301 extern vfp ivec_fct_addr(PetscInt type);
302 
303 extern PetscErrorCode ivec_non_uniform(PetscInt *arg1, PetscInt *arg2, PetscInt n, PetscInt *arg3);
304 extern PetscErrorCode ivec_max(PetscInt *arg1, PetscInt *arg2, PetscInt n);
305 extern PetscErrorCode ivec_min(PetscInt *arg1, PetscInt *arg2, PetscInt n);
306 extern PetscErrorCode ivec_mult(PetscInt *arg1, PetscInt *arg2, PetscInt n);
307 extern PetscErrorCode ivec_add(PetscInt *arg1, PetscInt *arg2, PetscInt n);
308 extern PetscErrorCode ivec_xor(PetscInt *arg1, PetscInt *arg2, PetscInt n);
309 extern PetscErrorCode ivec_or(PetscInt *arg1, PetscInt *arg2, PetscInt len);
310 extern PetscErrorCode ivec_and(PetscInt *arg1, PetscInt *arg2, PetscInt len);
311 extern PetscErrorCode ivec_lxor(PetscInt *arg1, PetscInt *arg2, PetscInt n);
312 extern PetscErrorCode ivec_lor(PetscInt *arg1, PetscInt *arg2, PetscInt len);
313 extern PetscErrorCode ivec_land(PetscInt *arg1, PetscInt *arg2, PetscInt len);
314 extern PetscErrorCode ivec_and3( PetscInt *arg1,  PetscInt *arg2,  PetscInt *arg3, PetscInt n);
315 
316 extern PetscErrorCode ivec_sort_companion(PetscInt *ar, PetscInt *ar2, PetscInt size);
317 extern PetscErrorCode ivec_sort(PetscInt *ar, PetscInt size);
318 extern PetscErrorCode SMI_sort(void *ar1, void *ar2, PetscInt size, PetscInt type);
319 extern PetscInt ivec_binary_search(PetscInt item, PetscInt *list, PetscInt n);
320 extern PetscInt ivec_linear_search(PetscInt item, PetscInt *list, PetscInt n);
321 
322 extern PetscErrorCode ivec_sort_companion_hack(PetscInt *ar, PetscInt **ar2, PetscInt size);
323 
324 
325 extern PetscErrorCode rvec_zero(PetscScalar *arg1, PetscInt n);
326 extern PetscErrorCode rvec_one(PetscScalar *arg1, PetscInt n);
327 extern PetscErrorCode rvec_set(PetscScalar *arg1, PetscScalar arg2, PetscInt n);
328 extern PetscErrorCode rvec_copy(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
329 extern PetscErrorCode rvec_scale(PetscScalar *arg1, PetscScalar arg2, PetscInt n);
330 
331 extern vfp rvec_fct_addr(PetscInt type);
332 extern PetscErrorCode rvec_add(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
333 extern PetscErrorCode rvec_mult(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
334 extern PetscErrorCode rvec_max(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
335 extern PetscErrorCode rvec_max_abs(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
336 extern PetscErrorCode rvec_min(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
337 extern PetscErrorCode rvec_min_abs(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
338 extern PetscErrorCode vec_exists(PetscScalar *arg1, PetscScalar *arg2, PetscInt n);
339 
340 
341 /*$Id: vector.c,v 1.228 2001/03/23 23:21:22 balay Exp $*/
342 /***********************************gs.h***************************************
343 
344 Author: Henry M. Tufo III
345 
346 e-mail: hmt@cs.brown.edu
347 
348 snail-mail:
349 Division of Applied Mathematics
350 Brown University
351 Providence, RI 02912
352 
353 Last Modification:
354 6.21.97
355 ************************************gs.h**************************************/
356 
357 /***********************************gs.h***************************************
358 File Description:
359 -----------------
360 
361 ************************************gs.h**************************************/
362 
363 /***********************************gs.h***************************************
364 Type: gs_ADT
365 ------------
366 
367 ************************************gs.h**************************************/
368 
369 typedef struct gather_scatter_id *gs_ADT;
370 typedef PetscErrorCode (*Rbfp)(PetscScalar *, PetscScalar *, PetscInt len);
371 
372 /***********************************gs.h***************************************
373 Function:
374 
375 Input :
376 Output:
377 Return:
378 Description:
379 Usage:
380 ************************************gs.h**************************************/
381 extern gs_ADT gs_init(PetscInt *elms, PetscInt nel, PetscInt level);
382 extern PetscErrorCode   gs_gop(gs_ADT gs_handle, PetscScalar *vals, const char *op);
383 extern PetscErrorCode   gs_gop_vec(gs_ADT gs_handle, PetscScalar *vals, const char *op, PetscInt step);
384 extern PetscErrorCode   gs_gop_binary(gs_ADT gs, PetscScalar *vals, Rbfp fct);
385 extern PetscErrorCode   gs_gop_hc(gs_ADT gs_handle, PetscScalar *vals, const char *op, PetscInt dim);
386 extern PetscErrorCode   gs_free(gs_ADT gs_handle);
387 extern PetscErrorCode   gs_init_msg_buf_sz(PetscInt buf_size);
388 extern PetscErrorCode   gs_init_vec_sz(PetscInt size);
389 
390 
391 
392 /*************************************xxt.h************************************
393 Module Name: xxt
394 Module Info: need xxt.{c,h} gs.{c,h} comm.{c,h} ivec.{c,h} error.{c,h}
395 
396 author:  Henry M. Tufo III
397 e-mail:  hmt@asci.uchicago.edu
398 contact:
399 +--------------------------------+--------------------------------+
400 |MCS Division - Building 221     |Department of Computer Science  |
401 |Argonne National Laboratory     |Ryerson 152                     |
402 |9700 S. Cass Avenue             |The University of Chicago       |
403 |Argonne, IL  60439              |Chicago, IL  60637              |
404 |(630) 252-5354/5986 ph/fx       |(773) 702-6019/8487 ph/fx       |
405 +--------------------------------+--------------------------------+
406 
407 Last Modification: 3.20.01
408 **************************************xxt.h***********************************/
409 
410 /*************************************xxt.h************************************
411 File Description:
412 **************************************xxt.h***********************************/
413 
414 /*************************************xxt.h************************************
415 Notes on Usage:
416 **************************************xxt.h***********************************/
417 
418 
419 typedef struct xxt_CDT *xxt_ADT;
420 
421 
422 /*************************************xxt.h************************************
423 Function: XXT_new()
424 
425 Input :
426 Output:
427 Return: ADT ptr or NULL upon failure.
428 Description: This function allocates and returns an xxt handle
429 Usage: xxt_handle = xxt_new();
430 **************************************xxt.h***********************************/
431 extern xxt_ADT XXT_new(void);
432 
433 
434 /*************************************xxt.h************************************
435 Function: XXT_free()
436 
437 Input : pointer to ADT.
438 Output:
439 Return:
440 Description: This function frees the storage associated with an xxt handle
441 Usage: XXT_free(xxt_handle);
442 **************************************xxt.h***********************************/
443 EXTERN PetscInt XXT_free(xxt_ADT xxt_handle);
444 
445 
446 /*************************************xxt.h************************************
447 Function: XXT_factor
448 
449 Input : ADT ptr,  and pointer to object
450 Output:
451 Return: 0 on failure, 1 on success
452 Description: This function sets the xxt solver
453 
454 xxt assumptions: given n rows of global coarse matrix (E_loc) where
455    o global dofs N = sum_p(n), p=0,P-1
456    (i.e. row dist. with no dof replication)
457    (5.21.00 will handle dif replication case)
458    o m is the number of columns in E_loc (m>=n)
459    o local2global holds global number of column i (i=0,...,m-1)
460    o local2global holds global number of row    i (i=0,...,n-1)
461    o mylocmatvec performs E_loc . x_loc where x_loc is an vector of
462    length m in 1-1 correspondence with local2global
463    (note that gs package takes care of communication).
464    (note do not zero out upper m-n entries!)
465    o mylocmatvec(void *grid_data, double *in, double *out)
466 
467 ML beliefs/usage: move this to to ML_XXT_factor routine
468    o my_ml holds address of ML struct associated w/E_loc, grid_data, grid_tag
469    o grid_tag, grid_data, my_ml used in
470       ML_Set_CSolve(my_ml, grid_tag, grid_data, ML_Do_CoarseDirect);
471    o grid_data used in
472       A_matvec(grid_data,v,u);
473 
474 Usage:
475 **************************************xxt.h***********************************/
476 extern PetscInt XXT_factor(xxt_ADT xxt_handle,   /* prev. allocated xxt  handle */
477                       PetscInt *local2global,    /* global column mapping       */
478 		      PetscInt n,                /* local num rows              */
479 		      PetscInt m,                /* local num cols              */
480 		      void *mylocmatvec,    /* b_loc=A_local.x_loc         */
481 		      void *grid_data       /* grid data for matvec        */
482 		      );
483 
484 
485 /*************************************xxt.h************************************
486 Function: XXT_solve
487 
488 Input : ADT ptr, b (rhs)
489 Output: x (soln)
490 Return:
491 Description: This function performs x = E^-1.b
492 Usage:
493 XXT_solve(xxt_handle, double *x, double *b)
494 XXT_solve(xxt_handle, double *x, NULL)
495 assumes x has been initialized to be b
496 **************************************xxt.h***********************************/
497 extern PetscInt XXT_solve(xxt_ADT xxt_handle, double *x, double *b);
498 
499 
500 /*************************************xxt.h************************************
501 Function: XXT_stats
502 
503 Input : handle
504 Output:
505 Return:
506 Description:
507 factor stats
508 **************************************xxt.h***********************************/
509 extern PetscInt XXT_stats(xxt_ADT xxt_handle);
510 
511 
512 /*************************************xxt.h************************************
513 Function: XXT_sp_1()
514 
515 Input : pointer to ADT
516 Output:
517 Return:
518 Description: sets xxt parameter 1 in xxt_handle
519 Usage: implement later
520 
521 void XXT_sp_1(xxt_handle,parameter 1 value)
522 **************************************xxt.h***********************************/
523 
524 
525 /*************************************xyt.h************************************
526 Module Name: xyt
527 Module Info: need xyt.{c,h} gs.{c,h} comm.{c,h} ivec.{c,h} error.{c,h}
528 
529 author:  Henry M. Tufo III
530 e-mail:  hmt@asci.uchicago.edu
531 contact:
532 +--------------------------------+--------------------------------+
533 |MCS Division - Building 221     |Department of Computer Science  |
534 |Argonne National Laboratory     |Ryerson 152                     |
535 |9700 S. Cass Avenue             |The University of Chicago       |
536 |Argonne, IL  60439              |Chicago, IL  60637              |
537 |(630) 252-5354/5986 ph/fx       |(773) 702-6019/8487 ph/fx       |
538 +--------------------------------+--------------------------------+
539 
540 Last Modification: 3.20.01
541 **************************************xyt.h***********************************/
542 
543 /*************************************xyt.h************************************
544 File Description:
545 **************************************xyt.h***********************************/
546 
547 /*************************************xyt.h************************************
548 Notes on Usage:
549 **************************************xyt.h***********************************/
550 
551 
552 
553 typedef struct xyt_CDT *xyt_ADT;
554 
555 
556 /*************************************xyt.h************************************
557 Function: XYT_new()
558 
559 Input :
560 Output:
561 Return: ADT ptr or NULL upon failure.
562 Description: This function allocates and returns an xyt handle
563 Usage: xyt_handle = xyt_new();
564 **************************************xyt.h***********************************/
565 extern xyt_ADT XYT_new(void);
566 
567 
568 /*************************************xyt.h************************************
569 Function: XYT_free()
570 
571 Input : pointer to ADT.
572 Output:
573 Return:
574 Description: This function frees the storage associated with an xyt handle
575 Usage: XYT_free(xyt_handle);
576 **************************************xyt.h***********************************/
577 EXTERN PetscInt XYT_free(xyt_ADT xyt_handle);
578 
579 
580 /*************************************xyt.h************************************
581 Function: XYT_factor
582 
583 Input : ADT ptr,  and pointer to object
584 Output:
585 Return: 0 on failure, 1 on success
586 Description: This function sets the xyt solver
587 
588 xyt assumptions: given n rows of global coarse matrix (E_loc) where
589    o global dofs N = sum_p(n), p=0,P-1
590    (i.e. row dist. with no dof replication)
591    (5.21.00 will handle dif replication case)
592    o m is the number of columns in E_loc (m>=n)
593    o local2global holds global number of column i (i=0,...,m-1)
594    o local2global holds global number of row    i (i=0,...,n-1)
595    o mylocmatvec performs E_loc . x_loc where x_loc is an vector of
596    length m in 1-1 correspondence with local2global
597    (note that gs package takes care of communication).
598    (note do not zero out upper m-n entries!)
599    o mylocmatvec(void *grid_data, double *in, double *out)
600 
601 ML beliefs/usage: move this to to ML_XYT_factor routine
602    o my_ml holds address of ML struct associated w/E_loc, grid_data, grid_tag
603    o grid_tag, grid_data, my_ml used in
604       ML_Set_CSolve(my_ml, grid_tag, grid_data, ML_Do_CoarseDirect);
605    o grid_data used in
606       A_matvec(grid_data,v,u);
607 
608 Usage:
609 **************************************xyt.h***********************************/
610 extern PetscInt XYT_factor(xyt_ADT xyt_handle,   /* prev. allocated xyt  handle */
611                       PetscInt *local2global,    /* global column mapping       */
612 		      PetscInt n,                /* local num rows              */
613 		      PetscInt m,                /* local num cols              */
614 		      void *mylocmatvec,    /* b_loc=A_local.x_loc         */
615 		      void *grid_data       /* grid data for matvec        */
616 		      );
617 
618 
619 /*************************************xyt.h************************************
620 Function: XYT_solve
621 
622 Input : ADT ptr, b (rhs)
623 Output: x (soln)
624 Return:
625 Description: This function performs x = E^-1.b
626 Usage: XYT_solve(xyt_handle, double *x, double *b)
627 **************************************xyt.h***********************************/
628 extern PetscInt XYT_solve(xyt_ADT xyt_handle, double *x, double *b);
629 
630 
631 /*************************************xyt.h************************************
632 Function: XYT_stats
633 
634 Input : handle
635 Output:
636 Return:
637 Description:
638 factor stats
639 **************************************xyt.h***********************************/
640 extern PetscInt XYT_stats(xyt_ADT xyt_handle);
641 
642 
643 /*************************************xyt.h************************************
644 Function: XYT_sp_1()
645 
646 Input : pointer to ADT
647 Output:
648 Return:
649 Description: sets xyt parameter 1 in xyt_handle
650 Usage: implement later
651 
652 PetscErrorCode XYT_sp_1(xyt_handle,parameter 1 value)
653 **************************************xyt.h***********************************/
654 
655 /********************************bit_mask.h************************************
656 
657 Author: Henry M. Tufo III
658 
659 e-mail: hmt@cs.brown.edu
660 
661 snail-mail:
662 Division of Applied Mathematics
663 Brown University
664 Providence, RI 02912
665 
666 Last Modification:
667 11.21.97
668 *********************************bit_mask.h***********************************/
669 
670 /********************************bit_mask.h************************************
671 File Description:
672 -----------------
673 
674 *********************************bit_mask.h***********************************/
675 
676 
677 /********************************bit_mask.h************************************
678 Function:
679 
680 Input :
681 Output:
682 Return:
683 Description:
684 Usage:
685 *********************************bit_mask.h***********************************/
686 extern PetscInt div_ceil(PetscInt numin, PetscInt denom);
687 extern PetscErrorCode set_bit_mask(PetscInt *bm, PetscInt len, PetscInt val);
688 extern PetscInt len_bit_mask(PetscInt num_items);
689 extern PetscInt ct_bits(char *ptr, PetscInt n);
690 extern PetscErrorCode bm_to_proc(char *ptr, PetscInt p_mask, PetscInt *msg_list);
691 extern PetscInt len_buf(PetscInt item_size, PetscInt num_items);
692 
693 #endif
694 
695