shortened

This commit is contained in:
Martin Diehl 2023-06-04 23:46:35 +02:00
parent 11c4be008f
commit 898aaf1068
1 changed files with 2 additions and 4 deletions

View File

@ -186,8 +186,6 @@ def displacement_fluct_point(size: _FloatSequence,
Fluctuating part of the cell center displacements. Fluctuating part of the cell center displacements.
""" """
integrator = 0.5j*_np.ones(3)/_np.pi
k_s = _ks(size,F.shape[:3],False) k_s = _ks(size,F.shape[:3],False)
k_s_squared = _np.einsum('...l,...l',k_s,k_s) k_s_squared = _np.einsum('...l,...l',k_s,k_s)
k_s_squared[0,0,0] = 1.0 k_s_squared[0,0,0] = 1.0
@ -195,7 +193,7 @@ def displacement_fluct_point(size: _FloatSequence,
displacement = -_np.einsum('ijkml,ijkl,l->ijkm', displacement = -_np.einsum('ijkml,ijkl,l->ijkm',
_np.fft.rfftn(F,axes=(0,1,2)), _np.fft.rfftn(F,axes=(0,1,2)),
k_s, k_s,
integrator, _np.array([0.5j/_np.pi]*3),
) / k_s_squared[...,_np.newaxis] ) / k_s_squared[...,_np.newaxis]
return _np.fft.irfftn(displacement,axes=(0,1,2),s=F.shape[:3]) return _np.fft.irfftn(displacement,axes=(0,1,2),s=F.shape[:3])