Now we want to output the desired results to the output file. The first line should be a title or a label as this lets the solver know where a loop section begins and ends. The end of this block of instructions will be signalled by the line END_GEOMETRY.


The next two of lines give the user information about what types of commands follow.

Firstly, a title for the first subsection, ELEMENTAL CONNECTIVITIES:


followed by a header that preceeds the output list:


The next part of the code concerns the elements of the model with the inclusion of the *loop instruction, followed in this case by the elems argument.

*loop elems

For each element in the model, GiD will output: its element number, by the action of the *elemsnum command, the material assigned to this element, using the *elemsmat command, and the connectivities associated to the element, with the *elemsConec command:

*elemsnum *elemsmat *elemsConec

*end elems

You can use the swap parameter if you are working with quadratic elements and if the listing mode of the nodes is non-hierarchical (by default, corner nodes are listed first and mid nodes afterwards):

*elemsnum *elemsmat *elemsConec(swap)

*end elems