Actual source code: bddcprivate.h
petsc-3.8.4 2018-03-24
1: /* prototypes of all BDDC private functions */
5: #include <../src/ksp/pc/impls/bddc/bddcstructs.h>
7: /* main functions */
8: PetscErrorCode PCBDDCAnalyzeInterface(PC);
9: PetscErrorCode PCBDDCConstraintsSetUp(PC);
11: /* reset functions */
12: PetscErrorCode PCBDDCResetTopography(PC);
13: PetscErrorCode PCBDDCResetSolvers(PC);
14: PetscErrorCode PCBDDCResetCustomization(PC);
16: /* graph */
17: PETSC_EXTERN PetscErrorCode PCBDDCGraphCreate(PCBDDCGraph*);
18: PETSC_EXTERN PetscErrorCode PCBDDCGraphDestroy(PCBDDCGraph*);
19: PETSC_EXTERN PetscErrorCode PCBDDCGraphInit(PCBDDCGraph,ISLocalToGlobalMapping,PetscInt,PetscInt);
20: PETSC_EXTERN PetscErrorCode PCBDDCGraphReset(PCBDDCGraph);
21: PETSC_EXTERN PetscErrorCode PCBDDCGraphResetCSR(PCBDDCGraph);
22: PETSC_EXTERN PetscErrorCode PCBDDCGraphSetUp(PCBDDCGraph,PetscInt,IS,IS,PetscInt,IS[],IS);
23: PETSC_EXTERN PetscErrorCode PCBDDCGraphComputeConnectedComponents(PCBDDCGraph);
24: PETSC_EXTERN PetscErrorCode PCBDDCGraphComputeConnectedComponentsLocal(PCBDDCGraph);
25: PETSC_EXTERN PetscErrorCode PCBDDCGraphASCIIView(PCBDDCGraph,PetscInt,PetscViewer);
26: PETSC_EXTERN PetscErrorCode PCBDDCGraphGetCandidatesIS(PCBDDCGraph,PetscInt*,IS*[],PetscInt*,IS*[],IS*);
27: PETSC_EXTERN PetscErrorCode PCBDDCGraphRestoreCandidatesIS(PCBDDCGraph,PetscInt*,IS*[],PetscInt*,IS*[],IS*);
28: PETSC_EXTERN PetscErrorCode PCBDDCGraphGetDirichletDofs(PCBDDCGraph,IS*);
29: PETSC_EXTERN PetscErrorCode PCBDDCGraphGetDirichletDofsB(PCBDDCGraph,IS*);
31: /* interface for scaling operator */
32: PetscErrorCode PCBDDCScalingSetUp(PC);
33: PetscErrorCode PCBDDCScalingDestroy(PC);
34: PetscErrorCode PCBDDCScalingRestriction(PC,Vec,Vec);
35: PetscErrorCode PCBDDCScalingExtension(PC,Vec,Vec);
37: /* nullspace correction */
38: PetscErrorCode PCBDDCNullSpaceAssembleCorrection(PC,PetscBool,PetscBool);
39: PetscErrorCode PCBDDCNullSpaceCheckCorrection(PC,PetscBool);
41: /* utils */
42: PetscErrorCode PCBDDCComputeLocalMatrix(PC,Mat);
43: PetscErrorCode PCBDDCSetUpLocalWorkVectors(PC);
44: PetscErrorCode PCBDDCSetUpSolvers(PC);
45: PetscErrorCode PCBDDCSetUpLocalScatters(PC);
46: PetscErrorCode PCBDDCSetUpLocalSolvers(PC,PetscBool,PetscBool);
47: PetscErrorCode PCBDDCSetUpCorrection(PC,PetscScalar**);
48: PetscErrorCode PCBDDCSetUpCoarseSolver(PC,PetscScalar*);
49: PetscErrorCode PCBDDCComputePrimalNumbering(PC,PetscInt*,PetscInt**);
50: PetscErrorCode PCBDDCScatterCoarseDataBegin(PC,InsertMode,ScatterMode);
51: PetscErrorCode PCBDDCScatterCoarseDataEnd(PC,InsertMode,ScatterMode);
52: PetscErrorCode PCBDDCApplyInterfacePreconditioner(PC,PetscBool);
53: PetscErrorCode PCBDDCOrthonormalizeVecs(PetscInt,Vec[]);
54: PetscErrorCode PCBDDCSetUseExactDirichlet(PC,PetscBool);
55: PetscErrorCode PCBDDCSetLevel(PC,PetscInt);
56: PetscErrorCode PCBDDCGlobalToLocal(VecScatter,Vec,Vec,IS,IS*);
57: PetscErrorCode PCBDDCAdaptiveSelection(PC);
58: PetscErrorCode PCBDDCConsistencyCheckIS(PC,MPI_Op,IS*);
59: PetscErrorCode PCBDDCComputeLocalTopologyInfo(PC);
60: PetscErrorCode MatCreateSubMatrixUnsorted(Mat,IS,IS,Mat*);
61: PetscErrorCode PCBDDCDetectDisconnectedComponents(PC,PetscInt*,IS*[],IS*);
62: PetscErrorCode MatSeqAIJCompress(Mat,Mat*);
63: PetscErrorCode PCBDDCReuseSolversBenignAdapt(PCBDDCReuseSolvers,Vec,Vec,PetscBool,PetscBool);
64: PetscErrorCode PCBDDCComputeNoNetFlux(Mat,Mat,PetscBool,IS,PCBDDCGraph,MatNullSpace*);
65: PetscErrorCode PCBDDCNullSpaceCreate(MPI_Comm,PetscBool,PetscInt,Vec[],MatNullSpace*);
66: PetscErrorCode PCBDDCNedelecSupport(PC);
68: /* benign subspace trick */
69: PetscErrorCode PCBDDCBenignPopOrPushB0(PC,PetscBool);
70: PetscErrorCode PCBDDCBenignGetOrSetP0(PC,Vec,PetscBool);
71: PetscErrorCode PCBDDCBenignDetectSaddlePoint(PC,IS*);
72: PetscErrorCode PCBDDCBenignCheck(PC,IS);
73: PetscErrorCode PCBDDCBenignShellMat(PC,PetscBool);
74: PetscErrorCode PCBDDCBenignRemoveInterior(PC,Vec,Vec);
76: /* feti-dp */
77: PetscErrorCode PCBDDCCreateFETIDPMatContext(PC,FETIDPMat_ctx*);
78: PetscErrorCode PCBDDCSetupFETIDPMatContext(FETIDPMat_ctx);
79: PetscErrorCode PCBDDCCreateFETIDPPCContext(PC,FETIDPPC_ctx*);
80: PetscErrorCode PCBDDCSetupFETIDPPCContext(Mat,FETIDPPC_ctx);
81: PetscErrorCode FETIDPPCApply(PC,Vec,Vec);
82: PetscErrorCode FETIDPPCApplyTranspose(PC,Vec,Vec);
83: PetscErrorCode FETIDPPCView(PC,PetscViewer);
84: PetscErrorCode PCBDDCDestroyFETIDPPC(PC);
85: PetscErrorCode FETIDPMatMult(Mat,Vec,Vec);
86: PetscErrorCode FETIDPMatMultTranspose(Mat,Vec,Vec);
88: PetscErrorCode PCBDDCDestroyFETIDPMat(Mat);
90: /* interface to SubSchurs */
91: PetscErrorCode PCBDDCInitSubSchurs(PC);
92: PetscErrorCode PCBDDCSetUpSubSchurs(PC);
94: /* sub schurs */
95: PetscErrorCode PCBDDCSubSchursCreate(PCBDDCSubSchurs*);
96: PetscErrorCode PCBDDCSubSchursInit(PCBDDCSubSchurs,IS,IS,PCBDDCGraph,ISLocalToGlobalMapping,PetscBool);
97: PetscErrorCode PCBDDCSubSchursReset(PCBDDCSubSchurs);
98: PetscErrorCode PCBDDCSubSchursDestroy(PCBDDCSubSchurs*);
99: PetscErrorCode PCBDDCSubSchursSetUp(PCBDDCSubSchurs,Mat,Mat,PetscBool,PetscInt[],PetscInt[],PetscInt,Vec,PetscBool,PetscBool,PetscBool,PetscInt,PetscInt[],IS[],Mat,IS);
101: #endif