xref: /petsc/src/ksp/pc/impls/is/nn/nn.h (revision 702e6c57188f6ca39e32e26fd8fcae05ffbfed3e)
1 /*$Id: nn.h,v 1.3 2001/08/07 03:03:41 balay Exp $*/
2 #if !defined(__pcnn_h)
3 #define __pcnn_h
4 
5 #include "src/ksp/pc/impls/is/is.h"
6 
7 /*
8    Private context (data structure) for the NN preconditioner.
9 */
10 typedef struct {
11   /* First MUST come the folowing line, for the stuff that is common to FETI and Neumann-Neumann. */
12   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;
21 
22 extern int PCNNCreateCoarseMatrix (PC);
23 extern int PCNNApplySchurToChunk(PC pc, int n, int* idx, PetscScalar *chunk, PetscScalar* array_N, Vec vec1_B, Vec vec2_B, Vec vec1_D, Vec vec2_D);
24 extern int PCNNApplyInterfacePreconditioner (PC pc, Vec r, Vec z, PetscScalar* work_N, Vec vec1_B, Vec vec2_B,
25                                              Vec vec3_B, Vec vec1_D, Vec vec2_D, Vec vec1_N, Vec vec2_N);
26 extern int 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 
28 #endif /* __pcnn_h */
29 
30 
31 
32 
33 
34 
35