|
a new object with type S, a subtype of T
|
|
|
|
applyMatrix(self,
Vec x,
Vec y)
Multiplies a vector with the matrix associated to the bilinear
form. |
|
|
|
|
copy(self,
BV result=None)
Copies a basis vector object into another one. |
|
|
|
|
copyColumn(self,
j,
i)
Copies the values from one of the columns to another one. |
|
|
|
|
copyVec(self,
j,
Vec v)
Copies one of the columns of a basis vectors object into a Vec. |
|
|
|
|
create(self,
comm=None)
Creates the BV object. |
|
|
|
|
createFromMat(self,
Mat A)
Creates a basis vectors object from a dense Mat object. |
|
|
|
|
createMat(self)
Creates a new Mat object of dense type and copies the contents of the
BV object. |
|
|
|
|
createVec(self)
Creates a new Vec object with the same type and dimensions as
the columns of the basis vectors object. |
|
|
|
|
destroy(self)
Destroys the BV object. |
|
|
|
|
dot(self,
BV Y)
M = Y^H*X (m_ij = y_i^H x_j) or M = Y^H*B*X |
|
|
|
|
dotColumn(self,
j)
Computes multiple dot products of a column against all the column
vectors of a BV. |
|
|
|
|
dotVec(self,
Vec v)
Computes multiple dot products of a vector against all the column
vectors of a BV. |
|
|
|
|
duplicate(self)
Duplicate the BV object with the same type and dimensions. |
|
|
|
|
duplicateResize(self,
m)
Creates a new BV object of the same type and dimensions as
an existing one, but with possibly different number of columns. |
|
|
|
|
|
|
|
getColumn(self,
j)
Returns a Vec object that contains the entries of the requested column
of the basis vectors object. |
|
|
|
|
|
|
|
getMat(self)
Returns a Mat object of dense type that shares the memory
of the basis vectors 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. |
|
|
|
|
|
|
|
|
|
|
getSizes(self)
Returns the local and global sizes, and the number of columns. |
|
|
|
|
getType(self)
Gets the BV type of this object. |
|
|
|
|
|
|
|
insertVec(self,
j,
Vec w)
Insert a vector into the specified column. |
|
|
|
|
insertVecs(self,
s,
W,
bool orth)
Insert a set of vectors into specified columns. |
|
|
|
|
matMult(self,
Mat A,
BV Y=None)
Computes the matrix-vector product for each column, Y = A*V. |
|
|
|
|
matMultColumn(self,
Mat A,
j)
Computes the matrix-vector product for a specified column, storing
the result in the next column: v_{j+1}=A*v_j. |
|
|
|
|
matMultHermitianTranspose(self,
Mat A,
BV Y=None)
Computes the matrix-vector product with the conjugate transpose of a
matrix for each column, Y=A^H*V. |
|
|
|
|
matMultHermitianTransposeColumn(self,
Mat A,
j)
Computes the conjugate-transpose matrix-vector product for a specified column,
storing the result in the next column: v_{j+1}=A^H*v_j. |
|
|
|
|
matMultTransposeColumn(self,
Mat A,
j)
Computes the transpose matrix-vector product for a specified column,
storing the result in the next column: v_{j+1}=A^T*v_j. |
|
|
|
|
matProject(self,
Mat A,
BV Y)
Computes the projection of a matrix onto a subspace. |
|
|
|
|
mult(self,
alpha,
beta,
BV X,
Mat Q)
Computes Y = beta*Y + alpha*X*Q. |
|
|
|
|
multColumn(self,
alpha,
beta,
j,
q)
Computes y = beta*y + alpha*X*q, where y is the j-th column. |
|
|
|
|
multInPlace(self,
Mat Q,
s,
e)
Update a set of vectors as V(:,s:e-1) = V*Q(:,s:e-1). |
|
|
|
|
multVec(self,
alpha,
beta,
Vec y,
q)
Computes y = beta*y + alpha*X*q. |
|
|
|
|
norm(self,
norm_type=None)
Computes the matrix norm of the BV. |
|
|
|
|
normColumn(self,
int j,
norm_type=None)
Computes the matrix norm of the BV. |
|
|
|
|
orthogonalize(self,
Mat R=None,
**kargs)
Orthogonalize all columns (except leading ones),
that is, compute the QR decomposition. |
|
|
|
|
orthogonalizeColumn(self,
j)
Orthogonalize one of the column vectors with respect to the previous ones. |
|
|
|
|
orthogonalizeVec(self,
Vec v)
Orthogonalize a vector with respect to a set of vectors. |
|
|
|
|
orthonormalizeColumn(self,
j,
replace=False)
Orthonormalize one of the column vectors with respect to the previous
ones. |
|
|
|
|
resize(self,
m,
copy=True)
Change the number of columns. |
|
|
|
|
|
|
|
|
|
|
scale(self,
alpha)
Multiply the entries by a scalar value. |
|
|
|
|
|
|
|
setActiveColumns(self,
l,
k)
Specify the columns that will be involved in operations. |
|
|
|
|
setDefiniteTolerance(self,
deftol)
Sets the tolerance to be used when checking a definite inner product. |
|
|
|
|
|
|
|
|
|
|
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,
otype=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). |
|
|
|
|
setRandom(self)
Set the active columns of the BV to random numbers. |
|
|
|
|
|
|
|
setRandomCond(self,
condn)
Set the columns of a BV to random numbers, in a way that the generated
matrix has a given condition number. |
|
|
|
|
setRandomContext(self,
Random rnd)
Sets the PETSc.Random object associated with the BV, to be used
in operations that need random numbers. |
|
|
|
|
setRandomNormal(self)
Set the active columns of the BV to random numbers (with normal
distribution). |
|
|
|
|
setRandomSign(self)
Set the entries of a BV to values 1 or -1 with equal probability. |
|
|
|
|
setSizes(self,
sizes,
m)
Sets the local and global sizes, and the number of columns. |
|
|
|
|
setSizesFromVec(self,
Vec w,
m)
Sets the local and global sizes, and the number of columns. |
|
|
|
|
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__,
appendOptionsPrefix,
compose,
decRef,
getAttr,
getClassId,
getClassName,
getComm,
getDict,
getName,
getRefCount,
getTabLevel,
incRef,
incrementTabLevel,
query,
setAttr,
setName,
setTabLevel,
stateGet,
stateIncrease,
stateSet,
viewFromOptions
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__init__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|