Date: 2026-05-01T06:11:43+00:00

Actual source code: pcbddcprivateimpl.h

      1: /* prototypes of all BDDC private functions */
      2: #pragma once

      4: #include <petsc/private/pcbddcstructsimpl.h>

      6: /* main functions */
      7: PETSC_INTERN PetscErrorCode PCBDDCAnalyzeInterface(PC);
      8: PETSC_INTERN PetscErrorCode PCBDDCConstraintsSetUp(PC);

     10: /* load or dump customization */
     11: PETSC_EXTERN PetscErrorCode PCBDDCLoadOrViewCustomization(PC, PetscBool, const char *);

     13: /* reset functions */
     14: PETSC_EXTERN PetscErrorCode PCBDDCResetTopography(PC);
     15: PETSC_EXTERN PetscErrorCode PCBDDCResetSolvers(PC);
     16: PETSC_EXTERN PetscErrorCode PCBDDCResetCustomization(PC);

     18: /* graph */
     19: PETSC_EXTERN PetscErrorCode    PCBDDCGraphCreate(PCBDDCGraph *);
     20: PETSC_EXTERN PetscErrorCode    PCBDDCGraphDestroy(PCBDDCGraph *);
     21: PETSC_EXTERN PetscErrorCode    PCBDDCGraphInit(PCBDDCGraph, ISLocalToGlobalMapping, PetscInt, PetscInt);
     22: PETSC_EXTERN PetscErrorCode    PCBDDCGraphReset(PCBDDCGraph);
     23: PETSC_EXTERN PetscErrorCode    PCBDDCGraphResetCSR(PCBDDCGraph);
     24: PETSC_EXTERN PetscErrorCode    PCBDDCGraphResetCoords(PCBDDCGraph);
     25: PETSC_EXTERN PetscErrorCode    PCBDDCGraphSetUp(PCBDDCGraph, PetscInt, IS, IS, PetscInt, IS[], IS);
     26: PETSC_EXTERN PetscErrorCode    PCBDDCGraphComputeConnectedComponents(PCBDDCGraph);
     27: PETSC_EXTERN PetscErrorCode    PCBDDCGraphComputeConnectedComponentsLocal(PCBDDCGraph);
     28: PETSC_EXTERN PetscErrorCode    PCBDDCGraphASCIIView(PCBDDCGraph, PetscInt, PetscViewer);
     29: PETSC_EXTERN PetscErrorCode    PCBDDCGraphGetCandidatesIS(PCBDDCGraph, PetscInt *, IS *[], PetscInt *, IS *[], IS *);
     30: PETSC_EXTERN PetscErrorCode    PCBDDCGraphRestoreCandidatesIS(PCBDDCGraph, PetscInt *, IS *[], PetscInt *, IS *[], IS *);
     31: PETSC_EXTERN PetscErrorCode    PCBDDCGraphGetDirichletDofs(PCBDDCGraph, IS *);
     32: PETSC_EXTERN PetscErrorCode    PCBDDCGraphGetDirichletDofsB(PCBDDCGraph, IS *);
     33: PETSC_EXTERN PetscCtxDestroyFn PCBDDCDestroyGraphCandidatesIS;

     35: /* interface for scaling operator */
     36: PETSC_INTERN PetscErrorCode PCBDDCScalingSetUp(PC);
     37: PETSC_INTERN PetscErrorCode PCBDDCScalingDestroy(PC);
     38: PETSC_INTERN PetscErrorCode PCBDDCScalingRestriction(PC, Vec, Vec);
     39: PETSC_INTERN PetscErrorCode PCBDDCScalingExtension(PC, Vec, Vec);

     41: /* nullspace correction */
     42: PETSC_INTERN PetscErrorCode PCBDDCNullSpaceAssembleCorrection(PC, PetscBool, PetscBool);

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

     74: /* benign subspace trick */
     75: PETSC_INTERN PetscErrorCode PCBDDCBenignPopOrPushB0(PC, PetscBool);
     76: PETSC_INTERN PetscErrorCode PCBDDCBenignGetOrSetP0(PC, Vec, PetscBool);
     77: PETSC_INTERN PetscErrorCode PCBDDCBenignDetectSaddlePoint(PC, PetscBool, IS *);
     78: PETSC_INTERN PetscErrorCode PCBDDCBenignCheck(PC, IS);
     79: PETSC_INTERN PetscErrorCode PCBDDCBenignShellMat(PC, PetscBool);
     80: PETSC_INTERN PetscErrorCode PCBDDCBenignRemoveInterior(PC, Vec, Vec);

     82: /* feti-dp */
     83: PETSC_INTERN PetscErrorCode PCBDDCCreateFETIDPMatContext(PC, FETIDPMat_ctx *);
     84: PETSC_INTERN PetscErrorCode PCBDDCSetupFETIDPMatContext(FETIDPMat_ctx);
     85: PETSC_INTERN PetscErrorCode PCBDDCCreateFETIDPPCContext(PC, FETIDPPC_ctx *);
     86: PETSC_INTERN PetscErrorCode PCBDDCSetupFETIDPPCContext(Mat, FETIDPPC_ctx);
     87: PETSC_INTERN PetscErrorCode FETIDPPCApply(PC, Vec, Vec);
     88: PETSC_INTERN PetscErrorCode FETIDPPCApplyTranspose(PC, Vec, Vec);
     89: PETSC_INTERN PetscErrorCode FETIDPPCView(PC, PetscViewer);
     90: PETSC_INTERN PetscErrorCode PCBDDCDestroyFETIDPPC(PC);
     91: PETSC_INTERN PetscErrorCode FETIDPMatMult(Mat, Vec, Vec);
     92: PETSC_INTERN PetscErrorCode FETIDPMatMultTranspose(Mat, Vec, Vec);

     94: PETSC_INTERN PetscErrorCode PCBDDCDestroyFETIDPMat(Mat);

     96: /* interface to SubSchurs */
     97: PETSC_INTERN PetscErrorCode PCBDDCInitSubSchurs(PC);
     98: PETSC_INTERN PetscErrorCode PCBDDCSetUpSubSchurs(PC);

    100: /* sub schurs API */
    101: PETSC_INTERN PetscErrorCode PCBDDCSubSchursCreate(PCBDDCSubSchurs *);
    102: PETSC_INTERN PetscErrorCode PCBDDCSubSchursInit(PCBDDCSubSchurs, const char *, IS, IS, PCBDDCGraph, ISLocalToGlobalMapping, PetscBool, PetscBool);
    103: PETSC_INTERN PetscErrorCode PCBDDCSubSchursReset(PCBDDCSubSchurs);
    104: PETSC_INTERN PetscErrorCode PCBDDCSubSchursDestroy(PCBDDCSubSchurs *);
    105: PETSC_INTERN PetscErrorCode PCBDDCSubSchursSetUp(PCBDDCSubSchurs, Mat, Mat, PetscBool, PetscInt[], PetscInt[], PetscInt, Vec, PetscBool, PetscBool, PetscBool, PetscInt, PetscInt[], IS[], Mat, IS);