1 /* 2 * 3 * This file is part of MUMPS 5.1.2, released 4 * on Mon Oct 2 07:37:01 UTC 2017 5 * 6 * 7 * Copyright 1991-2017 CERFACS, CNRS, ENS Lyon, INP Toulouse, Inria, 8 * University of Bordeaux. 9 * 10 * This version of MUMPS is provided to you free of charge. It is 11 * released under the CeCILL-C license: 12 * http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html 13 * 14 */ 15 16 /* Mostly written in march 2002 (JYL) */ 17 18 #ifndef CMUMPS_C_H 19 #define CMUMPS_C_H 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 #include "mumps_compat.h" 26 /* Next line defines MUMPS_INT, CMUMPS_COMPLEX and CMUMPS_REAL */ 27 #include "mumps_c_types.h" 28 29 #ifndef MUMPS_VERSION 30 /* Protected in case headers of other arithmetics are included */ 31 #define MUMPS_VERSION "5.1.2" 32 #endif 33 #ifndef MUMPS_VERSION_MAX_LEN 34 #define MUMPS_VERSION_MAX_LEN 30 35 #endif 36 37 /* 38 * Definition of the (simplified) MUMPS C structure. 39 * NB: CMUMPS_COMPLEX are REAL types in s and d arithmetics. 40 */ 41 typedef struct { 42 43 MUMPS_INT sym, par, job; 44 MUMPS_INT comm_fortran; /* Fortran communicator */ 45 MUMPS_INT icntl[40]; 46 MUMPS_INT keep[500]; 47 CMUMPS_REAL cntl[15]; 48 CMUMPS_REAL dkeep[230]; 49 MUMPS_INT8 keep8[150]; 50 MUMPS_INT n; 51 52 MUMPS_INT nz_alloc; /* used in matlab interface to decide if we 53 free + malloc when we have large variation */ 54 55 /* Assembled entry */ 56 MUMPS_INT nz; 57 MUMPS_INT8 nnz; 58 MUMPS_INT *irn; 59 MUMPS_INT *jcn; 60 CMUMPS_COMPLEX *a; 61 62 /* Distributed entry */ 63 MUMPS_INT nz_loc; 64 MUMPS_INT8 nnz_loc; 65 MUMPS_INT *irn_loc; 66 MUMPS_INT *jcn_loc; 67 CMUMPS_COMPLEX *a_loc; 68 69 /* Element entry */ 70 MUMPS_INT nelt; 71 MUMPS_INT *eltptr; 72 MUMPS_INT *eltvar; 73 CMUMPS_COMPLEX *a_elt; 74 75 /* Ordering, if given by user */ 76 MUMPS_INT *perm_in; 77 78 /* Orderings returned to user */ 79 MUMPS_INT *sym_perm; /* symmetric permutation */ 80 MUMPS_INT *uns_perm; /* column permutation */ 81 82 /* Scaling (inout but complicated) */ 83 CMUMPS_REAL *colsca; 84 CMUMPS_REAL *rowsca; 85 MUMPS_INT colsca_from_mumps; 86 MUMPS_INT rowsca_from_mumps; 87 88 /* RHS, solution, ouptput data and statistics */ 89 CMUMPS_COMPLEX *rhs, *redrhs, *rhs_sparse, *sol_loc; 90 MUMPS_INT *irhs_sparse, *irhs_ptr, *isol_loc; 91 MUMPS_INT nrhs, lrhs, lredrhs, nz_rhs, lsol_loc; 92 MUMPS_INT schur_mloc, schur_nloc, schur_lld; 93 MUMPS_INT mblock, nblock, nprow, npcol; 94 MUMPS_INT info[40],infog[40]; 95 CMUMPS_REAL rinfo[40], rinfog[40]; 96 97 /* Null space */ 98 MUMPS_INT deficiency; 99 MUMPS_INT *pivnul_list; 100 MUMPS_INT *mapping; 101 102 /* Schur */ 103 MUMPS_INT size_schur; 104 MUMPS_INT *listvar_schur; 105 CMUMPS_COMPLEX *schur; 106 107 /* Internal parameters */ 108 MUMPS_INT instance_number; 109 CMUMPS_COMPLEX *wk_user; 110 111 /* Version number: length=14 in FORTRAN + 1 for final \0 + 1 for alignment */ 112 char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1]; 113 /* For out-of-core */ 114 char ooc_tmpdir[256]; 115 char ooc_prefix[64]; 116 /* To save the matrix in matrix market format */ 117 char write_problem[256]; 118 MUMPS_INT lwk_user; 119 /* For save/restore feature */ 120 char save_dir[256]; 121 char save_prefix[256]; 122 } CMUMPS_STRUC_C; 123 124 125 void MUMPS_CALL 126 cmumps_c( CMUMPS_STRUC_C * cmumps_par ); 127 128 #ifdef __cplusplus 129 } 130 #endif 131 132 #endif /* CMUMPS_C_H */ 133 134