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

write_surf flag + surf2paraview #464

Closed
aborner1 opened this issue Mar 19, 2024 · 4 comments · Fixed by #499
Closed

write_surf flag + surf2paraview #464

aborner1 opened this issue Mar 19, 2024 · 4 comments · Fixed by #499
Labels
enhancement New feature or request paraview

Comments

@aborner1
Copy link
Contributor

Summary

If the "write_surf" command is used with the "type" flag, then surf2paraview fails.

Type of Issue

Bug Report

SPARTA Version

Current master

Expected Behavior (Bug Report)

surf2paraview.py should be general enough to detect whether there is an additional integer (the surface element type) and discard it.

Actual Behavior (Bug Report)

Surf2paraview returns an error due to one too many integers.

Error reading SPARTA surf input file
Triangles or Lines section contains bad line:  1 1 1 2 3

Steps to Reproduce (Bug Report)

Read any input file in an example (let's say, sphere), then write it, with the "type" flag turned on. Then try and postprocess the surface with surf2paraview.

Further Information, Files, and Links

This is a very old bug. The recent addition of the "type" flag in "write_surf" actually provided a way to avoid the error, but, for years, I have a carried a modified version of surf2paraview for surface files written out by SPARTA.

@stanmoore1
Copy link
Contributor

@aborner1 thanks for the bug report. @tjotaha can you take a look?

@mgallis
Copy link

mgallis commented Mar 20, 2024 via email

@aborner1
Copy link
Contributor Author

Stan, This is not a bug. When surface grouping was introduced, write_surf started reporting the group number in an extra column. Information about surface grouping is not needed in paraview but you do need it if you read in the surface back into Sparta. You can easily remove it manually, or make writing the group number optional, depending on the intended use. Michael. From: Stan Moore @.> Date: Tuesday, March 19, 2024 at 5:31 PM To: sparta/sparta @.> Cc: Subscribed @.> Subject: [EXTERNAL] Re: [sparta/sparta] write_surf flag + surf2paraview (Issue #464) @aborner1https://github.com/aborner1 thanks for the bug report. @tjotahahttps://github.com/tjotaha can you take a look? — Reply to this email directly, view it on GitHub<#464 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGNMZQJGMFQRHT7BOF7LGLYZDDEDAVCNFSM6AAAAABE6PNTSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYGMZTSNZZHA. You are receiving this because you are subscribed to this thread.Message ID: @.>

Michael - I agree this is not a bug per se in SPARTA, but perhaps surf2paraview can be adapted to be more flexible and read both files? I have been asked by several SPARTA users over the years why surf2paraview was failing.

@stanmoore1 stanmoore1 added the enhancement New feature or request label Apr 23, 2024
@stanmoore1 stanmoore1 assigned stanmoore1 and unassigned stanmoore1 Apr 23, 2024
@stanmoore1
Copy link
Contributor

@tjotaha

tjotaha added a commit to tjotaha/sparta that referenced this issue Jul 15, 2024
Fixes issue when write_surf is used with the type flag,
causing surf2paraview to fail with a parse error. Fix
changes surf2paraview to read 2D and 3D surface files with
or without the type field.
stanmoore1 added a commit that referenced this issue Jul 16, 2024
…sue_464

Fix for issue #464 (write_surf flag and surf2paraview)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request paraview
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants