GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

*NodesCoord.

This command writes the node's coordinates. It must be inside a loop (see *loop) over the nodes or elements. The coordinates are considered as real numbers (see *realformat and *format). It will write two or three coordinates according to the number of dimensions the problem has (see *Ndime).

If *NodesCoord receives an integer argument (from 1 to 3) inside a loop of nodes, this argument indicates which coordinate must be written: x, y or z. Inside a loop of nodes:
*NodesCoord writes three or two coordinates depending on how many dimensions there are.
*NodesCoord(1) writes the x coordinate of the actual node of the loop.
*NodesCoord(2) writes the y coordinate of the actual node of the loop.
*NodesCoord(3) writes the z coordinate of the actual node of the loop.


If the argument real is given, the coordinates will be treated as real numbers.


Example: using *NodesCoord inside a loop of nodes

Coordinates:
Node X Y
*loop nodes
*format "%5i%14.5e%14.5e"
*NodesNum *NodesCoord(1,real) *NodesCoord(2,real)
*end nodes

This command effects a rundown of all the nodes in the mesh, listing their identifiers and coordinates (x and y).


The contents of the project_name.dat file could be something like this:

Coordinates:
Node        X                Y
    1  -1.28571e+001  -1.92931e+000
    2  -1.15611e+001  -2.13549e+000
    3  -1.26436e+001  -5.44919e-001
    4  -1.06161e+001  -1.08545e+000
    5  -1.12029e+001   9.22373e-002
    ...


*NodesCoord can also be used inside a loop of elements. In this case, it needs an additional argument that gives the local number of the node inside the element. After this argument it is also possible to give which coordinate has to be written: x, y or z.


Inside a loop of elements:
*NodesCoord(4) writes the coordinates of the 4th node of the actual element of the loop.
*NodesCoord(5,1) writes the x coordinate of the 5th node of the actual element of the loop.
*NodesCoord(5,2) writes the y coordinate of the 5th node of the actual element of the loop.
*NodesCoord(5,3) writes the z coordinate of the 5th node of the actual element of the loop.


  • No labels