topology::Displacement - compute displacement vectorSynopsis:
from_gid to_gid Displacement -> [double vector]Description:
from_pos to_gid Displacement -> [double vector]
This function returns a vector connecting the position of the "from_gid"
node or the explicitly given "from_pos" position and the position of the
"to_gid" node. Nodes must be parts of topology layers.
The "from" position is projected into the layer of the "to_gid" node. If
this layer has periodic boundary conditions (EdgeWrap is true), then the
shortest displacement vector is returned, taking into account the
periodicity. Fixed grid layers are in this case extended so that the
nodes at the edges of the layer have a distance of one grid unit when
<< /rows 5
>> CreateLayer ;
4 5 Displacement
[0.2 0.3] 5 Displacement
from_gid - int, gid of node in a topology layer
from_pos - double vector, position in layer
to_gid - int, gid of node in a topology layer
[double vector] - vector pointing from position "from" to position "to"
Håkon Enger, Hans E Plesser, Kittel AustvollSource:
See also: Distance, GetPosition