Skip to content

probe-flow and extract-line fail when given negative x coordinates with short form of option -l #170

Description

@tigmarko

Hello!
I have been trying to extract stagnation line data from my solution and have run into an issue with the stagnation line being in the left half plane. I have found a workaround (see bottom), but it took some time to work out why it wasn't working with the -l format.

X coordinate

The case geometry is similar to that of the Phoebus Capsule example. The stagnation point is at (0.0,0.0), and the start of the domain is at (-0.06,0.0).
When any negative x coordinate is passed to either of the two commands, it is flipped to its absolute value. When e.g. (0.03,0.1) is passed, it works fine.

~/feeder$ lmr probe-flow -l "-0.06,0.0,0.0" -v -v -v -v -v
lmr probe-flow: Begin program.
lmr probe-flow: Probing flow field.
lmr probe-flow: Probing flow field for snapshot 0010.
---
snapshot: 0010
lmr probe-flow: Probing flow field at location [0.06,0,0]
pointdata:
  - x: -0.000299642
    y: 0.000419197
    z: nil
etc...

Y coordinate

While my flow domain doesn't include any of the lower half plane, I did try probing that region and the command worked as expected.

~/feeder$ lmr probe-flow -l "0.034319,-0.1,0.0" -v -v -v
lmr probe-flow: Begin program.
lmr probe-flow: Probing flow field.
lmr probe-flow: Probing flow field for snapshot 0010.
---
snapshot: 0010
lmr probe-flow: Probing flow field at location [0.034319,-0.1,0]
pointdata:
  - x: -0.000299642
    y: 0.000419197
    z: nil
etc...

This behaviour makes me wonder if the leading hyphen in the command is being stripped as if it were an option.

Long form of the option (--location=... instead of -l ...)

This worked fine.

~/feeder$ lmr probe-flow --location="-0.06,0.0,0.0" -v -v -v
lmr probe-flow: Begin program.
lmr probe-flow: Probing flow field.
lmr probe-flow: Probing flow field for snapshot 0010.
---
snapshot: 0010
lmr probe-flow: Probing flow field at location [-0.06,0,0]
pointdata:
  - x: -0.0596995
    y: 0.000606361
    z: nil
etc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions