factor out omega**2 terms
This commit is contained in:
parent
204afb8024
commit
8c8f9f6e69
1 changed files with 4 additions and 2 deletions
|
|
@ -70,9 +70,11 @@ def cylindrical_operator(omega: complex,
|
|||
b1 = Dby @ Ty @ Dfx
|
||||
|
||||
diag = sparse.block_diag
|
||||
op = (omega**2 * diag((Tx, Ty)) + pa) @ diag((a0, a1)) + \
|
||||
- (sparse.bmat(((None, Ty), (Tx, None))) + omega**-2 * pb) @ diag((b0, b1))
|
||||
|
||||
omega2 = omega * omega
|
||||
|
||||
op = (omega2 * diag((Tx, Ty)) + pa) @ diag((a0, a1)) + \
|
||||
- (sparse.bmat(((None, Ty), (Tx, None))) + pb / omega2) @ diag((b0, b1))
|
||||
return op
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue