Actual source code: bddc.h

petsc-dev 2014-02-02
Report Typos and Errors
4: #include <../src/ksp/pc/impls/is/pcis.h> 5: #include <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: /* Quantities defining constraining details (local) of the preconditioner */ 38: /* These quantities define the preconditioner itself */ 39: ISLocalToGlobalMapping BtoNmap; 40: PetscInt n_constraints; 41: PetscInt n_vertices; 42: PetscInt n_actual_vertices; 43: Mat ConstraintMatrix; 44: PetscBool new_primal_space; 45: PetscBool new_primal_space_local; 46: PetscInt *primal_indices_local_idxs; 47: PetscBool use_change_of_basis; 48: PetscBool use_change_on_faces; 49: Mat ChangeOfBasisMatrix; 50: Vec original_rhs; 51: Vec temp_solution; 52: Mat local_mat; 53: PetscBool use_exact_dirichlet_trick; 54: /* Some defaults on selecting vertices and constraints*/ 55: PetscBool use_vertices; 56: PetscBool use_faces; 57: PetscBool use_edges; 58: /* Some customization is possible */ 59: PetscBool recompute_topography; 60: PCBDDCGraph mat_graph; 61: MatNullSpace onearnullspace; 62: PetscObjectState *onearnullvecs_state; 63: MatNullSpace NullSpace; 64: IS user_primal_vertices; 65: PetscBool use_nnsp_true; 66: PetscBool user_provided_isfordofs; 67: PetscInt n_ISForDofs; 68: IS *ISForDofs; 69: IS NeumannBoundaries; 70: IS DirichletBoundaries; 71: PetscBool switch_static; 72: PetscInt coarsening_ratio; 73: PetscInt current_level; 74: PetscInt max_levels; 75: /* scaling */ 76: Vec work_scaling; 77: PetscBool use_deluxe_scaling; 78: PCBDDCDeluxeScaling deluxe_ctx; 79: /* For verbose output of some bddc data structures */ 80: PetscInt dbg_flag; 81: PetscViewer dbg_viewer; 82: } PC_BDDC; 85: #endif /* __pcbddc_h */