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 101 #define LOG2(x) (PetscScalar)log((double)x)/log(2) 102 #define SWAP(a,b) temp=(a); (a)=(b); (b)=temp; 103 #define P_SWAP(a,b) ptr=(a); (a)=(b); (b)=ptr; 104 105 #define MAX_FABS(x,y) ((double)fabs(x)>(double)fabs(y)) ? ((PetscScalar)x) : ((PetscScalar)y) 106 #define MIN_FABS(x,y) ((double)fabs(x)<(double)fabs(y)) ? ((PetscScalar)x) : ((PetscScalar)y) 107 108 /* specer's existence ... can be done w/MAX_ABS */ 109 #define EXISTS(x,y) ((x)==0.0) ? (y) : (x) 110 111 #define MULT_NEG_ONE(a) (a) *= -1; 112 #define NEG(a) (a) |= BIT_31; 113 #define POS(a) (a) &= INT_MAX; 114 115 116 117 118 /**********************************types.h************************************* 119 120 Author: Henry M. Tufo III 121 122 e-mail: hmt@cs.brown.edu 123 124 snail-mail: 125 Division of Applied Mathematics 126 Brown University 127 Providence, RI 02912 128 129 Last Modification: 130 6.21.97 131 ***********************************types.h************************************/ 132 133 /**********************************types.h************************************* 134 File Description: 135 ----------------- 136 137 ***********************************types.h************************************/ 138 typedef PetscErrorCode (*vfp)(void*,void*,int,...); 139 typedef PetscErrorCode (*rbfp)(PetscScalar *, PetscScalar *, int len); 140 #define vbfp MPI_User_function * 141 typedef int (*bfp)(void*, void *, int *len, MPI_Datatype *dt); 142 143 /***********************************comm.h************************************* 144 145 Author: Henry M. Tufo III 146 147 e-mail: hmt@cs.brown.edu 148 149 snail-mail: 150 Division of Applied Mathematics 151 Brown University 152 Providence, RI 02912 153 154 Last Modification: 155 6.21.97 156 ***********************************comm.h*************************************/ 157 158 /***********************************comm.h************************************* 159 File Description: 160 ----------------- 161 162 ***********************************comm.h*************************************/ 163 164 /***********************************comm.h************************************* 165 Function: 166 167 Input : 168 Output: 169 Return: 170 Description: 171 Usage: 172 ***********************************comm.h*************************************/ 173 extern PetscMPIInt my_id; 174 extern PetscMPIInt num_nodes; 175 extern PetscMPIInt floor_num_nodes; 176 extern PetscMPIInt i_log2_num_nodes; 177 178 extern PetscErrorCode giop(int *vals, int *work, int n, int *oprs); 179 extern PetscErrorCode grop(PetscScalar *vals, PetscScalar *work, int n, int *oprs); 180 extern PetscErrorCode gfop(void *vals, void *wk, int n, vbfp fp, MPI_Datatype dt, int comm_type); 181 extern PetscErrorCode comm_init(void); 182 extern PetscErrorCode giop_hc(int *vals, int *work, int n, int *oprs, int dim); 183 extern PetscErrorCode grop_hc(PetscScalar *vals, PetscScalar *work, int n, int *oprs, int dim); 184 extern PetscErrorCode grop_hc_vvl(PetscScalar *vals, PetscScalar *work, int *n, int *oprs, int dim); 185 extern PetscErrorCode ssgl_radd(PetscScalar *vals, PetscScalar *work, int level, int *segs); 186 187 #define MSGTAG0 101 188 #define MSGTAG1 1001 189 #define MSGTAG2 76207 190 #define MSGTAG3 100001 191 #define MSGTAG4 163841 192 #define MSGTAG5 249439 193 #define MSGTAG6 10000001 194 195 196 /**********************************error.h************************************* 197 198 Author: Henry M. Tufo III 199 200 e-mail: hmt@cs.brown.edu 201 202 snail-mail: 203 Division of Applied Mathematics 204 Brown University 205 Providence, RI 02912 206 207 Last Modification: 208 6.21.97 209 **********************************error.h*************************************/ 210 211 /**********************************error.h************************************* 212 File Description: 213 ----------------- 214 215 **********************************error.h*************************************/ 216 217 /**********************************error.h************************************* 218 Function: error_msg_fatal() 219 220 Input : formatted string and arguments. 221 Output: conversion printed to stdout. 222 Return: na. 223 Description: prints error message and terminates program. 224 Usage: error_msg_fatal("this is my %d'st test",test_num) 225 **********************************error.h*************************************/ 226 extern PetscErrorCode error_msg_fatal(const char msg[], ...); 227 228 229 230 /**********************************error.h************************************* 231 Function: error_msg_warning() 232 233 Input : formatted string and arguments. 234 Output: conversion printed to stdout. 235 Return: na. 236 Description: prints error message. 237 Usage: error_msg_warning("this is my %d'st test",test_num) 238 **********************************error.h*************************************/ 239 extern PetscErrorCode error_msg_warning(const char msg[], ...); 240 241 /*$Id: vector.c,v 1.228 2001/03/23 23:21:22 balay Exp $*/ 242 /**********************************ivec.h************************************** 243 244 Author: Henry M. Tufo III 245 246 e-mail: hmt@cs.brown.edu 247 248 snail-mail: 249 Division of Applied Mathematics 250 Brown University 251 Providence, RI 02912 252 253 Last Modification: 254 6.21.97 255 ***********************************ivec.h*************************************/ 256 257 /**********************************ivec.h************************************** 258 File Description: 259 ----------------- 260 261 ***********************************ivec.h*************************************/ 262 263 #define SORT_REAL 1 264 #define SORT_INTEGER 0 265 #define SORT_INT_PTR 2 266 267 268 #define NON_UNIFORM 0 269 #define GL_MAX 1 270 #define GL_MIN 2 271 #define GL_MULT 3 272 #define GL_ADD 4 273 #define GL_B_XOR 5 274 #define GL_B_OR 6 275 #define GL_B_AND 7 276 #define GL_L_XOR 8 277 #define GL_L_OR 9 278 #define GL_L_AND 10 279 #define GL_MAX_ABS 11 280 #define GL_MIN_ABS 12 281 #define GL_EXISTS 13 282 283 284 285 /**********************************ivec.h************************************** 286 Function: 287 288 Input : 289 Output: 290 Return: 291 Description: 292 Usage: 293 ***********************************ivec.h*************************************/ 294 extern int *ivec_copy(int *arg1, int *arg2, int n); 295 296 extern PetscErrorCode ivec_zero(int *arg1, int n); 297 extern PetscErrorCode ivec_set(int *arg1, int arg2, int n); 298 299 extern int ivec_lb(int *work, int n); 300 extern int ivec_ub(int *work, int n); 301 extern int ivec_sum(int *arg1, int n); 302 303 extern vfp ivec_fct_addr(int type); 304 305 extern PetscErrorCode ivec_non_uniform(int *arg1, int *arg2, int n, int *arg3); 306 extern PetscErrorCode ivec_max(int *arg1, int *arg2, int n); 307 extern PetscErrorCode ivec_min(int *arg1, int *arg2, int n); 308 extern PetscErrorCode ivec_mult(int *arg1, int *arg2, int n); 309 extern PetscErrorCode ivec_add(int *arg1, int *arg2, int n); 310 extern PetscErrorCode ivec_xor(int *arg1, int *arg2, int n); 311 extern PetscErrorCode ivec_or(int *arg1, int *arg2, int len); 312 extern PetscErrorCode ivec_and(int *arg1, int *arg2, int len); 313 extern PetscErrorCode ivec_lxor(int *arg1, int *arg2, int n); 314 extern PetscErrorCode ivec_lor(int *arg1, int *arg2, int len); 315 extern PetscErrorCode ivec_land(int *arg1, int *arg2, int len); 316 extern PetscErrorCode ivec_and3( int *arg1, int *arg2, int *arg3, int n); 317 318 extern PetscErrorCode ivec_sort_companion(int *ar, int *ar2, int size); 319 extern PetscErrorCode ivec_sort(int *ar, int size); 320 extern PetscErrorCode SMI_sort(void *ar1, void *ar2, int size, int type); 321 extern int ivec_binary_search(int item, int *list, int n); 322 extern int ivec_linear_search(int item, int *list, int n); 323 324 extern PetscErrorCode ivec_sort_companion_hack(int *ar, int **ar2, int size); 325 326 327 extern PetscErrorCode rvec_zero(PetscScalar *arg1, int n); 328 extern PetscErrorCode rvec_one(PetscScalar *arg1, int n); 329 extern PetscErrorCode rvec_set(PetscScalar *arg1, PetscScalar arg2, int n); 330 extern PetscErrorCode rvec_copy(PetscScalar *arg1, PetscScalar *arg2, int n); 331 extern PetscErrorCode rvec_scale(PetscScalar *arg1, PetscScalar arg2, int n); 332 333 extern vfp rvec_fct_addr(int type); 334 extern PetscErrorCode rvec_add(PetscScalar *arg1, PetscScalar *arg2, int n); 335 extern PetscErrorCode rvec_mult(PetscScalar *arg1, PetscScalar *arg2, int n); 336 extern PetscErrorCode rvec_max(PetscScalar *arg1, PetscScalar *arg2, int n); 337 extern PetscErrorCode rvec_max_abs(PetscScalar *arg1, PetscScalar *arg2, int n); 338 extern PetscErrorCode rvec_min(PetscScalar *arg1, PetscScalar *arg2, int n); 339 extern PetscErrorCode rvec_min_abs(PetscScalar *arg1, PetscScalar *arg2, int n); 340 extern PetscErrorCode vec_exists(PetscScalar *arg1, PetscScalar *arg2, int n); 341 342 343 /**********************************queue.h************************************* 344 345 Author: Henry M. Tufo III 346 347 e-mail: hmt@cs.brown.edu 348 349 snail-mail: 350 Division of Applied Mathematics 351 Brown University 352 Providence, RI 02912 353 354 Last Modification: 355 6.21.97 356 **********************************queue.h*************************************/ 357 358 /**********************************queue.h************************************* 359 File Description: 360 ----------------- 361 This file provides an interface to a simple queue abstraction. 362 **********************************queue.h*************************************/ 363 364 /**********************************queue.h************************************* 365 Type: queue_ADT 366 --------------- 367 This line defines the abstract queue type as a pointer to 368 its concrete counterpart. Clients have no access to the 369 underlying representation. 370 **********************************queue.h*************************************/ 371 typedef struct queue_CDT *queue_ADT; 372 373 374 375 /**********************************queue.h************************************* 376 Function: new_queue() 377 378 Input : na 379 Output: na 380 Return: pointer to ADT. 381 Description: This function allocates and returns an empty queue. 382 Usage: queue = new_queue(); 383 **********************************queue.h*************************************/ 384 extern queue_ADT new_queue(void); 385 386 387 388 /**********************************queue.h************************************* 389 Function: free_queue() 390 391 Input : pointer to ADT. 392 Output: na 393 Return: na 394 Description: This function frees the storage associated with queue but not any 395 pointer contained w/in. 396 Usage: free_queue(queue); 397 **********************************queue.h*************************************/ 398 extern PetscErrorCode free_queue(queue_ADT queue); 399 400 401 402 /**********************************queue.h************************************* 403 Function: enqueue() 404 405 Input : pointer to ADT and pointer to object 406 Output: na 407 Return: na 408 Description: This function adds obj to the end of the queue. 409 Usage: enqueue(queue, obj); 410 **********************************queue.h*************************************/ 411 extern PetscErrorCode enqueue(queue_ADT queue, void *obj); 412 413 414 415 /**********************************queue.h************************************* 416 Function: dequeue() 417 418 Input : pointer to ADT 419 Output: na 420 Return: void * to element 421 Description: This function removes the data value at the head of the queue 422 and returns it to the client. dequeueing an empty queue is an error 423 Usage: obj = dequeue(queue); 424 **********************************queue.h*************************************/ 425 extern PetscErrorCode *dequeue(queue_ADT queue); 426 427 428 429 /**********************************queue.h************************************* 430 Function: len_queue() 431 432 Input : pointer to ADT 433 Output: na 434 Return: integer number of elements 435 Description: This function returns the number of elements in the queue. 436 Usage: n = len_queue(queue); 437 **********************************queue.h*************************************/ 438 EXTERN int len_queue(queue_ADT queue); 439 440 441 442 /*$Id: vector.c,v 1.228 2001/03/23 23:21:22 balay Exp $*/ 443 /***********************************gs.h*************************************** 444 445 Author: Henry M. Tufo III 446 447 e-mail: hmt@cs.brown.edu 448 449 snail-mail: 450 Division of Applied Mathematics 451 Brown University 452 Providence, RI 02912 453 454 Last Modification: 455 6.21.97 456 ************************************gs.h**************************************/ 457 458 /***********************************gs.h*************************************** 459 File Description: 460 ----------------- 461 462 ************************************gs.h**************************************/ 463 464 /***********************************gs.h*************************************** 465 Type: gs_ADT 466 ------------ 467 468 ************************************gs.h**************************************/ 469 470 typedef struct gather_scatter_id *gs_ADT; 471 typedef PetscErrorCode (*Rbfp)(PetscScalar *, PetscScalar *, int len); 472 473 /***********************************gs.h*************************************** 474 Function: 475 476 Input : 477 Output: 478 Return: 479 Description: 480 Usage: 481 ************************************gs.h**************************************/ 482 extern gs_ADT gs_init(int *elms, int nel, int level); 483 extern PetscErrorCode gs_gop(gs_ADT gs_handle, PetscScalar *vals, const char *op); 484 extern PetscErrorCode gs_gop_vec(gs_ADT gs_handle, PetscScalar *vals, const char *op, int step); 485 extern PetscErrorCode gs_gop_binary(gs_ADT gs, PetscScalar *vals, Rbfp fct); 486 extern PetscErrorCode gs_gop_hc(gs_ADT gs_handle, PetscScalar *vals, const char *op, int dim); 487 extern PetscErrorCode gs_free(gs_ADT gs_handle); 488 extern PetscErrorCode gs_init_msg_buf_sz(int buf_size); 489 extern PetscErrorCode gs_init_vec_sz(int size); 490 491 492 493 /*************************************xxt.h************************************ 494 Module Name: xxt 495 Module Info: need xxt.{c,h} gs.{c,h} comm.{c,h} ivec.{c,h} error.{c,h} 496 497 author: Henry M. Tufo III 498 e-mail: hmt@asci.uchicago.edu 499 contact: 500 +--------------------------------+--------------------------------+ 501 |MCS Division - Building 221 |Department of Computer Science | 502 |Argonne National Laboratory |Ryerson 152 | 503 |9700 S. Cass Avenue |The University of Chicago | 504 |Argonne, IL 60439 |Chicago, IL 60637 | 505 |(630) 252-5354/5986 ph/fx |(773) 702-6019/8487 ph/fx | 506 +--------------------------------+--------------------------------+ 507 508 Last Modification: 3.20.01 509 **************************************xxt.h***********************************/ 510 511 /*************************************xxt.h************************************ 512 File Description: 513 **************************************xxt.h***********************************/ 514 515 /*************************************xxt.h************************************ 516 Notes on Usage: 517 **************************************xxt.h***********************************/ 518 519 520 typedef struct xxt_CDT *xxt_ADT; 521 522 523 /*************************************xxt.h************************************ 524 Function: XXT_new() 525 526 Input : 527 Output: 528 Return: ADT ptr or NULL upon failure. 529 Description: This function allocates and returns an xxt handle 530 Usage: xxt_handle = xxt_new(); 531 **************************************xxt.h***********************************/ 532 extern xxt_ADT XXT_new(void); 533 534 535 /*************************************xxt.h************************************ 536 Function: XXT_free() 537 538 Input : pointer to ADT. 539 Output: 540 Return: 541 Description: This function frees the storage associated with an xxt handle 542 Usage: XXT_free(xxt_handle); 543 **************************************xxt.h***********************************/ 544 EXTERN int XXT_free(xxt_ADT xxt_handle); 545 546 547 /*************************************xxt.h************************************ 548 Function: XXT_factor 549 550 Input : ADT ptr, and pointer to object 551 Output: 552 Return: 0 on failure, 1 on success 553 Description: This function sets the xxt solver 554 555 xxt assumptions: given n rows of global coarse matrix (E_loc) where 556 o global dofs N = sum_p(n), p=0,P-1 557 (i.e. row dist. with no dof replication) 558 (5.21.00 will handle dif replication case) 559 o m is the number of columns in E_loc (m>=n) 560 o local2global holds global number of column i (i=0,...,m-1) 561 o local2global holds global number of row i (i=0,...,n-1) 562 o mylocmatvec performs E_loc . x_loc where x_loc is an vector of 563 length m in 1-1 correspondence with local2global 564 (note that gs package takes care of communication). 565 (note do not zero out upper m-n entries!) 566 o mylocmatvec(void *grid_data, double *in, double *out) 567 568 ML beliefs/usage: move this to to ML_XXT_factor routine 569 o my_ml holds address of ML struct associated w/E_loc, grid_data, grid_tag 570 o grid_tag, grid_data, my_ml used in 571 ML_Set_CSolve(my_ml, grid_tag, grid_data, ML_Do_CoarseDirect); 572 o grid_data used in 573 A_matvec(grid_data,v,u); 574 575 Usage: 576 **************************************xxt.h***********************************/ 577 extern int XXT_factor(xxt_ADT xxt_handle, /* prev. allocated xxt handle */ 578 int *local2global, /* global column mapping */ 579 int n, /* local num rows */ 580 int m, /* local num cols */ 581 void *mylocmatvec, /* b_loc=A_local.x_loc */ 582 void *grid_data /* grid data for matvec */ 583 ); 584 585 586 /*************************************xxt.h************************************ 587 Function: XXT_solve 588 589 Input : ADT ptr, b (rhs) 590 Output: x (soln) 591 Return: 592 Description: This function performs x = E^-1.b 593 Usage: 594 XXT_solve(xxt_handle, double *x, double *b) 595 XXT_solve(xxt_handle, double *x, NULL) 596 assumes x has been initialized to be b 597 **************************************xxt.h***********************************/ 598 extern int XXT_solve(xxt_ADT xxt_handle, double *x, double *b); 599 600 601 /*************************************xxt.h************************************ 602 Function: XXT_stats 603 604 Input : handle 605 Output: 606 Return: 607 Description: 608 factor stats 609 **************************************xxt.h***********************************/ 610 extern int XXT_stats(xxt_ADT xxt_handle); 611 612 613 /*************************************xxt.h************************************ 614 Function: XXT_sp_1() 615 616 Input : pointer to ADT 617 Output: 618 Return: 619 Description: sets xxt parameter 1 in xxt_handle 620 Usage: implement later 621 622 void XXT_sp_1(xxt_handle,parameter 1 value) 623 **************************************xxt.h***********************************/ 624 625 626 /*************************************xyt.h************************************ 627 Module Name: xyt 628 Module Info: need xyt.{c,h} gs.{c,h} comm.{c,h} ivec.{c,h} error.{c,h} 629 630 author: Henry M. Tufo III 631 e-mail: hmt@asci.uchicago.edu 632 contact: 633 +--------------------------------+--------------------------------+ 634 |MCS Division - Building 221 |Department of Computer Science | 635 |Argonne National Laboratory |Ryerson 152 | 636 |9700 S. Cass Avenue |The University of Chicago | 637 |Argonne, IL 60439 |Chicago, IL 60637 | 638 |(630) 252-5354/5986 ph/fx |(773) 702-6019/8487 ph/fx | 639 +--------------------------------+--------------------------------+ 640 641 Last Modification: 3.20.01 642 **************************************xyt.h***********************************/ 643 644 /*************************************xyt.h************************************ 645 File Description: 646 **************************************xyt.h***********************************/ 647 648 /*************************************xyt.h************************************ 649 Notes on Usage: 650 **************************************xyt.h***********************************/ 651 652 653 654 typedef struct xyt_CDT *xyt_ADT; 655 656 657 /*************************************xyt.h************************************ 658 Function: XYT_new() 659 660 Input : 661 Output: 662 Return: ADT ptr or NULL upon failure. 663 Description: This function allocates and returns an xyt handle 664 Usage: xyt_handle = xyt_new(); 665 **************************************xyt.h***********************************/ 666 extern xyt_ADT XYT_new(void); 667 668 669 /*************************************xyt.h************************************ 670 Function: XYT_free() 671 672 Input : pointer to ADT. 673 Output: 674 Return: 675 Description: This function frees the storage associated with an xyt handle 676 Usage: XYT_free(xyt_handle); 677 **************************************xyt.h***********************************/ 678 EXTERN int XYT_free(xyt_ADT xyt_handle); 679 680 681 /*************************************xyt.h************************************ 682 Function: XYT_factor 683 684 Input : ADT ptr, and pointer to object 685 Output: 686 Return: 0 on failure, 1 on success 687 Description: This function sets the xyt solver 688 689 xyt assumptions: given n rows of global coarse matrix (E_loc) where 690 o global dofs N = sum_p(n), p=0,P-1 691 (i.e. row dist. with no dof replication) 692 (5.21.00 will handle dif replication case) 693 o m is the number of columns in E_loc (m>=n) 694 o local2global holds global number of column i (i=0,...,m-1) 695 o local2global holds global number of row i (i=0,...,n-1) 696 o mylocmatvec performs E_loc . x_loc where x_loc is an vector of 697 length m in 1-1 correspondence with local2global 698 (note that gs package takes care of communication). 699 (note do not zero out upper m-n entries!) 700 o mylocmatvec(void *grid_data, double *in, double *out) 701 702 ML beliefs/usage: move this to to ML_XYT_factor routine 703 o my_ml holds address of ML struct associated w/E_loc, grid_data, grid_tag 704 o grid_tag, grid_data, my_ml used in 705 ML_Set_CSolve(my_ml, grid_tag, grid_data, ML_Do_CoarseDirect); 706 o grid_data used in 707 A_matvec(grid_data,v,u); 708 709 Usage: 710 **************************************xyt.h***********************************/ 711 extern int XYT_factor(xyt_ADT xyt_handle, /* prev. allocated xyt handle */ 712 int *local2global, /* global column mapping */ 713 int n, /* local num rows */ 714 int m, /* local num cols */ 715 void *mylocmatvec, /* b_loc=A_local.x_loc */ 716 void *grid_data /* grid data for matvec */ 717 ); 718 719 720 /*************************************xyt.h************************************ 721 Function: XYT_solve 722 723 Input : ADT ptr, b (rhs) 724 Output: x (soln) 725 Return: 726 Description: This function performs x = E^-1.b 727 Usage: XYT_solve(xyt_handle, double *x, double *b) 728 **************************************xyt.h***********************************/ 729 extern int XYT_solve(xyt_ADT xyt_handle, double *x, double *b); 730 731 732 /*************************************xyt.h************************************ 733 Function: XYT_stats 734 735 Input : handle 736 Output: 737 Return: 738 Description: 739 factor stats 740 **************************************xyt.h***********************************/ 741 extern int XYT_stats(xyt_ADT xyt_handle); 742 743 744 /*************************************xyt.h************************************ 745 Function: XYT_sp_1() 746 747 Input : pointer to ADT 748 Output: 749 Return: 750 Description: sets xyt parameter 1 in xyt_handle 751 Usage: implement later 752 753 PetscErrorCode XYT_sp_1(xyt_handle,parameter 1 value) 754 **************************************xyt.h***********************************/ 755 756 /********************************bit_mask.h************************************ 757 758 Author: Henry M. Tufo III 759 760 e-mail: hmt@cs.brown.edu 761 762 snail-mail: 763 Division of Applied Mathematics 764 Brown University 765 Providence, RI 02912 766 767 Last Modification: 768 11.21.97 769 *********************************bit_mask.h***********************************/ 770 771 /********************************bit_mask.h************************************ 772 File Description: 773 ----------------- 774 775 *********************************bit_mask.h***********************************/ 776 777 778 /********************************bit_mask.h************************************ 779 Function: 780 781 Input : 782 Output: 783 Return: 784 Description: 785 Usage: 786 *********************************bit_mask.h***********************************/ 787 extern int div_ceil(int numin, int denom); 788 extern PetscErrorCode set_bit_mask(int *bm, int len, int val); 789 extern int len_bit_mask(int num_items); 790 extern int ct_bits(char *ptr, int n); 791 extern PetscErrorCode bm_to_proc(char *ptr, int p_mask, int *msg_list); 792 extern int len_buf(int item_size, int num_items); 793 794 #endif 795 796