xref: /petsc/src/ksp/pc/impls/is/nn/nn.h (revision 4b9ad92859ccb93b5e851e53cb8c4c04ac10e155)
1*4b9ad928SBarry Smith /*$Id: nn.h,v 1.3 2001/08/07 03:03:41 balay Exp $*/
2*4b9ad928SBarry Smith #if !defined(__pcnn_h)
3*4b9ad928SBarry Smith #define __pcnn_h
4*4b9ad928SBarry Smith 
5*4b9ad928SBarry Smith #include "src/ksp/pc/impls/is/is.h"
6*4b9ad928SBarry Smith 
7*4b9ad928SBarry Smith /*
8*4b9ad928SBarry Smith    Private context (data structure) for the NN preconditioner.
9*4b9ad928SBarry Smith */
10*4b9ad928SBarry Smith typedef struct {
11*4b9ad928SBarry Smith   /* First MUST come the folowing line, for the stuff that is common to FETI and Neumann-Neumann. */
12*4b9ad928SBarry Smith   PC_IS         pcis;
13*4b9ad928SBarry Smith   /* Then, everything else. */
14*4b9ad928SBarry Smith   Mat           coarse_mat;
15*4b9ad928SBarry Smith   Vec           coarse_x;
16*4b9ad928SBarry Smith   Vec           coarse_b;
17*4b9ad928SBarry Smith   KSP          ksp_coarse;
18*4b9ad928SBarry Smith   PetscScalar   **DZ_IN;          /* proc[k].DZ_IN[i][] = bit of vector to be received from processor i by proc. k  */
19*4b9ad928SBarry Smith   PetscScalar   factor_coarse_rhs;
20*4b9ad928SBarry Smith } PC_NN;
21*4b9ad928SBarry Smith 
22*4b9ad928SBarry Smith extern int PCNNCreateCoarseMatrix (PC);
23*4b9ad928SBarry Smith 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*4b9ad928SBarry Smith extern int PCNNApplyInterfacePreconditioner (PC pc, Vec r, Vec z, PetscScalar* work_N, Vec vec1_B, Vec vec2_B,
25*4b9ad928SBarry Smith                                              Vec vec3_B, Vec vec1_D, Vec vec2_D, Vec vec1_N, Vec vec2_N);
26*4b9ad928SBarry Smith 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*4b9ad928SBarry Smith 
28*4b9ad928SBarry Smith #endif /* __pcnn_h */
29*4b9ad928SBarry Smith 
30*4b9ad928SBarry Smith 
31*4b9ad928SBarry Smith 
32*4b9ad928SBarry Smith 
33*4b9ad928SBarry Smith 
34*4b9ad928SBarry Smith 
35