diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index 3675571584..50d568a2d2 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -279,8 +279,9 @@ class Library(object): elif self.domain_type == 'mesh': cv.check_iterable_type('domain', domains, openmc.Mesh) - # The mesh and geometry are independent, so just return - return + # The mesh and geometry are independent, so set all_domains + # to the input domains + all_domains = domains else: raise ValueError('Unable to set domains with domain ' 'type "{}"'.format(self.domain_type)) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 0dadab38ab..271a78246f 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1192,7 +1192,7 @@ class MGXS(object): # Loop over all subdomains for subdomain in subdomains: - if self.domain_type == 'distribcell': + if self.domain_type == 'distribcell' or self.domain_type == 'mesh': string += '{0: <16}=\t{1}\n'.format('\tSubdomain', subdomain) # Loop over all Nuclides @@ -1407,7 +1407,10 @@ class MGXS(object): if format == 'csv': df.to_csv(filename + '.csv', index=False) elif format == 'excel': - df.to_excel(filename + '.xls', index=False) + if self.domain_type == 'mesh': + df.to_excel(filename + '.xls') + else: + df.to_excel(filename + '.xls', index=False) elif format == 'pickle': df.to_pickle(filename + '.pkl') elif format == 'latex':