gp.pos

Syntax

Vector Access

v = gp.pos(gp<,i>)
gp.pos(gp<,i>) = v

Get/set the position of the gridpoint. Returns a vector, unless an optional component argument i is supplied, in which case it returns the component value.

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 or component

Accepts:

v - position vector or component

Arguments:

gp - gridpoint pointer

i - optional vector component, from 1 to 3

Component Access

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

Get/set the x-component position vector.

Returns:f - x-component position vector
Accepts:f - x-component position vector
Arguments:gp - gridpoint pointer
f = gp.pos.y(gp)
gp.pos.y(gp) = f

Get/set the y-component position vector.

Returns:f - y-component position vector
Accepts:f - y-component position vector
Arguments:gp - gridpoint pointer
f = gp.pos.z(gp)
gp.pos.z(gp) = f

Get/set the z-component position vector.

Returns:f - z-component position vector
Accepts:f - z-component position vector
Arguments:gp - gridpoint pointer