Package slepc4py :: Module SLEPc :: Class RG
[hide private]
[frames] | no frames]

Class RG


RG
Nested Classes [hide private]
  QuadRule
RG quadrature rule for contour integral methods
  Type
RG type
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
canUseConjugates(self, realmats=True)
Used in contour integral methods to determine whether half of integration points can be avoided (use their conjugates).
 
checkInside(self, a)
Determines if a set of given points are inside the region or not.
 
computeBoundingBox(self)
Determines the endpoints of a rectangle in the complex plane that contains the region.
 
computeContour(self, n)
Computes the coordinates of several points lying on the contour of the region.
 
computeQuadrature(self, quad, n)
Computes the values of the parameters used in a quadrature rule for a contour integral around the boundary of the region.
 
create(self, comm=None)
Creates the RG object.
 
destroy(self)
Destroys the RG object.
 
getComplement(self)
Returns the flag indicating whether the region is complemented or not.
 
getEllipseParameters(self)
Gets the parameters that define the ellipse region.
 
getIntervalEndpoints(self)
Gets the parameters that define the interval region.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all RG options in the database.
 
getPolygonVertices(self)
Gets the parameters that define the interval region.
 
getRingParameters(self)
Gets the parameters that define the ring region.
 
getScale(self)
Gets the scaling factor.
 
getType(self)
Gets the RG type of this object.
 
isAxisymmetric(self, vertical=False)
Determines if the region is symmetric with respect to the real or imaginary axis.
 
isTrivial(self)
Tells whether it is the trivial region (whole complex plane).
 
setComplement(self, comp=True)
Sets a flag to indicate that the region is the complement of the specified one.
 
setEllipseParameters(self, center, radius, vscale=None)
Sets the parameters defining the ellipse region.
 
setFromOptions(self)
Sets RG options from the options database.
 
setIntervalEndpoints(self, a, b, c, d)
Sets the parameters defining the interval region.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all RG options in the database.
 
setPolygonVertices(self, v)
Sets the vertices that define the polygon region.
 
setRingParameters(self, center, radius, vscale, start_ang, end_ang, width)
Sets the parameters defining the ring region.
 
setScale(self, sfactor=None)
Sets the scaling factor to be used when checking that a point is inside the region and when computing the contour.
 
setType(self, rg_type)
Selects the type for the RG object.
 
view(self, Viewer viewer=None)
Prints the RG data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease, viewFromOptions

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  complement
  scale

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

canUseConjugates(self, realmats=True)

 

Used in contour integral methods to determine whether half of integration points can be avoided (use their conjugates).

Parameters

realmats: bool, optional
True if the problem matrices are real.

Returns

useconj: bool
Whether it is possible to use conjugates.

checkInside(self, a)

 

Determines if a set of given points are inside the region or not.

Parameters

a: list of float (complex)
The coordinates of the points.

Returns

inside: list of int
Computed result for each point (1=inside, 0=on the contour, -1=outside).

computeBoundingBox(self)

 

Determines the endpoints of a rectangle in the complex plane that contains the region.

Returns

a: float
The left endpoint of the bounding box in the real axis
b: float
The right endpoint of the bounding box in the real axis
c: float
The left endpoint of the bounding box in the imaginary axis
d: float
The right endpoint of the bounding box in the imaginary axis

computeContour(self, n)

 

Computes the coordinates of several points lying on the contour of the region.

Parameters

n: int
The number of points to compute.

Returns

x: list of float (complex)
Computed points.

computeQuadrature(self, quad, n)

 

Computes the values of the parameters used in a quadrature rule for a contour integral around the boundary of the region.

Parameters

quad: RG.QuadRule enumerate
The type of quadrature.
n: int
The number of quadrature points to compute.

Returns

z: list of float (real or complex)
Quadrature points.
zn: list of float (real or complex)
Normalized quadrature points.
w: list of float (real or complex)
Quadrature weights.

create(self, comm=None)

 

Creates the RG object.

Parameters

comm: Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the RG object.
Overrides: petsc4py.PETSc.Object.destroy

getComplement(self)

 

Returns the flag indicating whether the region is complemented or not.

Returns

flg: bool
Whether the region is complemented or not.

getEllipseParameters(self)

 

Gets the parameters that define the ellipse region.

Returns

center: float (real or complex)
The center.
radius: float
The radius.
vscale: float
The vertical scale.

getIntervalEndpoints(self)

 

Gets the parameters that define the interval region.

Returns

a: float
The left endpoint in the real axis.
b: float
The right endpoint in the real axis.
c: float
The upper endpoint in the imaginary axis.
d: float
The lower endpoint in the imaginary axis.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all RG options in the database.

Returns

prefix: string
The prefix string set for this RG object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getPolygonVertices(self)

 

Gets the parameters that define the interval region.

Returns

v: list of float (complex)
The vertices.

getRingParameters(self)

 

Gets the parameters that define the ring region.

Returns

center: float (real or complex)
The center.
radius: float
The radius.
vscale: float
The vertical scale.
start_ang: float
The right-hand side angle.
end_ang: float
The left-hand side angle.
width: float
The width of the ring.

getScale(self)

 

Gets the scaling factor.

Returns

sfactor: float
The scaling factor.

getType(self)

 

Gets the RG type of this object.

Returns

type: RG.Type enumerate
The inner product type currently being used.
Overrides: petsc4py.PETSc.Object.getType

isAxisymmetric(self, vertical=False)

 

Determines if the region is symmetric with respect to the real or imaginary axis.

Parameters

vertical: bool, optional
True if symmetry must be checked against the vertical axis.

Returns

symm: bool
True if the region is axisymmetric.

isTrivial(self)

 

Tells whether it is the trivial region (whole complex plane).

Returns

flag: bool
True if the region is equal to the whole complex plane, e.g., an interval region with all four endpoints unbounded or an ellipse with infinite radius.

setComplement(self, comp=True)

 

Sets a flag to indicate that the region is the complement of the specified one.

Parameters

comp: bool, optional
Activate/deactivate the complementation of the region.

setEllipseParameters(self, center, radius, vscale=None)

 

Sets the parameters defining the ellipse region.

Parameters

center: float (real or complex)
The center.
radius: float
The radius.
vscale: float, optional
The vertical scale.

setFromOptions(self)

 

Sets RG options from the options database.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setIntervalEndpoints(self, a, b, c, d)

 

Sets the parameters defining the interval region.

Parameters

a: float
The left endpoint in the real axis.
b: float
The right endpoint in the real axis.
c: float
The upper endpoint in the imaginary axis.
d: float
The lower endpoint in the imaginary axis.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all RG options in the database.

Parameters

prefix: string
The prefix string to prepend to all RG option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setPolygonVertices(self, v)

 

Sets the vertices that define the polygon region.

Parameters

v: list of float (complex)
The vertices.

setRingParameters(self, center, radius, vscale, start_ang, end_ang, width)

 

Sets the parameters defining the ring region.

Parameters

center: float (real or complex)
The center.
radius: float
The radius.
vscale: float
The vertical scale.
start_ang: float
The right-hand side angle.
end_ang: float
The left-hand side angle.
width: float
The width of the ring.

setScale(self, sfactor=None)

 

Sets the scaling factor to be used when checking that a point is inside the region and when computing the contour.

Parameters

sfactor: float, optional
The scaling factor (default=1).

setType(self, rg_type)

 

Selects the type for the RG object.

Parameters

rg_type: RG.Type enumerate
The inner product type to be used.

view(self, Viewer viewer=None)

 

Prints the RG data structure.

Parameters

viewer: Viewer, optional
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view