Skip to content

s_write_intf_data_file uses wrong loop index for distance check #1212

Description

@sbryngelson

Bug

In `src/post_process/m_data_output.fpp`, the subroutine `s_write_intf_data_file` has multiple issues in the distance-finding loop:

  1. Uses stale loop variable `i` from a previous loop instead of the inner loop variable for Euclidean distance computation
  2. Computes `euc_d` outside the inner search loop, so it never updates as the loop iterates
  3. Uses `cycle` instead of `exit` when a match is found, continuing to search instead of stopping

File: `src/post_process/m_data_output.fpp`

Impact: The interface data file writer finds the wrong closest point for each interface location, producing incorrect interface data output.

Severity: High — interface data output contains wrong distance/location values.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or doesn't seem right

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions