# PCSetCoordinates
sets the coordinates of all the nodes on the local process 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCSetCoordinates(PC pc, PetscInt dim, PetscInt nloc, PetscReal coords[])
```
Collective


## Input Parameters

- ***pc -*** the solver context
- ***dim -*** the dimension of the coordinates 1, 2, or 3
- ***nloc -*** the blocked size of the coordinates array
- ***coords -*** the coordinates array





## Note
coords is an array of the dim coordinates for the nodes on
the local processor, of size dim*nloc.
If there are 108 equation on a processor
for a displacement finite element discretization of elasticity (so
that there are nloc = 36 = 108/3 nodes) then the array must have 108
double precision values (ie, 3 * 36).  These x y z coordinates
should be ordered for nodes 0 to N-1 like so: [ 0.x, 0.y, 0.z, 1.x,
... , N-1.z ].


## See Also
 `PC`, `MatSetNearNullSpace()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/interface/precon.c.html#PCSetCoordinates">src/ksp/pc/interface/precon.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex21.c.html">src/ksp/ksp/tutorials/ex21.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex54.c.html">src/ksp/ksp/tutorials/ex54.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex55.c.html">src/ksp/ksp/tutorials/ex55.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex56.c.html">src/ksp/ksp/tutorials/ex56.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/bddc/bddc.c.html#PCSetCoordinates_BDDC">PCSetCoordinates_BDDC in src/ksp/pc/impls/bddc/bddc.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/fieldsplit/fieldsplit.c.html#PCSetCoordinates_FieldSplit">PCSetCoordinates_FieldSplit in src/ksp/pc/impls/fieldsplit/fieldsplit.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/agg.c.html#PCSetCoordinates_AGG">PCSetCoordinates_AGG in src/ksp/pc/impls/gamg/agg.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/geo.c.html#PCSetCoordinates_GEO">PCSetCoordinates_GEO in src/ksp/pc/impls/gamg/geo.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/h2opus/pch2opus.c.html#PCSetCoordinates_H2OPUS">PCSetCoordinates_H2OPUS in src/ksp/pc/impls/h2opus/pch2opus.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/hypre/hypre.c.html#PCSetCoordinates_HYPRE">PCSetCoordinates_HYPRE in src/ksp/pc/impls/hypre/hypre.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/ml/ml.c.html#PCSetCoordinates_ML">PCSetCoordinates_ML in src/ksp/pc/impls/ml/ml.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/interface/precon.c)


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