You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Projectors of Hcurl and Hdiv do not work when using a complex underlying field. A work-around is to declare a deRham sequence with underlying real field, project lambda function and save coefficients of the real and imaginary part separately to a file and rerun simulation with loaded coefficients.
Error in line 199 of psydac/linalg/direct_solvers.py : out[:] = self._splu.solve(rhs.T, trans='T' if transposed else 'N').T
Message:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/elena-hp/psydac/psydac/feec/global_projectors.py", line 437, in __call__
return super().__call__(fun)
File "/home/elena-hp/psydac/psydac/feec/global_projectors.py", line 312, in __call__
coeffs = self._solver.dot(self._rhs)
File "/home/elena-hp/psydac/psydac/linalg/block.py", line 655, in dot
self._func(self._blocks_as_args, v, out, **self._args)
File "/home/elena-hp/psydac/psydac/linalg/block.py", line 672, in _dot
out[i] += Lij.dot(v[j], out=inc[i])
File "/home/elena-hp/psydac/psydac/linalg/kron.py", line 539, in dot
return self.solve(v, out=out)
File "/home/elena-hp/psydac/psydac/linalg/kron.py", line 567, in solve
self._solve_nd(inslice, outslice)
File "/home/elena-hp/psydac/psydac/linalg/kron.py", line 585, in _solve_nd
self._solver_passes[i].solve_pass(temp1, temp2)
File "/home/elena-hp/psydac/psydac/linalg/kron.py", line 681, in solve_pass
self._solver.solve(view, out=view)
File "/home/elena-hp/psydac/psydac/linalg/direct_solvers.py", line 199, in solve
out[:] = self._splu.solve(rhs.T, trans='T' if transposed else 'N').T
TypeError: Cannot cast array data from dtype('complex128') to dtype('float64') according to the rule 'safe'
out and rhs both have dtype 'complex128', but the L, U matrices from the LU decomposition have the dtype 'float64' (because the matrix of which the decomposition is computed is also dtype 'float64' ).
The text was updated successfully, but these errors were encountered:
Projectors of Hcurl and Hdiv do not work when using a complex underlying field. A work-around is to declare a deRham sequence with underlying real field, project lambda function and save coefficients of the real and imaginary part separately to a file and rerun simulation with loaded coefficients.
Minimal example (analogous for
Projector_Hdiv
):Error in line 199 of
psydac/linalg/direct_solvers.py
:out[:] = self._splu.solve(rhs.T, trans='T' if transposed else 'N').T
Message:
out
andrhs
both havedtype 'complex128'
, but the L, U matrices from the LU decomposition have thedtype 'float64'
(because the matrix of which the decomposition is computed is alsodtype 'float64'
).The text was updated successfully, but these errors were encountered: