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

Class BV


BV
Nested Classes [hide private]
  BlockType
BV block-orthogonalization types
  OrthogBlockType
BV block-orthogonalization types
  OrthogRefineType
BV orthogonalization refinement types
  OrthogType
BV orthogonalization types
  RefineType
BV orthogonalization refinement types
  Type
BV type
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
applyMatrix(self, Vec x, Vec y)
Multiplies a vector with the matrix associated to the bilinear form.
 
create(self, comm=None)
Creates the BV object.
 
destroy(self)
Destroys the BV object.
 
getMatrix(self)
Retrieves the matrix representation of the inner product.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all BV options in the database.
 
getOrthogonalization(self)
Gets the orthogonalization settings from the BV object.
 
getType(self)
Gets the BV type of this object.
 
orthogonalizeVec(self, Vec v)
Orthogonalize a vector with respect to a set of vectors.
 
setFromOptions(self)
Sets BV options from the options database.
 
setMatrix(self, Mat mat, bool indef)
Sets the bilinear form to be used for inner products.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all BV options in the database.
 
setOrthogonalization(self, type=None, refine=None, eta=None, block=None)
Specifies the method used for the orthogonalization of vectors (classical or modified Gram-Schmidt with or without refinement), and for the block-orthogonalization (simultaneous orthogonalization of a set of vectors).
 
setType(self, bv_type)
Selects the type for the BV object.
 
view(self, Viewer viewer=None)
Prints the BV 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

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

Properties [hide private]

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__

applyMatrix(self, Vec x, Vec y)

 

Multiplies a vector with the matrix associated to the bilinear form.

Parameters

x: Vec
The input vector.
y: Vec
The result vector.

Notes

If the bilinear form has no associated matrix this function copies the vector.

create(self, comm=None)

 

Creates the BV object.

Parameters

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

destroy(self)

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

getMatrix(self)

 

Retrieves the matrix representation of the inner product.

Returns

mat: the matrix of the inner product

getOptionsPrefix(self)

 

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

Returns

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

getOrthogonalization(self)

 

Gets the orthogonalization settings from the BV object.

Returns

type: BV.OrthogType enumerate
The type of orthogonalization technique.
refine: BV.OrthogRefineType enumerate
The type of refinement.
eta: float
Parameter for selective refinement (used when the the refinement type BV.OrthogRefineType.IFNEEDED).
block: BV.OrthogBlockType enumerate
The type of block orthogonalization .

getType(self)

 

Gets the BV type of this object.

Returns

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

orthogonalizeVec(self, Vec v)

 

Orthogonalize a vector with respect to a set of vectors.

Parameters

v: Vec
Vector to be orthogonalized, modified on return.

Returns

norm: float
The norm of the resulting vector.
lindep: boolean
Flag indicating that refinement did not improve the quality of orthogonalization.

Notes

This function applies an orthogonal projector to project vector v onto the orthogonal complement of the span of the columns of the BV.

This routine does not normalize the resulting vector.

setFromOptions(self)

 

Sets BV options from the options database.

Notes

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

Overrides: petsc4py.PETSc.Object.setFromOptions

setMatrix(self, Mat mat, bool indef)

 

Sets the bilinear form to be used for inner products.

Parameters

mat: Mat, optional
The matrix of the inner product.
indef: bool, optional
Whether the matrix is indefinite

setOptionsPrefix(self, prefix)

 

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

Parameters

prefix: string
The prefix string to prepend to all BV 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

setOrthogonalization(self, type=None, refine=None, eta=None, block=None)

 

Specifies the method used for the orthogonalization of vectors (classical or modified Gram-Schmidt with or without refinement), and for the block-orthogonalization (simultaneous orthogonalization of a set of vectors).

Parameters

type: BV.OrthogType enumerate, optional
The type of orthogonalization technique.
refine: BV.OrthogRefineType enumerate, optional
The type of refinement.
eta: float, optional
Parameter for selective refinement.
block: BV.OrthogBlockType enumerate, optional
The type of block orthogonalization.

Notes

The default settings work well for most problems.

The parameter eta should be a real value between 0 and 1 (or DEFAULT). The value of eta is used only when the refinement type is BV.OrthogRefineType.IFNEEDED.

When using several processors, BV.OrthogType.MGS is likely to result in bad scalability.

If the method set for block orthogonalization is GS, then the computation is done column by column with the vector orthogonalization.

setType(self, bv_type)

 

Selects the type for the BV object.

Parameters

bv_type: BV.Type enumerate
The inner product type to be used.

view(self, Viewer viewer=None)

 

Prints the BV data structure.

Parameters

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