Skip to content

Commit

Permalink
Fix vertex resolution in partitioner and joiner (#180)
Browse files Browse the repository at this point in the history
* Set vertex resolution in partitioner/joiner to double

* Fix second occurrence in mesh joiner
  • Loading branch information
davidscn authored Oct 30, 2023
1 parent d26499d commit 278fd5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/precice-aste-join
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class MeshJoiner:
logger.info("Starting partition-wise mesh merge")
joined_mesh = vtk.vtkUnstructuredGrid()
joined_points = vtk.vtkPoints()
joined_points.SetDataTypeToDouble()
joined_data_arrays = None
joined_cells = vtk.vtkCellArray()
joined_cell_types = []
Expand Down Expand Up @@ -231,6 +232,7 @@ class MeshJoiner:
# Initialize Joined Mesh
joined_mesh = vtk.vtkUnstructuredGrid()
joined_points = vtk.vtkPoints()
joined_points.SetDataTypeToDouble()
joined_points.SetNumberOfPoints(size)
joined_data_arrays = None
joined_cells = vtk.vtkCellArray()
Expand Down
1 change: 1 addition & 0 deletions src/precice-aste-partition
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ class MeshPartitioner:

vtk_grid = vtk.vtkUnstructuredGrid()
vtkpoints = vtk.vtkPoints()
vtkpoints.SetDataTypeToDouble()
vtkpoints.SetNumberOfPoints(len(points))
for id, point in enumerate(points):
vtkpoints.SetPoint(id, point)
Expand Down

0 comments on commit 278fd5b

Please sign in to comment.