feec.multipatch.fem_linear_operators#

Classes#

Inheritance diagram of psydac.feec.multipatch.fem_linear_operators

ComposedLinearOperator(operators)

operator L = L_1 .

FemLinearOperator([fem_domain, ...])

Linear operators with an additional Fem layer

IdLinearOperator(V)

MultLinearOperator(c, A)

SumLinearOperator(B, A)

Details#

class FemLinearOperator(fem_domain=None, fem_codomain=None, matrix=None, sparse_matrix=None)[source]#

Bases: LinearOperator

Linear operators with an additional Fem layer

property domain#

The domain of the linear operator - an element of Vectorspace

property codomain#

The codomain of the linear operator - an element of Vectorspace

property fem_domain#
property fem_codomain#
property matrix#
property T#

Calls transpose method to return the transpose of self.

property dtype#

The data type of the coefficients of the linear operator, upon convertion to matrix.

toarray()[source]#

Convert to Numpy 2D array.

tosparse()[source]#

Convert to a sparse matrix in any of the formats supported by scipy.sparse.

transpose(conjugate=False)[source]#

Transpose the LinearOperator .

If conjugate is True, return the Hermitian transpose.

to_sparse_matrix(**kwargs)[source]#
dot(f_coeffs, out=None)[source]#

Apply the LinearOperator self to the Vector v.

The result is written to the Vector out, if provided.

Parameters:
vVector

The vector to which the linear operator (self) is applied. It must belong to the domain of self.

outVector

The vector in which the result of the operation is stored. It must belong to the codomain of self. If out is None, a new vector is created and returned.

Returns:
Vector

The result of the operation. If out is None, a new vector is returned. Otherwise, the result is stored in out and out is returned.

class ComposedLinearOperator(operators)[source]#

Bases: FemLinearOperator

operator L = L_1 .. L_n with L_i = self._operators[i-1] (so, the last one is applied first, like in a product)

to_sparse_matrix(**kwargs)[source]#
dot(f_coeffs, out=None)[source]#

Apply the LinearOperator self to the Vector v.

The result is written to the Vector out, if provided.

Parameters:
vVector

The vector to which the linear operator (self) is applied. It must belong to the domain of self.

outVector

The vector in which the result of the operation is stored. It must belong to the codomain of self. If out is None, a new vector is created and returned.

Returns:
Vector

The result of the operation. If out is None, a new vector is returned. Otherwise, the result is stored in out and out is returned.

class IdLinearOperator(V)[source]#

Bases: FemLinearOperator

to_sparse_matrix(**kwargs)[source]#
dot(f_coeffs, out=None)[source]#

Apply the LinearOperator self to the Vector v.

The result is written to the Vector out, if provided.

Parameters:
vVector

The vector to which the linear operator (self) is applied. It must belong to the domain of self.

outVector

The vector in which the result of the operation is stored. It must belong to the codomain of self. If out is None, a new vector is created and returned.

Returns:
Vector

The result of the operation. If out is None, a new vector is returned. Otherwise, the result is stored in out and out is returned.

class SumLinearOperator(B, A)[source]#

Bases: FemLinearOperator

to_sparse_matrix(**kwargs)[source]#
dot(f_coeffs, out=None)[source]#

Apply the LinearOperator self to the Vector v.

The result is written to the Vector out, if provided.

Parameters:
vVector

The vector to which the linear operator (self) is applied. It must belong to the domain of self.

outVector

The vector in which the result of the operation is stored. It must belong to the codomain of self. If out is None, a new vector is created and returned.

Returns:
Vector

The result of the operation. If out is None, a new vector is returned. Otherwise, the result is stored in out and out is returned.

class MultLinearOperator(c, A)[source]#

Bases: FemLinearOperator

to_sparse_matrix(**kwargs)[source]#
dot(f_coeffs, out=None)[source]#

Apply the LinearOperator self to the Vector v.

The result is written to the Vector out, if provided.

Parameters:
vVector

The vector to which the linear operator (self) is applied. It must belong to the domain of self.

outVector

The vector in which the result of the operation is stored. It must belong to the codomain of self. If out is None, a new vector is created and returned.

Returns:
Vector

The result of the operation. If out is None, a new vector is returned. Otherwise, the result is stored in out and out is returned.