Description
Return minimum-image signed displacement and distance.
Numerical grids and sampled modes require explicit coordinate, boundary and sign conventions. A staggered location, minimum-image gap or Nyquist label is one component of a discretization rather than a complete field solve or unique physical interpretation.
Return minimum-image signed displacement and distance.
When to use this tool
Use Periodic Boundary Two Image Distance when checking the stated grid-coordinate, periodic-image or sampled-mode convention.
How to use the tool and how it works
- Enter first, second, period. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read signedDisplacement, distance. Use the output convention below.
Return minimum-image signed displacement and distance. Require period > 0; signedDisplacement = modulo(second-first+period/2,period)-period/2 and distance is its magnitude.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Finite number. |
| second | Second | Required. Finite number. |
| period | Period | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| signedDisplacement | Signed Displacement | Required. Finite number. |
| distance | Distance | Required. Finite number. |
{
"input": {
"first": 9,
"second": 1,
"period": 10
},
"output": {
"signedDisplacement": 2,
"distance": 2
}
} Limitations and assumptions
- The exact half-period tie is negative; this is one periodic axis, not a full nearest-image search in an arbitrary cell.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the complete mesh, transform convention and boundary conditions for a consistent numerical simulation or physical interpretation.
References
Similar or alternative tools
- Periodic Image Half Cell Tie Token
Return nearest periodic displacement with an explicit half-cell tie.
- Computational Physics: Lattice Periodic Neighbor
Return a displaced lattice coordinate with explicit boundary handling.