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

Method get_curfield_as_array

python/solver.py:432–440  ·  view source on GitHub ↗
(self, bloch_phase=True)

Source from the content-addressed store, hash-verified

430 )
431
432 def get_curfield_as_array(self, bloch_phase=True):
433 dims = self.mode_solver.get_dims()
434 arr = np.zeros(np.prod(dims))
435 self.mode_solver.get_curfield(arr)
436 arr = np.reshape(arr, dims)
437
438 return MPBArray(
439 arr, self.get_lattice(), self.current_k, bloch_phase=bloch_phase
440 )
441
442 def get_dpwr(self, band):
443 self.get_dfield(band, False)

Callers 5

get_epsilonMethod · 0.95
get_muMethod · 0.95
get_dpwrMethod · 0.95
get_bpwrMethod · 0.95
_create_h5_datasetMethod · 0.95

Calls 4

get_latticeMethod · 0.95
MPBArrayClass · 0.85
get_dimsMethod · 0.80
get_curfieldMethod · 0.80

Tested by

no test coverage detected