Actual source code: bddcstructs.h

petsc-3.5.4 2015-05-23
Report Typos and Errors
4: #include <petscksp.h> 5: #include <petscbt.h> 7: /* special marks for interface graph: they cannot be enums, since special marks should in principle range from -4 to -max_int */ 8: #define PCBDDCGRAPH_NEUMANN_MARK -1 9: #define PCBDDCGRAPH_DIRICHLET_MARK -2 10: #define PCBDDCGRAPH_LOCAL_PERIODIC_MARK -3 11: #define PCBDDCGRAPH_SPECIAL_MARK -4 13: /* Structure for local graph partitioning */ 14: struct _PCBDDCGraph { 15: ISLocalToGlobalMapping l2gmap; 16: PetscInt nvtxs; 17: PetscBT touched; 18: PetscInt *count; 19: PetscInt **neighbours_set; 20: PetscInt *subset; 21: PetscInt *which_dof; 22: PetscInt *cptr; 23: PetscInt *queue; 24: PetscInt *special_dof; 25: PetscInt *subset_ncc; 26: PetscInt *subset_ref_node; 27: PetscInt *mirrors; 28: PetscInt **mirrors_set; 29: PetscInt ncc; 30: PetscInt n_subsets; 31: PetscInt custom_minimal_size; 32: PetscInt nvtxs_csr; 33: PetscInt *xadj; 34: PetscInt *adjncy; 35: }; 36: typedef struct _PCBDDCGraph *PCBDDCGraph; 38: /* Structure for deluxe scaling */ 39: struct _PCBDDCDeluxeScaling { 40: /* vertex scaling */ 41: PetscInt n_simple; 42: PetscInt* idx_simple_B; 43: /* sequential problems */ 44: VecScatter seq_scctx; 45: Vec seq_work1; 46: Vec seq_work2; 47: Mat seq_mat; 48: KSP seq_ksp; 49: /* parallel problems */ 50: PetscInt par_colors; 51: VecScatter* par_scctx_s; 52: VecScatter* par_scctx_p; 53: Vec* par_vec; 54: KSP* par_ksp; 55: PetscSubcomm* par_subcomm; 56: /* work vectors for local Schur complement */ 57: Vec work1_D; 58: Vec work2_D; 59: Vec work1_B; 60: Vec work2_B; 61: }; 62: typedef struct _PCBDDCDeluxeScaling *PCBDDCDeluxeScaling; 64: /* inexact solvers with nullspace correction */ 65: struct _NullSpaceCorrection_ctx { 66: Mat basis_mat; 67: Mat Kbasis_mat; 68: Mat Lbasis_mat; 69: PC local_pc; 70: Vec work_small_1; 71: Vec work_small_2; 72: Vec work_full_1; 73: Vec work_full_2; 74: }; 75: typedef struct _NullSpaceCorrection_ctx *NullSpaceCorrection_ctx; 77: /* feti-dp mat */ 78: struct _FETIDPMat_ctx { 79: PetscInt n_lambda; 80: Vec lambda_local; 81: Vec temp_solution_B; 82: Vec temp_solution_D; 83: Mat B_delta; 84: Mat B_Ddelta; 85: VecScatter l2g_lambda; 86: PC pc; 87: }; 88: typedef struct _FETIDPMat_ctx *FETIDPMat_ctx; 90: /* feti-dp dirichlet preconditioner */ 91: struct _FETIDPPC_ctx { 92: Vec lambda_local; 93: Mat B_Ddelta; 94: VecScatter l2g_lambda; 95: PC pc; 96: }; 97: typedef struct _FETIDPPC_ctx *FETIDPPC_ctx; 99: #endif