Skip to main content
`Ctrl`+`K`

# RGPolygonSetVertices

Sets the vertices that define the polygon region.

## Synopsis

    #include "slepcrg.h"
    PetscErrorCode RGPolygonSetVertices(RG rg,PetscInt n,PetscScalar vr[],PetscScalar vi[])

Logically Collective

## Input Parameters

- rg - the region context

- n - number of vertices

- vr - array of vertices

- vi - array of vertices (imaginary part)

## Options Database Keys

- -rg_polygon_vertices <vr1,vr2,…> - comma-separated list of vertices

- -rg_polygon_verticesi <vi1,vi2,…> - comma-separated list of vertices (imaginary part)

## Notes

In the case of complex scalars, only argument `vr` is used, containing the complex vertices; the list of vertices can be provided in the command line with a comma-separated list of complex values `[+/-][realnumber][+/-]realnumberi` with no spaces.

When PETSc is built with real scalars, the real and imaginary parts of the vertices must be provided in two separate arrays (or two lists in the command line). In this case, the region must be symmetric with respect to the real axis.

## See Also

RG: Region, `RGPOLYGON`, `RGPolygonGetVertices()`

## Level

advanced

## Location

src/sys/classes/rg/impls/polygon/rgpolygon.c

## Implementations

RGPolygonSetVertices_Polygon() in src/sys/classes/rg/impls/polygon/rgpolygon.c

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