Skip to content

Conversation

@andrew-platt
Copy link
Collaborator

Ready to merge

Feature or improvement description
Old behavior: fatal error if outside grid
New behavior: skip that slice, keep number of slices the same as input file request
How: new array of logicals for valid slice. Cycle on invalid slices

Related issue, if one exists
#2951

Impacted areas of the software
FAST.Farm vtk slice writing only

Additional supporting information
With terrain, it gets a little less obvious if a requested slice is actually valid during preliminary setup. @rthedin requested this feature.

Test results, if applicable
No test results change

Old behavior: fatal error if outside grid
New behavior: skip that slice, keep number of slices the same as input file request
How: new array of logicals for `valid` slice.  Cycle on invalid slices
Copy link
Contributor

Copilot AI left a comment

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 modifies FAST.Farm's VTK slice writing functionality to gracefully handle invalid slice requests instead of causing fatal errors. When terrain is present, it becomes less obvious during setup whether a requested slice location is valid within the grid boundaries.

Key changes:

  • Adds validity tracking arrays for each slice type (XY, YZ, XZ planes)
  • Changes fatal errors to warnings when slices fall outside the grid
  • Implements slice skipping logic during output generation

Reviewed Changes

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

File Description
AWAE_Types.f90 Adds three new boolean arrays to track slice validity and implements corresponding memory management
AWAE_Registry.txt Registers the new validity tracking arrays in the parameter type definitions
AWAE.f90 Implements validation logic during initialization and skip logic during output generation

Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

I approve of this change after you fix the comment Copilot noted is in error (Change XZ to YZ).

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this typo!

@andrew-platt andrew-platt merged commit 6b8aa05 into OpenFAST:dev Aug 11, 2025
12 checks passed
@andrew-platt andrew-platt deleted the f/FF_SkipInvalidOutPlanes branch August 12, 2025 16:24
@andrew-platt andrew-platt mentioned this pull request Jan 23, 2026
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants