Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add num_cells variable to write_attributes() function for SGrids #49

Merged

Conversation

Siimeloni
Copy link
Contributor

Like described in this Issue, the variable num_cells contained a constant 1, which led to problems when writing attributes to a vtk file. The value is now calculated using the dimensions of the SGrid.

The value is necessary because it is written to the line

CELL_DATA <value>

of the vtk file, which ParaView uses to get the count of attribute values when loading a file. The value has to be equal to the cell count of the SGrid.

The variable contained a constant 1, which led to problems when writing attributes to a vtk file. The value is now calculated using the dimensions of the SGrid.
@Siimeloni Siimeloni force-pushed the Siimeloni-patch-cell-data-count branch from 9a78231 to a8e2489 Compare August 27, 2024 07:33
@SwishSwushPow
Copy link

Since I will be tackling this PR from now on I just wanted to chime in and ask if there are any other changes required to get this merged. :)

@elrnv elrnv merged commit c4feb50 into elrnv:master Sep 4, 2024
1 check passed
@elrnv
Copy link
Owner

elrnv commented Sep 4, 2024

Nope, this great! Thank you @Siimeloni for this PR and @MrMuetze for the ping!
Fixes #48

@SwishSwushPow SwishSwushPow deleted the Siimeloni-patch-cell-data-count branch September 6, 2024 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants