:orphan:
# DMLocalizeCoordinate
If a mesh is periodic (a torus with lengths L_i, some of which can be infinite), project the coordinate onto [0, L_i) in each dimension. 
## Synopsis
```
#include "petscdm.h"          
PetscErrorCode DMLocalizeCoordinate(DM dm, const PetscScalar in[], PetscBool endpoint, PetscScalar out[])
```

## Input Parameters

- ***dm     -*** The `DM`
- ***in     -*** The input coordinate point (dim numbers)
- ***endpoint -*** Include the endpoint L_i



## Output Parameter

- ***out -*** The localized coordinate point





## See Also
 `DM`, `DMLocalizeCoordinates()`, `DMLocalizeAddCoordinate()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dmperiodicity.c.html#DMLocalizeCoordinate">src/dm/interface/dmperiodicity.c</A>

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


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


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