We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a BlockLinearOperator with at least one block that is not a ZeroOperator is summed with a ZeroOperator, the following error appears:
BlockLinearOperator
ZeroOperator
'ZeroOperator' object has no attribute 'set_backend' File "/psydac/psydac/linalg/block.py", line 1257, in set_backend b.set_backend(backend)
With the inverse order (summing ZeroOperator + BlockLinearOperator) there is no error.
The text was updated successfully, but these errors were encountered:
Minimal example:
from sympde.topology import Cube, Derham, elements_of from sympde.calculus import dot from sympde.expr import integral, BilinearForm from psydac.api.discretization import discretize from psydac.api.settings import PSYDAC_BACKENDS from psydac.linalg.utilities import array_to_psydac from psydac.linalg.block import BlockLinearOperator, BlockVector, BlockVectorSpace from psydac.linalg.basic import IdentityOperator, ZeroOperator domain = Cube() derham = Derham(domain) domain_h = discretize(domain, ncells=[5,5,5], periodic=[False, False, False], comm=None) derham_h = discretize(derham, domain_h, degree=[1,1,1]) E, F = elements_of(derham.V1, names='E, F') m1 = BilinearForm((E, F), integral(domain, dot(E, F))) M1 = discretize(m1, domain_h, (derham_h.V1, derham_h.V1), backend=PSYDAC_BACKENDS['pyccel-gcc']).assemble() V1xV1_h_vector_space = BlockVectorSpace(derham_h.V1.vector_space, derham_h.V1.vector_space) Z1 = ZeroOperator(derham_h.V1.vector_space, derham_h.V1.vector_space) op1 = BlockLinearOperator(V1xV1_h_vector_space, V1xV1_h_vector_space, blocks=[[Z1, Z1], [Z1, Z1 + M1]]) #passes op2 = BlockLinearOperator(V1xV1_h_vector_space, V1xV1_h_vector_space, blocks=[[Z1, Z1], [Z1, M1 + Z1]]) #fails
Sorry, something went wrong.
jowezarek
Successfully merging a pull request may close this issue.
When a
BlockLinearOperator
with at least one block that is not aZeroOperator
is summed with aZeroOperator
, the following error appears:With the inverse order (summing
ZeroOperator
+BlockLinearOperator
) there is no error.The text was updated successfully, but these errors were encountered: