11c2a3de1SBarry Smith 24b9ad928SBarry Smith #if !defined(__pcnn_h) 34b9ad928SBarry Smith #define __pcnn_h 44b9ad928SBarry Smith 5c6db04a5SJed Brown #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; 13*2fa5cd67SKarl Rupp 144b9ad928SBarry Smith /* Then, everything else. */ 154b9ad928SBarry Smith Mat coarse_mat; 164b9ad928SBarry Smith Vec coarse_x; 174b9ad928SBarry Smith Vec coarse_b; 184b9ad928SBarry Smith KSP ksp_coarse; 194b9ad928SBarry Smith PetscScalar **DZ_IN; /* proc[k].DZ_IN[i][] = bit of vector to be received from processor i by proc. k */ 204b9ad928SBarry Smith PetscScalar factor_coarse_rhs; 214b9ad928SBarry Smith } PC_NN; 224b9ad928SBarry Smith 2309573ac7SBarry Smith extern PetscErrorCode PCNNCreateCoarseMatrix (PC); 2409573ac7SBarry Smith 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); 25*2fa5cd67SKarl Rupp 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); 2609573ac7SBarry Smith 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); 274b9ad928SBarry Smith 284b9ad928SBarry Smith #endif /* __pcnn_h */ 294b9ad928SBarry Smith 304b9ad928SBarry Smith 314b9ad928SBarry Smith 324b9ad928SBarry Smith 334b9ad928SBarry Smith 344b9ad928SBarry Smith 35