Lines Matching refs:jac

25   PC_Composite    *jac  = (PC_Composite *)pc->data;  in PCApply_Composite_Multiplicative()  local
26 PC_CompositeLink next = jac->head; in PCApply_Composite_Multiplicative()
37 next = jac->head; in PCApply_Composite_Multiplicative()
39 if (next->next && !jac->work2) { /* allocate second work vector */ in PCApply_Composite_Multiplicative()
40 PetscCall(VecDuplicate(jac->work1, &jac->work2)); in PCApply_Composite_Multiplicative()
46 PetscCall(MatMult(mat, y, jac->work1)); /* work1 <- A y */ in PCApply_Composite_Multiplicative()
47 PetscCall(VecWAXPY(jac->work2, -1.0, jac->work1, x)); /* work2 <- x - work1 */ in PCApply_Composite_Multiplicative()
48 PetscCall(PCApply(next->pc, jac->work2, jac->work1)); /* work1 <- C work2 */ in PCApply_Composite_Multiplicative()
49 …PetscCall(VecAXPY(y, 1.0, jac->work1)); /* y <- y + work1 = B x + C (x - A B x) = (B… in PCApply_Composite_Multiplicative()
51 if (jac->type == PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE) { in PCApply_Composite_Multiplicative()
54 PetscCall(MatMult(mat, y, jac->work1)); in PCApply_Composite_Multiplicative()
55 PetscCall(VecWAXPY(jac->work2, -1.0, jac->work1, x)); in PCApply_Composite_Multiplicative()
56 PetscCall(PCApply(next->pc, jac->work2, jac->work1)); in PCApply_Composite_Multiplicative()
57 PetscCall(VecAXPY(y, 1.0, jac->work1)); in PCApply_Composite_Multiplicative()
65 PC_Composite *jac = (PC_Composite *)pc->data; in PCApplyTranspose_Composite_Multiplicative() local
66 PC_CompositeLink next = jac->head; in PCApplyTranspose_Composite_Multiplicative()
71 if (next->next && !jac->work2) { /* allocate second work vector */ in PCApplyTranspose_Composite_Multiplicative()
72 PetscCall(VecDuplicate(jac->work1, &jac->work2)); in PCApplyTranspose_Composite_Multiplicative()
80 PetscCall(MatMultTranspose(mat, y, jac->work1)); in PCApplyTranspose_Composite_Multiplicative()
81 PetscCall(VecWAXPY(jac->work2, -1.0, jac->work1, x)); in PCApplyTranspose_Composite_Multiplicative()
82 PetscCall(PCApplyTranspose(next->pc, jac->work2, jac->work1)); in PCApplyTranspose_Composite_Multiplicative()
83 PetscCall(VecAXPY(y, 1.0, jac->work1)); in PCApplyTranspose_Composite_Multiplicative()
85 if (jac->type == PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE) { in PCApplyTranspose_Composite_Multiplicative()
86 next = jac->head; in PCApplyTranspose_Composite_Multiplicative()
89 PetscCall(MatMultTranspose(mat, y, jac->work1)); in PCApplyTranspose_Composite_Multiplicative()
90 PetscCall(VecWAXPY(jac->work2, -1.0, jac->work1, x)); in PCApplyTranspose_Composite_Multiplicative()
91 PetscCall(PCApplyTranspose(next->pc, jac->work2, jac->work1)); in PCApplyTranspose_Composite_Multiplicative()
92 PetscCall(VecAXPY(y, 1.0, jac->work1)); in PCApplyTranspose_Composite_Multiplicative()
105 PC_Composite *jac = (PC_Composite *)pc->data; in PCApply_Composite_Special() local
106 PC_CompositeLink next = jac->head; in PCApply_Composite_Special()
116 PetscCall(PCApply(next->pc, x, jac->work1)); in PCApply_Composite_Special()
117 if (jac->alpha_mat) { in PCApply_Composite_Special()
118 if (!jac->work2) PetscCall(VecDuplicate(jac->work1, &jac->work2)); in PCApply_Composite_Special()
119 PetscCall(MatMult(jac->alpha_mat, jac->work1, jac->work2)); in PCApply_Composite_Special()
120 PetscCall(PCApply(next->next->pc, jac->work2, y)); in PCApply_Composite_Special()
121 } else PetscCall(PCApply(next->next->pc, jac->work1, y)); in PCApply_Composite_Special()
127 PC_Composite *jac = (PC_Composite *)pc->data; in PCApply_Composite_Additive() local
128 PC_CompositeLink next = jac->head; in PCApply_Composite_Additive()
138 next = jac->head; in PCApply_Composite_Additive()
143 PetscCall(PCApply(next->pc, x, jac->work1)); in PCApply_Composite_Additive()
144 PetscCall(VecAXPY(y, 1.0, jac->work1)); in PCApply_Composite_Additive()
151 PC_Composite *jac = (PC_Composite *)pc->data; in PCApplyTranspose_Composite_Additive() local
152 PC_CompositeLink next = jac->head; in PCApplyTranspose_Composite_Additive()
159 PetscCall(PCApplyTranspose(next->pc, x, jac->work1)); in PCApplyTranspose_Composite_Additive()
160 PetscCall(VecAXPY(y, 1.0, jac->work1)); in PCApplyTranspose_Composite_Additive()
167 PC_Composite *jac = (PC_Composite *)pc->data; in PCSetUp_Composite() local
168 PC_CompositeLink next = jac->head; in PCSetUp_Composite()
172 if (!jac->work1) PetscCall(MatCreateVecs(pc->pmat, &jac->work1, NULL)); in PCSetUp_Composite()
184 PC_Composite *jac = (PC_Composite *)pc->data; in PCSetUpOnBlocks_Composite() local
185 PC_CompositeLink next = jac->head; in PCSetUpOnBlocks_Composite()
200 PC_Composite *jac = (PC_Composite *)pc->data; in PCReset_Composite() local
201 PC_CompositeLink next = jac->head; in PCReset_Composite()
208 PetscCall(VecDestroy(&jac->work1)); in PCReset_Composite()
209 PetscCall(VecDestroy(&jac->work2)); in PCReset_Composite()
210 PetscCall(MatDestroy(&jac->alpha_mat)); in PCReset_Composite()
216 PC_Composite *jac = (PC_Composite *)pc->data; in PCDestroy_Composite() local
217 PC_CompositeLink next = jac->head, next_tmp; in PCDestroy_Composite()
241 PC_Composite *jac = (PC_Composite *)pc->data; in PCSetFromOptions_Composite() local
249 …position", "PCCompositeSetType", PCCompositeTypes, (PetscEnum)jac->type, (PetscEnum *)&jac->type, … in PCSetFromOptions_Composite()
250 if (flg) PetscCall(PCCompositeSetType(pc, jac->type)); in PCSetFromOptions_Composite()
261 next = jac->head; in PCSetFromOptions_Composite()
271 PC_Composite *jac = (PC_Composite *)pc->data; in PCView_Composite() local
272 PC_CompositeLink next = jac->head; in PCView_Composite()
278 …PetscCall(PetscViewerASCIIPrintf(viewer, "Composite PC type - %s\n", PCCompositeTypes[jac->type])); in PCView_Composite()
296 PC_Composite *jac = (PC_Composite *)pc->data; in PCCompositeSpecialSetAlpha_Composite() local
299 jac->alpha = alpha; in PCCompositeSpecialSetAlpha_Composite()
305 PC_Composite *jac = (PC_Composite *)pc->data; in PCCompositeSpecialSetAlphaMat_Composite() local
312 PetscCall(MatDestroy(&jac->alpha_mat)); in PCCompositeSpecialSetAlphaMat_Composite()
313 jac->alpha_mat = alpha_mat; in PCCompositeSpecialSetAlphaMat_Composite()
319 PC_Composite *jac = (PC_Composite *)pc->data; in PCCompositeSetType_Composite() local
332 jac->type = type; in PCCompositeSetType_Composite()
338 PC_Composite *jac = (PC_Composite *)pc->data; in PCCompositeGetType_Composite() local
341 *type = jac->type; in PCCompositeGetType_Composite()
347 PC_Composite *jac; in PCCompositeAddPC_Composite() local
358 jac = (PC_Composite *)pc->data; in PCCompositeAddPC_Composite()
359 next = jac->head; in PCCompositeAddPC_Composite()
361 jac->head = ilink; in PCCompositeAddPC_Composite()
396 PC_Composite *jac; in PCCompositeGetNumberPC_Composite() local
400 jac = (PC_Composite *)pc->data; in PCCompositeGetNumberPC_Composite()
401 next = jac->head; in PCCompositeGetNumberPC_Composite()
412 PC_Composite *jac; in PCCompositeGetPC_Composite() local
417 jac = (PC_Composite *)pc->data; in PCCompositeGetPC_Composite()
418 next = jac->head; in PCCompositeGetPC_Composite()
630 PC_Composite *jac; in PCCreate_Composite() local
633 PetscCall(PetscNew(&jac)); in PCCreate_Composite()
645 pc->data = (void *)jac; in PCCreate_Composite()
646 jac->type = PC_COMPOSITE_ADDITIVE; in PCCreate_Composite()
647 jac->work1 = NULL; in PCCreate_Composite()
648 jac->work2 = NULL; in PCCreate_Composite()
649 jac->head = NULL; in PCCreate_Composite()
650 jac->alpha_mat = NULL; in PCCreate_Composite()