Description
Return nearest periodic displacement with an explicit half-cell tie.
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 nearest periodic displacement with an explicit half-cell tie.
When to use this tool
Use Periodic Image Half Cell Tie Token when checking the stated grid-coordinate, periodic-image or sampled-mode convention.
How to use the tool and how it works
- Enter displacement, cellLength, tiePolicy. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read nearestDisplacement, tied. Inspect tied before interpreting the associated values.
Return nearest periodic displacement with an explicit half-cell tie. Require cellLength > 0 and tiePolicy positive or negative; wrap displacement into a cell, select shortest signed value and use policy at exact half length.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| displacement | Displacement | Required. Finite number. |
| cellLength | Cell Length | Required. Finite number; strictly above 0. |
| tiePolicy | Tie Policy | Required. Text; one of "positive", "negative"; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| nearestDisplacement | Nearest Displacement | Required. Finite number. |
| tied | Tied | Required. Boolean. |
{
"input": {
"displacement": 5,
"cellLength": 10,
"tiePolicy": "negative"
},
"output": {
"nearestDisplacement": -5,
"tied": true
}
} Limitations and assumptions
- One axis and exact equality are used; this is not a triclinic nearest-image calculation or tolerance-based tie test.
- 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 Boundary Two Image Distance
Return minimum-image signed displacement and distance.
- Computational Physics: Lattice Periodic Neighbor
Return a displaced lattice coordinate with explicit boundary handling.