Lines Matching refs:xl

100   const PetscScalar *x, *xl, *xu, *f;  in SNESMonitorVI()  local
111 PetscCall(VecGetArrayRead(snes->xl, &xl)); in SNESMonitorVI()
118 …if ((PetscRealPart(x[i]) > PetscRealPart(xl[i]) + zerotolerance || (PetscRealPart(f[i]) <= 0.0)) &… in SNESMonitorVI()
119 …else if (PetscRealPart(x[i]) <= PetscRealPart(xl[i]) + zerotolerance && PetscRealPart(f[i]) > 0.0)… in SNESMonitorVI()
125 if (PetscRealPart(x[i]) <= PetscRealPart(xl[i]) + zerotolerance) act_bound[0]++; in SNESMonitorVI()
129 PetscCall(VecRestoreArrayRead(snes->xl, &xl)); in SNESMonitorVI()
237 const PetscScalar *xl, *xu; in SNESVIProjectOntoBounds() local
244 PetscCall(VecGetArrayRead(snes->xl, &xl)); in SNESVIProjectOntoBounds()
248 if (PetscRealPart(x[i]) < PetscRealPart(xl[i])) x[i] = xl[i]; in SNESVIProjectOntoBounds()
252 PetscCall(VecRestoreArrayRead(snes->xl, &xl)); in SNESVIProjectOntoBounds()
274 Vec Xl = snes->xl, Xu = snes->xu; in SNESVIGetActiveSetIS()
275 const PetscScalar *x, *f, *xl, *xu; in SNESVIGetActiveSetIS() local
283 PetscCall(VecGetArrayRead(Xl, &xl)); in SNESVIGetActiveSetIS()
288 …if (!((PetscRealPart(x[i]) > PetscRealPart(xl[i]) + zerotolerance || (PetscRealPart(f[i]) <= 0.0))… in SNESVIGetActiveSetIS()
295 …if (!((PetscRealPart(x[i]) > PetscRealPart(xl[i]) + zerotolerance || (PetscRealPart(f[i]) <= 0.0))… in SNESVIGetActiveSetIS()
302 PetscCall(VecRestoreArrayRead(Xl, &xl)); in SNESVIGetActiveSetIS()
325 const PetscScalar *x, *xl, *xu, *f; in SNESVIComputeInactiveSetFnorm() local
333 PetscCall(VecGetArrayRead(snes->xl, &xl)); in SNESVIComputeInactiveSetFnorm()
339 …if ((PetscRealPart(x[i]) > PetscRealPart(xl[i]) + zerotolerance || (PetscRealPart(f[i]) <= 0.0)) &… in SNESVIComputeInactiveSetFnorm()
342 PetscCall(VecRestoreArrayRead(snes->xl, &xl)); in SNESVIComputeInactiveSetFnorm()
369 const PetscScalar *x, *xl, *xu, *y, *f; in SNESVIComputeInactiveSetFtY() local
379 PetscCall(VecGetArrayRead(snes->xl, &xl)); in SNESVIComputeInactiveSetFtY()
384 …if ((PetscRealPart(x[i]) > PetscRealPart(xl[i]) + zerotolerance || (PetscRealPart(f[i]) <= 0.0)) &… in SNESVIComputeInactiveSetFtY()
388 PetscCall(VecRestoreArrayRead(snes->xl, &xl)); in SNESVIComputeInactiveSetFtY()
395 static PetscErrorCode SNESVIDMComputeVariableBounds(SNES snes, Vec xl, Vec xu) in SNESVIDMComputeVariableBounds() argument
398 PetscCall(DMComputeVariableBounds(snes->dm, xl, xu)); in SNESVIDMComputeVariableBounds()
431 if (!snes->xl) PetscCall(VecDuplicate(snes->work[0], &snes->xl)); in SNESSetUp_VI()
433 PetscUseTypeMethod(snes, computevariablebounds, snes->xl, snes->xu); in SNESSetUp_VI()
434 } else if (!snes->xl && !snes->xu) { in SNESSetUp_VI()
436 PetscCall(VecDuplicate(snes->work[0], &snes->xl)); in SNESSetUp_VI()
437 PetscCall(VecSet(snes->xl, PETSC_NINFINITY)); in SNESSetUp_VI()
443 PetscCall(VecGetOwnershipRange(snes->xl, i_start + 1, i_end + 1)); in SNESSetUp_VI()
454 PetscCall(VecDestroy(&snes->xl)); in SNESReset_VI()
504 PetscErrorCode SNESVISetVariableBounds(SNES snes, Vec xl, Vec xu) in SNESVISetVariableBounds() argument
510 PetscValidHeaderSpecific(xl, VEC_CLASSID, 2); in SNESVISetVariableBounds()
513 if (f) PetscUseMethod(snes, "SNESVISetVariableBounds_C", (SNES, Vec, Vec), (snes, xl, xu)); in SNESVISetVariableBounds()
514 else PetscCall(SNESVISetVariableBounds_VI(snes, xl, xu)); in SNESVISetVariableBounds()
519 PetscErrorCode SNESVISetVariableBounds_VI(SNES snes, Vec xl, Vec xu) in SNESVISetVariableBounds_VI() argument
529 PetscCall(VecGetSize(xl, &xlN)); in SNESVISetVariableBounds_VI()
535 PetscCall(PetscObjectReference((PetscObject)xl)); in SNESVISetVariableBounds_VI()
537 PetscCall(VecDestroy(&snes->xl)); in SNESVISetVariableBounds_VI()
539 snes->xl = xl; in SNESVISetVariableBounds_VI()
541 PetscCall(VecGetLocalSize(xl, &n)); in SNESVISetVariableBounds_VI()
542 PetscCall(VecGetArrayRead(xl, &xxl)); in SNESVISetVariableBounds_VI()
547 PetscCall(VecRestoreArrayRead(xl, &xxl)); in SNESVISetVariableBounds_VI()
568 PetscErrorCode SNESVIGetVariableBounds(SNES snes, Vec *xl, Vec *xu) in SNESVIGetVariableBounds() argument
572 if (xl) *xl = snes->xl; in SNESVIGetVariableBounds()