Lines Matching refs:next

19   if (fas->next) PetscCall(SNESReset(fas->next));  in SNESReset_FAS()
30 PetscCall(SNESDestroy(&fas->next)); in SNESDestroy_FAS()
81 SNES next; in SNESSetUp_FAS() local
95 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESSetUp_FAS()
108 if (next) { in SNESSetUp_FAS()
110 if (!next->dm) { in SNESSetUp_FAS()
111 PetscCall(DMCoarsen(snes->dm, PetscObjectComm((PetscObject)next), &next->dm)); in SNESSetUp_FAS()
112 PetscCall(SNESSetDM(next, next->dm)); in SNESSetUp_FAS()
116 PetscCall(DMCreateInterpolation(next->dm, snes->dm, &fas->interpolate, &fas->rscale)); in SNESSetUp_FAS()
118 PetscCall(DMHasCreateRestriction(next->dm, &hasCreateRestriction)); in SNESSetUp_FAS()
121 PetscCall(DMCreateRestriction(next->dm, snes->dm, &fas->restrct)); in SNESSetUp_FAS()
130 PetscCall(DMHasCreateInjection(next->dm, &hasCreateInjection)); in SNESSetUp_FAS()
131 if (hasCreateInjection) PetscCall(DMCreateInjection(next->dm, snes->dm, &fas->inject)); in SNESSetUp_FAS()
138 if (next) PetscCall(SNESSetFunction(next, NULL, SNESFASGalerkinFunctionDefault, next)); in SNESSetUp_FAS()
163 if (next) { in SNESSetUp_FAS()
165 if (!next->vec_sol) PetscCall(SNESFASCreateCoarseVec(snes, &next->vec_sol)); in SNESSetUp_FAS()
166 if (!next->vec_rhs) PetscCall(SNESFASCreateCoarseVec(snes, &next->vec_rhs)); in SNESSetUp_FAS()
167 PetscCall(PetscObjectCopyFortranFunctionPointers((PetscObject)snes, (PetscObject)next)); in SNESSetUp_FAS()
168 PetscCall(SNESFASSetUpLineSearch_Private(snes, next)); in SNESSetUp_FAS()
169 PetscCall(SNESSetUp(next)); in SNESSetUp_FAS()
189 SNES next; in SNESSetFromOptions_FAS() local
261 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESSetFromOptions_FAS()
262 if (next) PetscCall(SNESSetFromOptions(next)); in SNESSetFromOptions_FAS()
339 if (curfas->next) curfas = (SNES_FAS *)curfas->next->data; in SNESView_FAS()
491 SNES next; in SNESFASInterpolatedCoarseSolution() local
496 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESFASInterpolatedCoarseSolution()
497 if (next) { in SNESFASInterpolatedCoarseSolution()
498 fasc = (SNES_FAS *)next->data; in SNESFASInterpolatedCoarseSolution()
503 X_c = next->vec_sol; in SNESFASInterpolatedCoarseSolution()
508 B_c = next->vec_rhs; in SNESFASInterpolatedCoarseSolution()
517 PetscCall(SNESSolve(next, B_c, X_c)); in SNESFASInterpolatedCoarseSolution()
518 PetscCall(SNESGetConvergedReason(next, &reason)); in SNESFASInterpolatedCoarseSolution()
526 PetscCall(SNESGetDM(next, &dmc)); in SNESFASInterpolatedCoarseSolution()
551 SNES next; in SNESFASCoarseCorrection() local
556 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESFASCoarseCorrection()
557 if (next) { in SNESFASCoarseCorrection()
558 fasc = (SNES_FAS *)next->data; in SNESFASCoarseCorrection()
563 X_c = next->vec_sol; in SNESFASCoarseCorrection()
564 Xo_c = next->work[0]; in SNESFASCoarseCorrection()
565 F_c = next->vec_func; in SNESFASCoarseCorrection()
566 B_c = next->vec_rhs; in SNESFASCoarseCorrection()
574 if (fasc->eventresidual) PetscCall(PetscLogEventBegin(fasc->eventresidual, next, 0, 0, 0)); in SNESFASCoarseCorrection()
576 PetscCall(SNESComputeFunction(next, Xo_c, F_c)); in SNESFASCoarseCorrection()
577 if (fasc->eventresidual) PetscCall(PetscLogEventEnd(fasc->eventresidual, next, 0, 0, 0)); in SNESFASCoarseCorrection()
587 PetscCall(SNESSetInitialFunction(next, F_c)); in SNESFASCoarseCorrection()
588 PetscCall(SNESSolve(next, B_c, X_c)); in SNESFASCoarseCorrection()
589 PetscCall(SNESGetConvergedReason(next, &reason)); in SNESFASCoarseCorrection()
625 SNES next; in SNESFASCycle_Additive() local
630 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESFASCycle_Additive()
636 if (next) { in SNESFASCycle_Additive()
637 fasc = (SNES_FAS *)next->data; in SNESFASCycle_Additive()
645 X_c = next->vec_sol; in SNESFASCycle_Additive()
646 Xo_c = next->work[0]; in SNESFASCycle_Additive()
647 F_c = next->vec_func; in SNESFASCycle_Additive()
648 B_c = next->vec_rhs; in SNESFASCycle_Additive()
655 if (fasc->eventresidual) PetscCall(PetscLogEventBegin(fasc->eventresidual, next, 0, 0, 0)); in SNESFASCycle_Additive()
656 PetscCall(SNESComputeFunction(next, Xo_c, F_c)); in SNESFASCycle_Additive()
657 if (fasc->eventresidual) PetscCall(PetscLogEventEnd(fasc->eventresidual, next, 0, 0, 0)); in SNESFASCycle_Additive()
665 PetscCall(SNESSetInitialFunction(next, F_c)); in SNESFASCycle_Additive()
666 PetscCall(SNESSolve(next, B_c, X_c)); in SNESFASCycle_Additive()
671 PetscCall(SNESGetConvergedReason(next, &reason)); in SNESFASCycle_Additive()
706 SNES next; in SNESFASCycle_Multiplicative() local
712 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESFASCycle_Multiplicative()
714 if (next) { in SNESFASCycle_Multiplicative()
723 SNES next; in SNESFASCycleSetupPhase_Full() local
730 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESFASCycleSetupPhase_Full()
732 if (next) PetscCall(SNESFASCycleSetupPhase_Full(next)); in SNESFASCycleSetupPhase_Full()
741 SNES next; in SNESFASCycle_Full() local
747 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESFASCycle_Full()
753 if (next) { in SNESFASCycle_Full()
754 if (fas->level != 1) next->max_its += 1; in SNESFASCycle_Full()
761 if (fas->level != 1) next->max_its -= 1; in SNESFASCycle_Full()
769 if (next) { in SNESFASCycle_Full()
776 if (next) { in SNESFASCycle_Full()
787 SNES next; in SNESFASCycle_Kaskade() local
792 PetscCall(SNESFASCycleGetCorrection(snes, &next)); in SNESFASCycle_Kaskade()
793 if (next) { in SNESFASCycle_Kaskade()
857 for (ffas = fas; ffas->next; ffas = (SNES_FAS *)ffas->next->data) { in SNESSolve_FAS()
859 PetscCall(SNESGetDM(ffas->next, &dmcoarse)); in SNESSolve_FAS()
965 fas->next = NULL; in SNESCreate_FAS()