:orphan: # DMDAGetLogicalCoordinate Returns a the i,j,k logical coordinate for the closest mesh point to a `x`, `y`, `z` point in the coordinates of the `DMDA` ## Synopsis ``` #include "petscdmda.h" PetscErrorCode DMDAGetLogicalCoordinate(DM da, PetscScalar x, PetscScalar y, PetscScalar z, PetscInt *II, PetscInt *JJ, PetscInt *KK, PetscScalar *X, PetscScalar *Y, PetscScalar *Z) ``` Collective ## Input Parameters - ***da -*** the distributed array - ***x -*** the first physical coordinate - ***y -*** the second physical coordinate - ***z -*** the third physical coordinate ## Output Parameters - ***II -*** the first logical coordinate (-1 on processes that do not contain that point) - ***JJ -*** the second logical coordinate (-1 on processes that do not contain that point) - ***KK -*** the third logical coordinate (-1 on processes that do not contain that point) - ***X -*** (optional) the first coordinate of the located grid point - ***Y -*** (optional) the second coordinate of the located grid point - ***Z -*** (optional) the third coordinate of the located grid point ## Note All processors that share the `DMDA` must call this with the same coordinate value ## See Also `DM`, `DMDA` ## Level advanced ## Location src/dm/impls/da/dasub.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/da/dasub.c) [Index of all DMDA routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)