Actual source code: bddc.h

petsc-3.5.4 2015-05-23
Report Typos and Errors
4: #include <../src/ksp/pc/impls/is/pcis.h> 5: #include <../src/ksp/pc/impls/bddc/bddcstructs.h> 7: //typedef enum {SCATTERS_BDDC,GATHERS_BDDC} CoarseCommunicationsType; 9: /* Private context (data structure) for the BDDC preconditioner. */ 10: typedef struct { 11: /* First MUST come the folowing line, for the stuff that is common to FETI and Neumann-Neumann. */ 12: PC_IS pcis; 13: /* Coarse stuffs needed by BDDC application in KSP */ 14: Vec coarse_vec; 15: Vec coarse_rhs; 16: KSP coarse_ksp; 17: Mat coarse_phi_B; 18: Mat coarse_phi_D; 19: Mat coarse_psi_B; 20: Mat coarse_psi_D; 21: PetscInt local_primal_size; 22: PetscInt coarse_size; 23: PetscInt* global_primal_indices; 24: VecScatter coarse_loc_to_glob; 25: /* Local stuffs needed by BDDC application in KSP */ 26: Vec vec1_P; 27: Vec vec1_C; 28: Mat local_auxmat1; 29: Mat local_auxmat2; 30: Vec vec1_R; 31: Vec vec2_R; 32: IS is_R_local; 33: VecScatter R_to_B; 34: VecScatter R_to_D; 35: KSP ksp_R; 36: KSP ksp_D; 37: PetscBool issym; 38: /* Quantities defining constraining details (local) of the preconditioner */ 39: /* These quantities define the preconditioner itself */ 40: ISLocalToGlobalMapping BtoNmap; 41: PetscInt n_constraints; 42: PetscInt n_vertices; 43: PetscInt n_actual_vertices; 44: Mat ConstraintMatrix; 45: PetscBool new_primal_space; 46: PetscBool new_primal_space_local; 47: PetscInt *primal_indices_local_idxs; 48: PetscBool use_change_of_basis; 49: PetscBool use_change_on_faces; 50: Mat ChangeOfBasisMatrix; 51: Mat user_ChangeOfBasisMatrix; 52: Vec original_rhs; 53: Vec temp_solution; 54: Mat local_mat; 55: PetscBool use_exact_dirichlet_trick; 56: /* Some defaults on selecting vertices and constraints*/ 57: PetscBool use_local_adj; 58: PetscBool use_vertices; 59: PetscBool use_faces; 60: PetscBool use_edges; 61: /* Some customization is possible */ 62: PetscBool recompute_topography; 63: PCBDDCGraph mat_graph; 64: MatNullSpace onearnullspace; 65: PetscObjectState *onearnullvecs_state; 66: MatNullSpace NullSpace; 67: IS user_primal_vertices; 68: PetscBool use_nnsp_true; 69: PetscBool user_provided_isfordofs; 70: PetscInt n_ISForDofs; 71: PetscInt n_ISForDofsLocal; 72: IS *ISForDofs; 73: IS *ISForDofsLocal; 74: IS NeumannBoundaries; 75: IS NeumannBoundariesLocal; 76: IS DirichletBoundaries; 77: IS DirichletBoundariesLocal; 78: PetscBool switch_static; 79: PetscInt coarsening_ratio; 80: PetscInt current_level; 81: PetscInt max_levels; 82: IS coarse_subassembling; 83: IS coarse_subassembling_init; 84: PetscBool use_coarse_estimates; 85: /* scaling */ 86: Vec work_scaling; 87: PetscBool use_deluxe_scaling; 88: PCBDDCDeluxeScaling deluxe_ctx; 89: /* For verbose output of some bddc data structures */ 90: PetscInt dbg_flag; 91: PetscViewer dbg_viewer; 92: } PC_BDDC; 95: #endif /* __pcbddc_h */