11c2a3de1SBarry Smith 24b9ad928SBarry Smith #if !defined(__pcnn_h) 34b9ad928SBarry Smith #define __pcnn_h 44b9ad928SBarry Smith 57c4f633dSBarry 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 22*09573ac7SBarry Smith extern PetscErrorCode PCNNCreateCoarseMatrix (PC); 23*09573ac7SBarry 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); 24*09573ac7SBarry Smith extern PetscErrorCode 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); 26*09573ac7SBarry 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