# gp.pos

Syntax

v := gp.pos(gp)
gp.pos(gp) := v

Get/set the position of the gridpoint.

Note that changing position vectors during cycling will not update geometry-derived values calculated during an update. See the intrinsic zone.force.update.

Returns: v - position vector v - position vector z - zone pointer i - optional vector component, from 1 to 3

Component Access

f := gp.pos (gp)->x
gp.pos (gp)->x := f

f := gp.pos.x(gp)
gp.pos.x(gp) := f

Get/set the $$x$$-component of the position of the gridpoint.

Returns: f - $$x$$-component of the position vector f - $$x$$-component of the position vector gp - zone pointer

Access other vector components ($$y$$, $$z$$) by substituting the component name where $$x$$ appears above. See Member Access Operator for information about accessing members from data types using ->.

Deprecated Component Access

Component access by adding an optional integer in the function arguments (gp.pos(gp,<int>)) is deprecated. It remains available but will not be supported in future versions. See Component Access with Integers in FISH on the Deprecated Commands and FISH page for details.

This is hidden. Added to include remaining vector component access functions for inline help.

f := gp.pos.y(gp)
f := gp.pos.z(gp)