Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit bf610596 authored by Camilla Dodge Koslowsky Harris's avatar Camilla Dodge Koslowsky Harris
Browse files

Added rectprism points and some improvements to the file name generation

parent 4df4dbc9
......@@ -125,8 +125,23 @@ def _rectprism_geometry(geometry_params: dict) -> dict:
npoints = (geometry_params['npoints'][0]
* geometry_params['npoints'][1]
* geometry_params['npoints'][2])
vals = []
for dim in range(3):
minval = (geometry_params['center'][dim]
- geometry_params['halfwidths'][dim])
maxval = (geometry_params['center'][dim]
+ geometry_params['halfwidths'][dim])
xvals, yvals, zvals = np.meshgrid(vals[0], vals[1], vals[2])
geometry_points = {
'npoints': npoints
'npoints': npoints,
'X': xvals.flatten(),
'Y': yvals.flatten(),
'Z': zvals.flatten(),
return geometry_points
......@@ -425,17 +440,22 @@ def tecplot_interpolate(
## construct default filename
no_file_name = False
if filename is None:
no_file_name = True
filename = tecplot_plt_file_path[:-4] + f'_{geometry_params["kind"]}'
## save zone
if 'hdf5' in write_as:
if no_file_name:
filename += '.h5'
elif 'csv' in write_as:
if no_file_name:
filename += '.csv'
elif 'tecplot_ascii' in write_as:
if no_file_name:
filename += '.dat'
......@@ -444,6 +464,7 @@ def tecplot_interpolate(
, use_point_format=True
elif 'tecplot_plt' in write_as:
if no_file_name:
filename += '.plt'
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