Skip to content

fix: nodal coordinates export - #3

Merged
jacksongomesdasilva merged 3 commits into
mainfrom
fix/boundary-export-time-dependent-nodal-coordinates
Aug 25, 2026
Merged

jacksongomesdasilva merged 3 commits into
mainfrom
fix/boundary-export-time-dependent-nodal-coordinates

Conversation

@jacksongomesdasilva

Copy link
Copy Markdown
Collaborator

Exports nodal coordinates at each time step instead of static raw points, keeping coordinates consistent with the exported boundary properties.

@jacksongomesdasilva jacksongomesdasilva linked an issue Aug 20, 2026 that may be closed by this pull request
2 tasks
@jacksongomesdasilva jacksongomesdasilva self-assigned this Aug 20, 2026
@jacksongomesdasilva jacksongomesdasilva added the bug Something isn't working label Aug 20, 2026
@jacksongomesdasilva
jacksongomesdasilva requested a lite review from Copilot and removed request for fmkroetz August 20, 2026 18:29
@jacksongomesdasilva
jacksongomesdasilva enabled auto-merge (squash) August 20, 2026 18:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the boundary-information export so that nodal coordinates are exported per time step (using nodal coordinate grid functions) rather than using static raw geometry points, keeping coordinates aligned with other time-dependent boundary properties.

Changes:

  • Switched nodal coordinate export from GetRawPoints() to time-step-aware "Coordinate : Nodal : X/Y/Z" grid functions.
  • Updated the inline comment to reflect time-step-based coordinates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/script_export_boundary_information.py Outdated
@jacksongomesdasilva
jacksongomesdasilva requested a lite review from Copilot August 20, 2026 18:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

scripts/script_export_boundary_information.py:71

  • number_of_nodes is taken from geometry.GetNumberOfNodes() (no time_step), but the coordinate arrays are fetched per time step. If the node count ever differs per time step (or if the coordinate grid functions return a different-length array), the reshape((number_of_nodes, 3)) will raise at runtime or silently misalign IDs/coordinates. Prefer deriving the count from the coordinate arrays (and optionally validating lengths) and avoid the redundant reshape.
    number_of_nodes = geometry.GetNumberOfNodes()
    x = geometry.GetGridFunction("Coordinate : Nodal : X").GetArray(time_step=time_step)
    y = geometry.GetGridFunction("Coordinate : Nodal : Y").GetArray(time_step=time_step)
    z = geometry.GetGridFunction("Coordinate : Nodal : Z").GetArray(time_step=time_step)
    position_array = numpy.column_stack((x, y, z)).reshape((number_of_nodes, 3))

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jacksongomesdasilva
jacksongomesdasilva requested a lite review from Copilot August 20, 2026 18:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread scripts/script_export_boundary_information.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jacksongomesdasilva
jacksongomesdasilva requested a lite review from Copilot August 20, 2026 18:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

scripts/script_export_boundary_information.py:71

  • write_node_gf_for_timestep now unconditionally reads the "Coordinate : Nodal : X/Y/Z" grid functions. If a geometry doesn’t provide these grid functions, this will raise at runtime (even though the UI selection only filters/export grid functions that exist). Consider guarding with HasGridFunction(...) and falling back to raw points (previous behavior) or emitting a clear error.
    number_of_nodes = geometry.GetNumberOfNodes(time_step)
    x = geometry.GetGridFunction("Coordinate : Nodal : X").GetArray(time_step=time_step)
    y = geometry.GetGridFunction("Coordinate : Nodal : Y").GetArray(time_step=time_step)
    z = geometry.GetGridFunction("Coordinate : Nodal : Z").GetArray(time_step=time_step)
    position_array = numpy.column_stack((x, y, z)).reshape((number_of_nodes, 3))

@jacksongomesdasilva
jacksongomesdasilva merged commit 0f79e3a into main Aug 25, 2026
1 check passed
@jacksongomesdasilva
jacksongomesdasilva deleted the fix/boundary-export-time-dependent-nodal-coordinates branch September 14, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exported loads from Rocky appear on the wrong location

3 participants