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

Method output_components

python/simulation.py:3864–3885  ·  view source on GitHub ↗
(self, fname, *components)

Source from the content-addressed store, hash-verified

3862 self.output_h5_hook(nm)
3863
3864 def output_components(self, fname, *components):
3865 if self.fields is None:
3866 raise RuntimeError(
3867 "Fields must be initialized before calling output_component"
3868 )
3869
3870 if self.output_append_h5 is None:
3871 f = self.fields.open_h5file(
3872 fname, mp.h5file.WRITE, self.get_filename_prefix(), True
3873 )
3874 else:
3875 f = None
3876
3877 for c in components:
3878 self.output_component(c, h5file=f)
3879 if self.output_append_h5 is None:
3880 f.prevent_deadlock()
3881
3882 if self.output_append_h5 is None:
3883 self.output_h5_hook(
3884 self.fields.h5file_name(fname, self.get_filename_prefix(), True)
3885 )
3886
3887 def h5topng(self, rm_h5, option, *step_funcs):
3888 opts = f"h5topng {option}"

Callers 6

output_hfieldFunction · 0.80
output_bfieldFunction · 0.80
output_efieldFunction · 0.80
output_dfieldFunction · 0.80
output_poyntingFunction · 0.80
output_sfieldFunction · 0.80

Calls 5

get_filename_prefixMethod · 0.95
output_componentMethod · 0.95
open_h5fileMethod · 0.80
prevent_deadlockMethod · 0.80
h5file_nameMethod · 0.80

Tested by

no test coverage detected