Skip to content

Fix issues with jorek2vtk - #43

Merged
matthiashoelzl merged 2 commits into
iterorganization:developfrom
ovarley1:feature/jorek2vtk_stel_fix
Sep 29, 2026
Merged

matthiashoelzl merged 2 commits into
iterorganization:developfrom
ovarley1:feature/jorek2vtk_stel_fix

Conversation

@ovarley1

Copy link
Copy Markdown
Collaborator

I started getting errors when running jorek2vtk which this fixes.
Basically, in mod_element_rtree, with a stellarator model, line 14 sets ND to 3, lines 156 and 157 allocates 3 components for min/max_vals, but only the first two were initialised. Therefore, it was just filled from the heap and if you're unlucky, you get errors. This PR initialises the extra slot even though it's not used in the 2D rtree.
Maybe a more elegant fix would be to get rid of this phi slot when "use_3D" is not set, but I think you'd have to get access to this "use_3D" parameter right at line 14 where ND is set - maybe someone else knows a better way to do this?

@matthiashoelzl matthiashoelzl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@matthiashoelzl
matthiashoelzl merged commit 66489c9 into iterorganization:develop Sep 29, 2026
4 checks passed
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.

5 participants