Compare commits

...

5 Commits
spar ... master

@ -41,14 +41,15 @@ solver will need the ability to solve complex symmetric (non-Hermitian)
linear systems, ideally with double precision.
- [Source repository](https://mpxd.net/code/jan/meanas)
- PyPI *TBD*
- [PyPI](https://pypi.org/project/meanas)
- [Github mirror](https://github.com/anewusername/meanas)
## Installation
**Requirements:**
* python >=3.8
* python >=3.11
* numpy
* scipy

@ -6,7 +6,7 @@ See the readme or `import meanas; help(meanas)` for more info.
import pathlib
__version__ = '0.8'
__version__ = '0.9'
__author__ = 'Jan Petykiewicz'

@ -200,7 +200,7 @@ def poynting_e_cross_h(dxes: dx_lists_t) -> Callable[[cfdfield_t, cfdfield_t], c
Note:
If `E` and `H` are peak amplitudes as assumed elsewhere in this code,
the time-average of the poynting vector is `<S> = Re(S)/2 = Re(E x H) / 2`.
the time-average of the poynting vector is `<S> = Re(S)/2 = Re(E x H*) / 2`.
The factor of `1/2` can be omitted if root-mean-square quantities are used
instead.

@ -324,6 +324,7 @@ def poynting_e_cross(e: vcfdfield_t, dxes: dx_lists_t) -> sparse.spmatrix:
fx, fy, fz = [shift_circ(i, shape, 1) for i in range(3)]
dxag = [dx.ravel(order='C') for dx in numpy.meshgrid(*dxes[0], indexing='ij')]
dxbg = [dx.ravel(order='C') for dx in numpy.meshgrid(*dxes[1], indexing='ij')]
Ex, Ey, Ez = [ei * da for ei, da in zip(numpy.split(e, 3), dxag)]
block_diags = [[ None, fx @ -Ez, fx @ Ey],
@ -331,7 +332,7 @@ def poynting_e_cross(e: vcfdfield_t, dxes: dx_lists_t) -> sparse.spmatrix:
[ fz @ -Ey, fz @ Ex, None]]
block_matrix = sparse.bmat([[sparse.diags(x) if x is not None else None for x in row]
for row in block_diags])
P = block_matrix @ sparse.diags(numpy.concatenate(dxag))
P = block_matrix @ sparse.diags(numpy.concatenate(dxbg))
return P

@ -33,7 +33,7 @@ classifiers = [
"License :: OSI Approved :: GNU Affero General Public License v3",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.8"
requires-python = ">=3.11"
include = [
"LICENSE.md"
]

Loading…
Cancel
Save