:orphan:
# VecSetValuesSection
Sets all the values associated with a given point, according to the section, in the given `Vec` 
## Synopsis
```
#include "petscsection.h"   
#include "petscvec.h"   
PetscErrorCode VecSetValuesSection(Vec v, PetscSection s, PetscInt point, PetscScalar values[], InsertMode mode)
```
Not Collective


## Input Parameters

- ***v -*** the `Vec`
- ***s -*** the organizing `PetscSection`
- ***point -*** the point
- ***values -*** the array of input values
- ***mode -*** the insertion mode, either `ADD_VALUES` or `INSERT_VALUES`





## Fortran Note
This is similar to `MatSetValuesStencil()`. The binding is
```none
VecSetValuesSectionF90(vec, section, point, values, mode, ierr)
```


## See Also
 `PetscSection`, `PetscSectionCreate()`, `VecGetValuesSection()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/utils/vsection.c.html#VecSetValuesSection">src/vec/vec/utils/vsection.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex7.c.html">src/snes/tutorials/ex7.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/utils/vsection.c)


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