1 /****************************************************************************** 2 * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other 3 * HYPRE Project Developers. See the top-level COPYRIGHT file for details. 4 * 5 * SPDX-License-Identifier: (Apache-2.0 OR MIT) 6 ******************************************************************************/ 7 8 /****************************************************************************** 9 * 10 * Header info for the Maxwell solver 11 * 12 *****************************************************************************/ 13 14 #ifndef hypre_MAXWELL_HEADER 15 #define hypre_MAXWELL_HEADER 16 17 /*-------------------------------------------------------------------------- 18 * hypre_MaxwellData: 19 *--------------------------------------------------------------------------*/ 20 21 typedef struct 22 { 23 MPI_Comm comm; 24 25 HYPRE_Real tol; 26 HYPRE_Int max_iter; 27 HYPRE_Int rel_change; 28 HYPRE_Int zero_guess; 29 HYPRE_Int ndim; 30 31 HYPRE_Int num_pre_relax; /* number of pre relaxation sweeps */ 32 HYPRE_Int num_post_relax; /* number of post relaxation sweeps */ 33 34 HYPRE_Int constant_coef; 35 36 hypre_Index *rfactor; 37 38 hypre_SStructGrid **egrid_l; 39 40 HYPRE_IJMatrix Aen; 41 hypre_ParCSRMatrix **Aen_l; 42 43 /* these will be extracted from the amg_data structure. Note that there is no grid 44 underlying these matrices and vectors if they are generated by the amg_setup. 45 So, will be stored as Parcsr_matrices and Par_vectors. */ 46 hypre_SStructMatrix *Ann; 47 hypre_SStructVector *bn; 48 hypre_SStructVector *xn; 49 50 void *amg_vdata; 51 hypre_ParCSRMatrix **Ann_l; 52 hypre_SStructStencil **Ann_stencils; 53 hypre_ParCSRMatrix **Pn_l; 54 hypre_ParCSRMatrix **RnT_l; 55 hypre_ParVector **bn_l; 56 hypre_ParVector **xn_l; 57 hypre_ParVector **resn_l; 58 hypre_ParVector **en_l; 59 hypre_ParVector **nVtemp_l; 60 hypre_ParVector **nVtemp2_l; 61 HYPRE_Int **nCF_marker_l; 62 HYPRE_Real *nrelax_weight; 63 HYPRE_Real *nomega; 64 HYPRE_Int nrelax_type; 65 HYPRE_Int node_numlevels; 66 67 hypre_ParCSRMatrix *Tgrad; 68 hypre_ParCSRMatrix *T_transpose; 69 70 /* edge data structure. These will have grids. */ 71 HYPRE_Int edge_maxlevels; 72 HYPRE_Int edge_numlevels; 73 hypre_ParCSRMatrix **Aee_l; 74 hypre_ParVector **be_l; 75 hypre_ParVector **xe_l; 76 hypre_ParVector **rese_l; 77 hypre_ParVector **ee_l; 78 hypre_ParVector **eVtemp_l; 79 hypre_ParVector **eVtemp2_l; 80 HYPRE_Int **eCF_marker_l; 81 HYPRE_Real *erelax_weight; 82 HYPRE_Real *eomega; 83 HYPRE_Int erelax_type; 84 85 /* edge data structure. These will have no grid. */ 86 hypre_IJMatrix **Pe_l; 87 hypre_IJMatrix **ReT_l; 88 HYPRE_Int **BdryRanks_l; 89 HYPRE_Int *BdryRanksCnts_l; 90 91 /* edge-node data structure. These will have grids. */ 92 HYPRE_Int en_numlevels; 93 94 /* log info (always logged) */ 95 HYPRE_Int num_iterations; 96 HYPRE_Int time_index; 97 98 /* additional log info (logged when `logging' > 0) */ 99 HYPRE_Int print_level; 100 HYPRE_Int logging; 101 HYPRE_Real *norms; 102 HYPRE_Real *rel_norms; 103 104 } hypre_MaxwellData; 105 106 #endif 107