The solver requires elementÃ¢â‚¬â„¢s connectivities numbered sequentially from 1 to 101
I don't know what this mean.
Is this numeration possible in a generic mesh (unstructured triangles+tetrahedra, etc) ?
In any case: If do you need in the calculation file a very specific sorting of the elements you cannot directly use a function like
connectivities (or customlib::WriteConnectivities
that is a simplified proc version)
These functions do in implicit loop on the mesh, and allow a limited range of possibilities (covering most common cases)
They are made for efficiency, for meshes of millions of elements. They do the loop at C++ leval and using the native inner mesh data, without require create big arrays of numbers or call millions of callback functions.
In your case do you need to get the mesh information with Tcl funcions like
or others (see Help on GiD customization manual : TCL AND TK EXTENSION https://www.gidhome.com/support/gid-manuals
reorder the information as you need with Tcl scripting (be careful to not waste too much resources in auxiliary arrays, lists, objarray, ...) and then print the exact data you want in the calculation file
you can print for exampe an arbitrary string to the calculation file with
GiD_WriteCalculationFile puts $string
(note the the id of the file to be printed is not provided, it is printed to the file previously opened by a call to GiD_WriteCalculationFile init
or with GiD_File fprintf, e.g.
GiD_File fprintf $file_id "x=%15.5f y=%15.5f" $x $y
(in this case it require file_id that is the file identifier returned by GiD_WriteCalculationFile init
You can also open the file you want and print inside with standard Tcl command (open