# block.gp.disp

Syntax

## Vector Access

v/f = block.gp.disp(bgpp<,i>)
block.gp.disp(bgpp<,i>) = v/f

Get/set the gridpoint displacement. If the optional argument i is supplied, the return value/assignment is restricted by vector component (1 = $$x$$, 2 = $$y$$, 3 = $$z$$).

Note that in 3DEC, displacement vectors are accumulated from velocities and timesteps every cycle. They have no direct effect on the model state. Displacements can be changed at any time without changing the forces or stresses in the model.

Returns: v or f - displacement vector or component v or f - displacement vector or component bgpp - block gridpoint pointer i - optional index of component

## Component Access

f = block.gp.disp.x(bdpp)
block.gp.disp.x(bdpp) = f

Get/set the $$x$$-component of the displacement vector.

Returns: f - $$x$$-component of the displacement vector f - $$x$$-component of the displacement vector bggp - gridpoint pointer
f = block.gp.disp.y(bdpp)
block.gp.disp.y(bdpp) = f

Get/set the $$y$$-component of the displacement vector.

Returns: f - $$y$$-component of the displacement vector f - $$y$$-component of the displacement vector bggp - gridpoint pointer
f = block.gp.disp.z(bdpp)
block.gp.disp.z(bdpp) = f

Get/set the $$z$$-component of the displacement vector.

Returns: f - $$z$$-component of the displacement vector f - $$z$$-component of the displacement vector bggp - gridpoint pointer