Commit c1540de9 authored by John Tourtellott's avatar John Tourtellott
Browse files

Fix writer for ThermoElastic simulation

parent 3a4763af
......@@ -189,7 +189,8 @@ def ExportCMB(export_op):
'tem3p-structure': 'TEM3P Structural Static',
'tem3p-harmonic': 'TEM3P Harmonic Response',
'tem3p-thermal-linear': 'TEM3P Thermal Linear',
'tem3p-thermal-nonlinear': 'TEM3P Thermal Nonlinear'
'tem3p-thermal-nonlinear': 'TEM3P Thermal Nonlinear',
'tem3p-thermo-elastic': 'TEM3P ThermoElastic'
}
# Loop over all solvers and write corresponding files
......@@ -197,9 +198,6 @@ def ExportCMB(export_op):
if solver == 'acdtool':
completed = True
break
# Hack/workaround for typo in export template
if solver == 'temp3p-thermal-nonlinear':
solver = 'tem3p-thermal-nonlinear'
# Get full analysis name
analysis = analysis_lookup.get(solver)
......@@ -221,7 +219,8 @@ def ExportCMB(export_op):
'tem3p-structure': 'tem3p',
'tem3p-harmonic': 'tem3p',
'tem3p-thermal-linear': 'tem3p',
'tem3p-thermal-nonlinear': 'tem3p'
'tem3p-thermal-nonlinear': 'tem3p',
'tem3p-thermo-elastic': 'tem3p'
}
file_ext = extension_lookup.get(solver, solver)
filename = '%s.%s' % (scope.output_file_prefix, file_ext)
......
......@@ -42,6 +42,7 @@
<Cat>TEM3P-Nonlinear-Thermal</Cat>
</Analysis>
<Analysis Type="TEM3P ThermoElastic">
<Cat>TEM3P-Elastic</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Analysis>
</Analyses>
......
......@@ -58,7 +58,7 @@ class Tem3PWriter(basewriter.BaseWriter):
self.finish_command(indent='')
# Write thermal section
categories = scope.sim_atts.analysisCategories('TEM3P Thermal Nonlinear')
categories = scope.sim_atts.analyses().find('TEM3P Thermal Nonlinear').categories()
scope.categories = list(categories)
print('Using categories: %s' % scope.categories)
self.solver = 'tem3p-thermal-nonlinear'
......@@ -66,7 +66,7 @@ class Tem3PWriter(basewriter.BaseWriter):
self.write_command()
# Write elastic section
categories = scope.sim_atts.analysisCategories('TEM3P Elastic')
categories = scope.sim_atts.analyses().find('TEM3P Elastic').categories()
scope.categories = list(categories)
self.solver = 'tem3p-elastic'
self.name_prefix = 'Elastic'
......@@ -272,7 +272,7 @@ class Tem3PWriter(basewriter.BaseWriter):
for att in att_list:
# Filter by cateogry
if not utils.passes_categories(att, scope.categories):
if not utils.passes_categories(att, self.scope.categories):
continue
att_type = att.type()
......@@ -315,7 +315,12 @@ class Tem3PWriter(basewriter.BaseWriter):
CardFormat('MixedValue').write(self.scope, att, indent=' ')
else:
# Other types can use default handling
skip_list = ['PlaceHolder', 'NonlinearConvectiveSurface', 'SurfaceResistance']
skip_list = [
'NERSCDirectory',
'NonlinearConvectiveSurface',
'PlaceHolder',
'SurfaceResistance'
]
self.write_standard_items(att, skip_list=skip_list, keyword_table=keyword_table)
# Special cases:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment