⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 az_aztec_defs.h

📁 并行解法器,功能强大
💻 H
📖 第 1 页 / 共 2 页
字号:
/*==================================================================== * ------------------------ * | CVS File Information | * ------------------------ * * $RCSfile: az_aztec_defs.h,v $ * * $Author: tuminaro $ * * $Date: 2000/06/02 16:46:55 $ * * $Revision: 1.62 $ * * $Name:  $ *====================================================================*//******************************************************************************* * Copyright 1995, Sandia Corporation.  The United States Government retains a * * nonexclusive license in this software as prescribed in AL 88-1 and AL 91-7. * * Export of this program may require a license from the United States         * * Government.                                                                 * ******************************************************************************/#ifndef __AZTECDEFSH__#define __AZTECDEFSH__#ifndef __AZTECH__#ifdef AZ_MPI#include <mpi.h>#define MPI_AZRequest MPI_Request#define MPI_AZComm    MPI_Comm#else#define MPI_AZRequest int#define MPI_AZComm    int#endif#endif#define AZ_NOT_MPI 1/****************************************************************************** * *             version information * *****************************************************************************/#define AZ_ver2_1_0_1#define AZ_ver2_1_0_2#define AZ_ver2_1_0_3#define AZ_ver2_1_0_4#define AZ_ver2_1_0_5#define AZ_ver2_1_0_6#define AZ_ver2_1_0_7#define AZ_ver2_1_0_8/******************************************************************************* * *              message types used in communication * ******************************************************************************//* message space used corresponds to AZ_MSG_TYPE --> AZ_MSG_TYPE + NUM_MSGS *//* In general, AZTEC uses message types that lie between the values: AZ_MSG_TYPE   and AZ_MSG_TYPE + AZ_NUM_MSGS. Each time we reach a code segment which every   processor executes, the current message type to be used (the global variable   AZ_sys_msg_type) is incremeted (modulo NUM_MSGS) to determine the new message   type to use. */#define AZ_MSG_TYPE      1234#define AZ_NUM_MSGS        20/******************************************************************************* * *              various constants * ******************************************************************************/#ifndef AZ_MAX_MEMORY_SIZE#define AZ_MAX_MEMORY_SIZE   16000000  /* maximum memory size used for the LU */                                       /* within domain decomposition.        */#endif#ifndef AZ_MAX_MSG_BUFF_SIZE#define AZ_MAX_MSG_BUFF_SIZE 100000    /* max usable message buffer size      */#endif#define AZ_MAX_NEIGHBORS     250#define AZ_MAX_MESSAGE_SIZE  (AZ_MAX_MSG_BUFF_SIZE / (2*AZ_MAX_NEIGHBORS))#define AZ_FALSE               0#define AZ_TRUE                1#define AZ_MAX_POLY_ORDER     10 /* max order for polynomial preconditioners */#define AZ_default           -10 /* options[i] = AZ_default ==>                                        AZ_check_input() sets options[i] to                                        its default value.                                  *//******************************************************************************* * *              constants for solver types * ******************************************************************************/#define AZ_cg               0 /* preconditioned conjugate gradient method     */#define AZ_gmres            1 /* preconditioned gmres method                  */#define AZ_cgs              2 /* preconditioned cg squared method             */#define AZ_tfqmr            3 /* preconditioned transpose-free qmr method     */#define AZ_bicgstab         4 /* preconditioned stabilized bi-cg method       */#define AZ_slu              5 /* super LU direct method.                      */#define AZ_symmlq           6 /* indefinite symmetric like symmlq             */#define AZ_GMRESR           7 /* recursive GMRES (not supported)              */#define AZ_fixed_pt         8 /* fixed point iteration                        */#define AZ_analyze          9 /* fixed point iteration                        */#define AZ_lu              10 /* sparse LU direct method. Also used for a     */                              /* preconditioning option.  NOTE: this should   */                              /* be the last solver so that AZ_check_input()  */                              /* works properly.                              *//******************************************************************************* * *              constants for scaling types * ******************************************************************************//* #define AZ_none          0    no scaling                                   *//* #define AZ_Jacobi        1    Jacobi scaling                               */#define AZ_BJacobi          2 /* block Jacobi scaling                         */#define AZ_row_sum          3 /* point row-sum scaling                        */#define AZ_sym_diag         4 /* symmetric diagonal scaling                   */#define AZ_sym_row_sum      5 /* symmetric diagonal scaling                   */#define AZ_sym_BJacobi      6 /* symmetric block Jacobi scaling. NOTE: this   */                              /* should be last so that AZ_check_input()      */                              /* works properly.                              *//******************************************************************************* * *              constants for preconditioner types * ******************************************************************************/#define AZ_none             0 /* no preconditioning. Note: also used for      */                              /* scaling, output, overlap options options     */#define AZ_Jacobi           1 /* Jacobi preconditioning. Note: also used for  */                              /* scaling options                              */#define AZ_sym_GS           2 /* symmetric Gauss-Siedel preconditioning       */#define AZ_Neumann          3 /* Neumann series polynomial preconditioning    */#define AZ_ls               4 /* least-squares polynomial preconditioning     */#define AZ_ilu              6 /* domain decomp with  ilu in subdomains        */#define AZ_bilu             7 /* domain decomp with block ilu in subdomains   *//* #define AZ_lu           10    domain decomp with   lu in subdomains        */#define AZ_icc              8 /* domain decomp with incomp Choleski in domains*/#define AZ_ilut             9 /* domain decomp with ilut in subdomains        */#define AZ_rilu            11 /* domain decomp with rilu in subdomains        */#define AZ_recursive       12 /* Recursive call to AZ_iterate()               */#define AZ_smoother        13 /* Recursive call to AZ_iterate()               */#define AZ_dom_decomp      14 /* Domain decomposition using subdomain solver  */                              /* given by options[AZ_subdomain_solve]         */#define AZ_multilevel      15 /* Do multiplicative domain decomp with coarse  */                              /* grid (not supported).                        */#define AZ_user_precond    16 /*  user's preconditioning *//* Begin Aztec 2.1 mheroux mod */#define AZ_bilu_ifp        17 /* dom decomp with bilu using ifpack in subdom  *//* End Aztec 2.1 mheroux mod *//******************************************************************************* * *              constants for convergence types * ******************************************************************************//*                                                                            *//* DO NOT change these numbers as they are hard-wired in MPSalsa !!!!         *//*                                                                            */#define AZ_r0               0 /* ||r||_2 / ||r^{(0)}||_2                      */#define AZ_rhs              1 /* ||r||_2 / ||b||_2                            */#define AZ_Anorm            2 /* ||r||_2 / ||A||_infty                        */#define AZ_sol              3 /* ||r||_infty/(||A||_infty ||x||_1+||b||_infty)*/#define AZ_weighted         4 /* ||r||_WRMS                                   */#define AZ_expected_values  5 /* ||r||_WRMS with weights taken as |A||x0|     */#define AZ_noscaled         6 /* ||r||_2                                      */                              /* NOTE: AZ_noscaled should be last so that     */                              /* AZ_check_input() works properly.             *//******************************************************************************* * *              constants for output types * ******************************************************************************/#define AZ_all             -3 /* Print out everything including matrix        */                              /* Must be lowest value so that AZ_check_input()*/                              /* works properly.                              *//* #define AZ_none          0    Print out no results (not even warnings)     */#define AZ_last            -1 /* Print out final residual and warnings        */#define AZ_warnings        -2 /* Print out only warning messages              *//******************************************************************************* * *              constants for matrix output * ******************************************************************************/#define AZ_input_form       0 /* Print out the matrix arrays as they appear   */                              /* along with some additional information. The  */                              /* idea here is to print out the information    */                              /* that the user must supply as input to the    */                              /* function AZ_transform()                      */#define AZ_global_mat       1 /* Print out the matrix as a(i,j) where i and j */                              /* are the global indices. This option must     */                              /* be invoked only after AZ_transform() as the  */                              /* array update_index[] is used.                */                              /* NOTE: for VBR matrices the matrix is printed */                              /* as a(I(i),J(j)) where I is the global block  */                              /* row and J is the global block column and i   */                              /* and j are the row and column indices within  */                              /* the block.                                   */#define AZ_explicit         2 /* Print out the matrix as a(i,j) where i and j */                              /* are the local indices.                       */                              /* NOTE: for VBR matrices the matrix is printed */                              /* as a(I(i),J(j)) where I is the global block  */                              /* row and J is the global block column and i   */                              /* and j are the row and column indices within  */                              /* the block.                                   *//******************************************************************************* * *              constants for using factorization information * ******************************************************************************/#define AZ_calc             1 /* use no previous information                  */#define AZ_recalc           2 /* use last symbolic information                */#define AZ_reuse            3 /* use a previous factorization to precondition */#define AZ_sys_reuse        4 /* use last factorization to precondition       */                              /* NOTE: AZ_sys_reuse should be last so that    */                              /* AZ_check_input() works properly.             *//******************************************************************************* * *              constants for domain decompositon overlap * ******************************************************************************//* #define AZ_none          0    No overlap                                   */#define AZ_diag            -1 /* Use diagonal blocks for overlapping          */#define AZ_full             1 /* Use external rows   for overlapping          */                              /* Note: must be highest value so that          */                              /*       AZ_check_input() works properly.       *//******************************************************************************* * *              constants to determine if overlapped values are added *              (symmetric) or just taken from the closest processor. * ******************************************************************************/#define AZ_standard         0#define AZ_symmetric        1/******************************************************************************* * *              constants for GMRES orthogonalization procedure * ******************************************************************************/#define AZ_classic          0#define AZ_modified         1/******************************************************************************* * *              constants for determining rtilda (used in bicgstab, cgs, tfqmr) * ******************************************************************************/#define AZ_resid            0#define AZ_rand             1/******************************************************************************* * *              constants indicating reason for iterative method termination

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -