Actual source code: bddcprivate.h
petsc-3.11.4 2019-09-28
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: PetscErrorCode PCBDDCGraphCreate(PCBDDCGraph*);
18: PetscErrorCode PCBDDCGraphDestroy(PCBDDCGraph*);
19: PetscErrorCode PCBDDCGraphInit(PCBDDCGraph,ISLocalToGlobalMapping,PetscInt,PetscInt);
20: PetscErrorCode PCBDDCGraphReset(PCBDDCGraph);
21: PetscErrorCode PCBDDCGraphResetCSR(PCBDDCGraph);
22: PetscErrorCode PCBDDCGraphResetCoords(PCBDDCGraph);
23: PetscErrorCode PCBDDCGraphSetUp(PCBDDCGraph,PetscInt,IS,IS,PetscInt,IS[],IS);
24: PetscErrorCode PCBDDCGraphComputeConnectedComponents(PCBDDCGraph);
25: PetscErrorCode PCBDDCGraphComputeConnectedComponentsLocal(PCBDDCGraph);
26: PetscErrorCode PCBDDCGraphASCIIView(PCBDDCGraph,PetscInt,PetscViewer);
27: PetscErrorCode PCBDDCGraphGetCandidatesIS(PCBDDCGraph,PetscInt*,IS*[],PetscInt*,IS*[],IS*);
28: PetscErrorCode PCBDDCGraphRestoreCandidatesIS(PCBDDCGraph,PetscInt*,IS*[],PetscInt*,IS*[],IS*);
29: PetscErrorCode PCBDDCGraphGetDirichletDofs(PCBDDCGraph,IS*);
30: PetscErrorCode PCBDDCGraphGetDirichletDofsB(PCBDDCGraph,IS*);
32: /* interface for scaling operator */
33: PetscErrorCode PCBDDCScalingSetUp(PC);
34: PetscErrorCode PCBDDCScalingDestroy(PC);
35: PetscErrorCode PCBDDCScalingRestriction(PC,Vec,Vec);
36: PetscErrorCode PCBDDCScalingExtension(PC,Vec,Vec);
38: /* nullspace correction */
39: PetscErrorCode PCBDDCNullSpaceAssembleCorrection(PC,PetscBool,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,PetscBool,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);
67: PetscErrorCode PCBDDCAddPrimalVerticesLocalIS(PC,IS);
69: /* benign subspace trick */
70: PetscErrorCode PCBDDCBenignPopOrPushB0(PC,PetscBool);
71: PetscErrorCode PCBDDCBenignGetOrSetP0(PC,Vec,PetscBool);
72: PetscErrorCode PCBDDCBenignDetectSaddlePoint(PC,PetscBool,IS*);
73: PetscErrorCode PCBDDCBenignCheck(PC,IS);
74: PetscErrorCode PCBDDCBenignShellMat(PC,PetscBool);
75: PetscErrorCode PCBDDCBenignRemoveInterior(PC,Vec,Vec);
77: /* feti-dp */
78: PetscErrorCode PCBDDCCreateFETIDPMatContext(PC,FETIDPMat_ctx*);
79: PetscErrorCode PCBDDCSetupFETIDPMatContext(FETIDPMat_ctx);
80: PetscErrorCode PCBDDCCreateFETIDPPCContext(PC,FETIDPPC_ctx*);
81: PetscErrorCode PCBDDCSetupFETIDPPCContext(Mat,FETIDPPC_ctx);
82: PetscErrorCode FETIDPPCApply(PC,Vec,Vec);
83: PetscErrorCode FETIDPPCApplyTranspose(PC,Vec,Vec);
84: PetscErrorCode FETIDPPCView(PC,PetscViewer);
85: PetscErrorCode PCBDDCDestroyFETIDPPC(PC);
86: PetscErrorCode FETIDPMatMult(Mat,Vec,Vec);
87: PetscErrorCode FETIDPMatMultTranspose(Mat,Vec,Vec);
89: PetscErrorCode PCBDDCDestroyFETIDPMat(Mat);
91: /* interface to SubSchurs */
92: PetscErrorCode PCBDDCInitSubSchurs(PC);
93: PetscErrorCode PCBDDCSetUpSubSchurs(PC);
95: /* sub schurs */
96: PetscErrorCode PCBDDCSubSchursCreate(PCBDDCSubSchurs*);
97: PetscErrorCode PCBDDCSubSchursInit(PCBDDCSubSchurs,const char*,IS,IS,PCBDDCGraph,ISLocalToGlobalMapping,PetscBool);
98: PetscErrorCode PCBDDCSubSchursReset(PCBDDCSubSchurs);
99: PetscErrorCode PCBDDCSubSchursDestroy(PCBDDCSubSchurs*);
100: PetscErrorCode PCBDDCSubSchursSetUp(PCBDDCSubSchurs,Mat,Mat,PetscBool,PetscInt[],PetscInt[],PetscInt,Vec,PetscBool,PetscBool,PetscBool,PetscInt,PetscInt[],IS[],Mat,IS);
102: #endif