Skip to main content
`Ctrl`+`K`

# RGRingSetParameters

Sets the parameters defining the ring region.

## Synopsis

    #include "slepcrg.h"
    PetscErrorCode RGRingSetParameters(RG rg,PetscScalar center,PetscReal radius,PetscReal vscale,PetscReal start_ang,PetscReal end_ang,PetscReal width)

Logically Collective

## Input Parameters

- rg - the region context

- center - center of the ellipse

- radius - radius of the ellipse

- vscale - vertical scale of the ellipse

- start_ang - the right-hand side angle

- end_ang - the left-hand side angle

- width - width of the ring

## Options Database Keys

- -rg_ring_center <center> - sets the center

- -rg_ring_radius <radius> - sets the radius

- -rg_ring_vscale <vscale> - sets the vertical scale

- -rg_ring_startangle <start_ang> - sets the right-hand side angle

- -rg_ring_endangle <end_ang> - sets the left-hand side angle

- -rg_ring_width <width> - sets the width of the ring

## Notes

The values of `center`, `radius` and `vscale` have the same meaning as in the ellipse region. The `start_ang` and `end_ang` define the span of the ring (by default it is the whole ring), while the `width` is the separation between the two concentric ellipses (above and below the radius by `width/2`).

The start and end angles are expressed as a fraction of the circumference. The allowed range is \([0,\dots,1]\), with `0` corresponding to 0 radians, `0.25` to \(\pi/2\) radians, and so on. It is allowed to have `start_ang`>`end_ang`, in which case the ring region crosses over the zero angle.

In the case of complex scalars, a complex center can be provided in the command line with `[+/-][realnumber][+/-]realnumberi` with no spaces, e.g., `-rg_ring_center 1.0+2.0i`.

When PETSc is built with real scalars, the center is restricted to a real value, and the start and end angles must be such that the region is symmetric with respect to the real axis.

For all arguments except `center`, you can use `PETSC_CURRENT` to keep the current value, and `PETSC_DETERMINE` to set them to a default value (1 for `radius`, `vscale`, `end_ang`, 0 for `start_ang`, and 0.1 for `width`).

## See Also

RG: Region, `RGRING`, `RGRingGetParameters()`, `RGELLIPSE`

## Level

advanced

## Location

src/sys/classes/rg/impls/ring/rgring.c

## Implementations

RGRingSetParameters_Ring() in src/sys/classes/rg/impls/ring/rgring.c

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