petsc-3.13.6 2020-09-29
Report Typos and Errors

PetscFindReal

Finds a PetscReal in a sorted array of PetscReals

Synopsis

#include "petscsys.h"  
PetscErrorCode PetscFindReal(PetscReal key, PetscInt n, const PetscReal t[], PetscReal eps, PetscInt *loc)
Not Collective

Input Parameters

key - the value to locate
n - number of values in the array
ii - array of values
eps - tolerance used to compare

Output Parameter

loc -the location if found, otherwise -(slot+1) where slot is the place the value would go

See Also

PetscSortReal(), PetscSortRealWithArrayInt()

Level

intermediate

Location

src/sys/utils/sortd.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages