mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
fixed issue in exporting mgxs to excel
This commit is contained in:
parent
3a6d2b1aee
commit
19b5faa449
2 changed files with 8 additions and 4 deletions
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue