Actual source code: nn.h
1: #ifndef PETSC_NNIMPL_H
2: #define PETSC_NNIMPL_H
4: #include <petsc/private/pcisimpl.h>
6: /*
7: Private context (data structure) for the NN preconditioner.
8: */
9: typedef struct {
10: /* First MUST come the following line, for the stuff that is common to FETI and Neumann-Neumann. */
11: PC_IS pcis;
13: /* Then, everything else. */
14: Mat coarse_mat;
15: Vec coarse_x;
16: Vec coarse_b;
17: KSP ksp_coarse;
18: PetscScalar **DZ_IN; /* proc[k].DZ_IN[i][] = bit of vector to be received from processor i by proc. k */
19: PetscScalar factor_coarse_rhs;
20: } PC_NN;
22: PETSC_EXTERN PetscErrorCode PCNNCreateCoarseMatrix(PC);
23: PETSC_EXTERN PetscErrorCode PCNNApplySchurToChunk(PC pc, PetscInt n, PetscInt *idx, PetscScalar *chunk, PetscScalar *array_N, Vec vec1_B, Vec vec2_B, Vec vec1_D, Vec vec2_D);
24: PETSC_EXTERN PetscErrorCode PCNNApplyInterfacePreconditioner(PC pc, Vec r, Vec z, PetscScalar *work_N, Vec vec1_B, Vec vec2_B, Vec vec3_B, Vec vec1_D, Vec vec2_D, Vec vec1_N, Vec vec2_N);
25: PETSC_EXTERN PetscErrorCode PCNNBalancing(PC pc, Vec r, Vec u, Vec z, Vec vec1_B, Vec vec2_B, Vec vec3_B, Vec vec1_D, Vec vec2_D, PetscScalar *work_N);
27: #endif // PETSC_NNIMPL_H