DMDAMapCoordsToPeriodicDomain — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# DMDAMapCoordsToPeriodicDomain

Maps a `(x, y)` coordinate pair that lies outside a 2D `DMDA` domain back into the domain along any periodic boundaries

## Synopsis

    #include "petsccharacteristic.h"
    PetscErrorCode DMDAMapCoordsToPeriodicDomain(DM da, PetscScalar *x, PetscScalar *y)

Not Collective

## Input Parameter

- da - the 2D `DMDA` context

## Input/Output Parameters

- x - the x coordinate; wrapped in place if the x boundary is periodic

- y - the y coordinate; wrapped in place if the y boundary is periodic

## Note

Coordinates along non-periodic boundaries are left unchanged. This helper is used internally by the method-of-characteristics solver on structured grids.

## See Also

TS: Scalable ODE and DAE Solvers, `Characteristic`, `DMDA`, `CharacteristicSolve()`

## Level

developer

## Location

src/ts/characteristic/impls/da/slda.c

Index of all Characteristic routines
Table of Contents for all manual pages
Index of all manual pages