MCPcopy Create free account
hub / github.com/NanoComp/meep / get_force_data

Method get_force_data

python/simulation.py:3461–3472  ·  view source on GitHub ↗

Get the Fourier-transformed fields corresponding to the given force object as a `ForceData`, which is just a named tuple of NumPy arrays. Note that this object is only useful for passing to `load_force_data` below and should be considered opaque.

(self, force)

Source from the content-addressed store, hash-verified

3459 force.scale_dfts(-1.0)
3460
3461 def get_force_data(self, force):
3462 """
3463 Get the Fourier-transformed fields corresponding to the given force object as a
3464 `ForceData`, which is just a named tuple of NumPy arrays. Note that this object is
3465 only useful for passing to `load_force_data` below and should be considered
3466 opaque.
3467 """
3468 return ForceData(
3469 offdiag1=self.get_dft_data(force.offdiag1),
3470 offdiag2=self.get_dft_data(force.offdiag2),
3471 diag=self.get_dft_data(force.diag),
3472 )
3473
3474 def load_force_data(self, force, fdata):
3475 """

Callers 1

test_forceMethod · 0.95

Calls 1

get_dft_dataMethod · 0.95

Tested by 1

test_forceMethod · 0.76