Commit 3a2978cd authored by John Tourtellott's avatar John Tourtellott

Update AdH writer to current SMTK mesh-export API

Now smtk.io.exportMesh()
Also removed redundant call in shallow-water script
parent 30d5a0be
......@@ -57,7 +57,7 @@ def ExportCMB(spec):
'''
#print 'Enter ExportCMB()'
# Run *surface* water exporter to generate 2D bc file
# Run *surface* water exporter to generate .2dm and .bc output files
ok = AdHSurfaceWater.ExportCMB(spec)
if not ok:
print 'ERROR writing 2D boundary condition file -- exiting'
......@@ -108,22 +108,6 @@ def ExportCMB(spec):
else:
export_spec_att = att_list[0]
# Write mesh file
if scope.mesh_collection is None:
print 'WARNING: No mesh collection; cannot write .2dm file'
else:
mesh_filename = scope.output_filebase + '.2dm'
mesh_path = os.path.join(scope.output_directory, mesh_filename)
print 'Writing mesh data to', mesh_path
mesh_writer = smtk.io.MeshExport2DM()
status = mesh_writer.write(
scope.mesh_collection,
scope.model.manager(),
scope.matid_property_name,
mesh_path)
print 'mesh write returned status', status
# Copy host start file to output directory if specified
hotstart_file = '%s.hot' % scope.output_filebase
hotstart_path = os.path.join(scope.output_directory, hotstart_file)
......
......@@ -161,12 +161,11 @@ def ExportCMB(spec):
mesh_filename = scope.output_filebase + '.2dm'
mesh_path = os.path.join(scope.output_directory, mesh_filename)
print 'Writing mesh data to', mesh_path
mesh_writer = smtk.io.MeshExport2DM()
status = mesh_writer.write(
status = smtk.io.exportMesh(
mesh_path,
scope.mesh_collection,
scope.model.manager(),
scope.matid_property_name,
mesh_path)
scope.matid_property_name)
print 'mesh write returned status', status
# Open output file and start exporting content
......
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