xref: /petsc/src/ksp/pc/impls/is/nn/nn.h (revision b4319ba4cb3cfcf3d1795d5e654729cd063fe205)
14b9ad928SBarry Smith /*$Id: nn.h,v 1.3 2001/08/07 03:03:41 balay Exp $*/
24b9ad928SBarry Smith #if !defined(__pcnn_h)
34b9ad928SBarry Smith #define __pcnn_h
44b9ad928SBarry Smith 
5*b4319ba4SBarry Smith #include "src/ksp/pc/impls/is/pcis.h"
64b9ad928SBarry Smith 
74b9ad928SBarry Smith /*
84b9ad928SBarry Smith    Private context (data structure) for the NN preconditioner.
94b9ad928SBarry Smith */
104b9ad928SBarry Smith typedef struct {
114b9ad928SBarry Smith   /* First MUST come the folowing line, for the stuff that is common to FETI and Neumann-Neumann. */
124b9ad928SBarry Smith   PC_IS         pcis;
134b9ad928SBarry Smith   /* Then, everything else. */
144b9ad928SBarry Smith   Mat           coarse_mat;
154b9ad928SBarry Smith   Vec           coarse_x;
164b9ad928SBarry Smith   Vec           coarse_b;
174b9ad928SBarry Smith   KSP          ksp_coarse;
184b9ad928SBarry Smith   PetscScalar   **DZ_IN;          /* proc[k].DZ_IN[i][] = bit of vector to be received from processor i by proc. k  */
194b9ad928SBarry Smith   PetscScalar   factor_coarse_rhs;
204b9ad928SBarry Smith } PC_NN;
214b9ad928SBarry Smith 
224b9ad928SBarry Smith extern int PCNNCreateCoarseMatrix (PC);
234b9ad928SBarry 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);
244b9ad928SBarry Smith extern int PCNNApplyInterfacePreconditioner (PC pc, Vec r, Vec z, PetscScalar* work_N, Vec vec1_B, Vec vec2_B,
254b9ad928SBarry Smith                                              Vec vec3_B, Vec vec1_D, Vec vec2_D, Vec vec1_N, Vec vec2_N);
264b9ad928SBarry 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);
274b9ad928SBarry Smith 
284b9ad928SBarry Smith #endif /* __pcnn_h */
294b9ad928SBarry Smith 
304b9ad928SBarry Smith 
314b9ad928SBarry Smith 
324b9ad928SBarry Smith 
334b9ad928SBarry Smith 
344b9ad928SBarry Smith 
35