:orphan:
# MatMFFDWPSetComputeNormU
Sets whether it computes the ||U|| used by the Walker-Pernice PETSc routine for computing h. With any Krylov solver this need only be computed during the first iteration and kept for later. 
## Synopsis
```
#include "petscmat.h"   
PetscErrorCode MatMFFDWPSetComputeNormU(Mat A, PetscBool flag)
```

## Input Parameters

- ***A -*** the `MATMFFD` matrix
- ***flag -*** `PETSC_TRUE` causes it to compute ||U||, `PETSC_FALSE` uses the previous value



## Options Database Key

- ***-mat_mffd_compute_normu <true,false> -*** true by default, false can save calculations but you
must be sure that ||U|| has not changed in the mean time.





## Note
See the manual page for `MATMFFD_WP` for a complete description of the
algorithm used to compute h.


## See Also
 `MATMFFD_WP`, `MATMFFD`, `MatMFFDSetFunctionError()`, `MatCreateSNESMF()`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/mffd/wp.c.html#MatMFFDWPSetComputeNormU_P">MatMFFDWPSetComputeNormU_P in src/mat/impls/mffd/wp.c</A><BR>


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


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