# HG changeset patch # User greg # Date 1468335064 14400 # Node ID 114910538a37a1b03b02b2b7535a3fbdcb95ce91 # Parent 45ce63c33019480ae9054f01928023421264df8d Uploaded diff -r 45ce63c33019 -r 114910538a37 icqsol_add_surface_field_from_expression.py --- a/icqsol_add_surface_field_from_expression.py Fri Jul 08 10:34:38 2016 -0400 +++ b/icqsol_add_surface_field_from_expression.py Tue Jul 12 10:51:04 2016 -0400 @@ -37,10 +37,12 @@ args.max_edge_length, args.location) -# Write min/max field values. +# Write min/max field values and surface integral. for comp in range(len(time_points)): minVal, maxVal = shape_mgr.getFieldRange(vtk_poly_data, args.field_name, comp) - print 'component {2} min/max values of field {3}: {0}/{1}'.format(minVal, maxVal, comp, args.field_name) + surfIntegral = shape_mgr.integrateSurfaceField(vtk_poly_data, args.field_name, comp) + print 'component {2} min/max values of {3}: {0}/{1} surf integral: {4}'.format(minVal, maxVal, comp, args.field_name, surfIntegral) + # Define the output file format and type (the outpur_format can only be 'vtk'). output_format, output_file_type = icqsol_utils.get_format_and_type(args.output_vtk_type) tmp_output_path = icqsol_utils.get_temporary_file_path(tmp_dir, output_format) diff -r 45ce63c33019 -r 114910538a37 icqsol_utils.py --- a/icqsol_utils.py Fri Jul 08 10:34:38 2016 -0400 +++ b/icqsol_utils.py Tue Jul 12 10:51:04 2016 -0400 @@ -48,12 +48,7 @@ def get_shape_manager(format=None, dataset_type=None): # Instantiate a ShapeManager. - if format is None and dataset_type is None: - return ShapeManager() - if format == VTK: - return ShapeManager(file_format=format, vtk_dataset_type=dataset_type) - else: - return ShapeManager(file_format=format) + return ShapeManager(file_format=format, vtk_dataset_type=dataset_type) def get_temp_dir(prefix='tmp-vtk-', dir=None): diff -r 45ce63c33019 -r 114910538a37 tool_dependencies.xml --- a/tool_dependencies.xml Fri Jul 08 10:34:38 2016 -0400 +++ b/tool_dependencies.xml Tue Jul 12 10:51:04 2016 -0400 @@ -1,6 +1,6 @@ - +