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

Method output_component

python/simulation.py:3832–3862  ·  view source on GitHub ↗
(self, c, h5file=None, frequency=0)

Source from the content-addressed store, hash-verified

3830 return stuff
3831
3832 def output_component(self, c, h5file=None, frequency=0):
3833 if self.fields is None:
3834 raise RuntimeError(
3835 "Fields must be initialized before calling output_component"
3836 )
3837
3838 vol = (
3839 self.fields.total_volume()
3840 if self.output_volume is None
3841 else self.output_volume
3842 )
3843 h5 = self.output_append_h5 if h5file is None else h5file
3844 append = h5file is None and self.output_append_h5 is not None
3845
3846 self.fields.output_hdf5(
3847 c,
3848 vol,
3849 h5,
3850 append,
3851 self.output_single_precision,
3852 self.get_filename_prefix(),
3853 frequency,
3854 )
3855
3856 if h5file is None:
3857 nm = self.fields.h5file_name(
3858 mp.component_name(c), self.get_filename_prefix(), True
3859 )
3860 if c == mp.Dielectric:
3861 self.last_eps_filename = nm
3862 self.output_h5_hook(nm)
3863
3864 def output_components(self, fname, *components):
3865 if self.fields is None:

Callers 15

output_componentsMethod · 0.95
_output_pngFunction · 0.80
output_epsilonFunction · 0.80
output_muFunction · 0.80
output_hpwrFunction · 0.80
output_dpwrFunction · 0.80
output_tot_pwrFunction · 0.80
output_hfield_xFunction · 0.80
output_hfield_yFunction · 0.80
output_hfield_zFunction · 0.80
output_hfield_rFunction · 0.80
output_hfield_pFunction · 0.80

Calls 4

get_filename_prefixMethod · 0.95
total_volumeMethod · 0.80
output_hdf5Method · 0.80
h5file_nameMethod · 0.80

Tested by

no test coverage detected