(self, c, h5file=None, frequency=0)
| 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: |
no test coverage detected