Actual source code: bddcprivate.h

petsc-3.10.4 2019-02-26
Report Typos and Errors
  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);
 40: PetscErrorCode PCBDDCNullSpaceCheckCorrection(PC,PetscBool);

 42: /* utils */
 43: PetscErrorCode PCBDDCComputeLocalMatrix(PC,Mat);
 44: PetscErrorCode PCBDDCSetUpLocalWorkVectors(PC);
 45: PetscErrorCode PCBDDCSetUpSolvers(PC);
 46: PetscErrorCode PCBDDCSetUpLocalScatters(PC);
 47: PetscErrorCode PCBDDCSetUpLocalSolvers(PC,PetscBool,PetscBool);
 48: PetscErrorCode PCBDDCSetUpCorrection(PC,PetscScalar**);
 49: PetscErrorCode PCBDDCSetUpCoarseSolver(PC,PetscScalar*);
 50: PetscErrorCode PCBDDCComputePrimalNumbering(PC,PetscInt*,PetscInt**);
 51: PetscErrorCode PCBDDCScatterCoarseDataBegin(PC,InsertMode,ScatterMode);
 52: PetscErrorCode PCBDDCScatterCoarseDataEnd(PC,InsertMode,ScatterMode);
 53: PetscErrorCode PCBDDCApplyInterfacePreconditioner(PC,PetscBool);
 54: PetscErrorCode PCBDDCOrthonormalizeVecs(PetscInt,Vec[]);
 55: PetscErrorCode PCBDDCSetUseExactDirichlet(PC,PetscBool);
 56: PetscErrorCode PCBDDCSetLevel(PC,PetscInt);
 57: PetscErrorCode PCBDDCGlobalToLocal(VecScatter,Vec,Vec,IS,IS*);
 58: PetscErrorCode PCBDDCAdaptiveSelection(PC);
 59: PetscErrorCode PCBDDCConsistencyCheckIS(PC,MPI_Op,IS*);
 60: PetscErrorCode PCBDDCComputeLocalTopologyInfo(PC);
 61: PetscErrorCode MatCreateSubMatrixUnsorted(Mat,IS,IS,Mat*);
 62: PetscErrorCode PCBDDCDetectDisconnectedComponents(PC,PetscBool,PetscInt*,IS*[],IS*);
 63: PetscErrorCode MatSeqAIJCompress(Mat,Mat*);
 64: PetscErrorCode PCBDDCReuseSolversBenignAdapt(PCBDDCReuseSolvers,Vec,Vec,PetscBool,PetscBool);
 65: PetscErrorCode PCBDDCComputeNoNetFlux(Mat,Mat,PetscBool,IS,PCBDDCGraph,MatNullSpace*);
 66: PetscErrorCode PCBDDCNullSpaceCreate(MPI_Comm,PetscBool,PetscInt,Vec[],MatNullSpace*);
 67: PetscErrorCode PCBDDCNedelecSupport(PC);
 68: PetscErrorCode PCBDDCAddPrimalVerticesLocalIS(PC,IS);

 70: /* benign subspace trick */
 71: PetscErrorCode PCBDDCBenignPopOrPushB0(PC,PetscBool);
 72: PetscErrorCode PCBDDCBenignGetOrSetP0(PC,Vec,PetscBool);
 73: PetscErrorCode PCBDDCBenignDetectSaddlePoint(PC,IS*);
 74: PetscErrorCode PCBDDCBenignCheck(PC,IS);
 75: PetscErrorCode PCBDDCBenignShellMat(PC,PetscBool);
 76: PetscErrorCode PCBDDCBenignRemoveInterior(PC,Vec,Vec);

 78: /* feti-dp */
 79: PetscErrorCode PCBDDCCreateFETIDPMatContext(PC,FETIDPMat_ctx*);
 80: PetscErrorCode PCBDDCSetupFETIDPMatContext(FETIDPMat_ctx);
 81: PetscErrorCode PCBDDCCreateFETIDPPCContext(PC,FETIDPPC_ctx*);
 82: PetscErrorCode PCBDDCSetupFETIDPPCContext(Mat,FETIDPPC_ctx);
 83: PetscErrorCode FETIDPPCApply(PC,Vec,Vec);
 84: PetscErrorCode FETIDPPCApplyTranspose(PC,Vec,Vec);
 85: PetscErrorCode FETIDPPCView(PC,PetscViewer);
 86: PetscErrorCode PCBDDCDestroyFETIDPPC(PC);
 87: PetscErrorCode FETIDPMatMult(Mat,Vec,Vec);
 88: PetscErrorCode FETIDPMatMultTranspose(Mat,Vec,Vec);

 90: PetscErrorCode PCBDDCDestroyFETIDPMat(Mat);

 92: /* interface to SubSchurs */
 93: PetscErrorCode PCBDDCInitSubSchurs(PC);
 94: PetscErrorCode PCBDDCSetUpSubSchurs(PC);

 96: /* sub schurs */
 97: PetscErrorCode PCBDDCSubSchursCreate(PCBDDCSubSchurs*);
 98: PetscErrorCode PCBDDCSubSchursInit(PCBDDCSubSchurs,const char*,IS,IS,PCBDDCGraph,ISLocalToGlobalMapping,PetscBool);
 99: PetscErrorCode PCBDDCSubSchursReset(PCBDDCSubSchurs);
100: PetscErrorCode PCBDDCSubSchursDestroy(PCBDDCSubSchurs*);
101: PetscErrorCode PCBDDCSubSchursSetUp(PCBDDCSubSchurs,Mat,Mat,PetscBool,PetscInt[],PetscInt[],PetscInt,Vec,PetscBool,PetscBool,PetscBool,PetscInt,PetscInt[],IS[],Mat,IS);

103: #endif