# MatMFFDCheckPositivity
Checks that all entries in U + h*a are positive or zero, decreases h until this is satisfied for a `MATMFFD` matrix 
## Synopsis
```
#include "petscmat.h"   
PetscErrorCode MatMFFDCheckPositivity(void *dummy, Vec U, Vec a, PetscScalar *h)
```
Logically Collective on U


## Input Parameters

- ***U -*** base vector that is added to
- ***a -*** vector that is added
- ***h -*** scaling factor on a
- ***dummy -*** context variable (unused)



## Options Database Keys

- ***-mat_mffd_check_positivity <bool> -*** Insure that U + h*a is nonnegative





## Note
This is rarely used directly, rather it is passed as an argument to
`MatMFFDSetCheckh()`


## See Also
 `MATMFFD`, `MatMFFDSetCheckh()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/mffd/mffd.c.html#MatMFFDCheckPositivity">src/mat/impls/mffd/mffd.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/mffd/mffd.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
