...
GiD_WriteCalculationFile init|end|puts|coordinates|all_connectivities|connectivities|nodes|elements|has_elements ?-elemtype <etype>? ?-localaxes <formatLADict> ""? ?-elements_faces all|elements|faces? ?-number_ranges <NRDict>? ?-unique? ?-multiple? ?-all_entities? ?-do_subst? ?-sorted? ?-count? ?-return? ?-print_faces_conecs ? -connec_ordering? corner_face_corner_face <groupsDict>
- GiD_WriteCalculationFile init ?-mode append? ?-encoding external|utf-8? <filename>
To open for writing the calculation file.
Before to print any information to the file it must be opened with this command. Next prints of GiD_WriteCalculationFile will use implicitly this opened channel.
GiD internal strings are utf-8 codified,
-encoding external : (default) strings to print are converted to the current external encoding.
-encoding utf-8: strings are not converted.e
It returns an file identifier that could be used with with 'GiD_File fprintf', but must not be used with Tcl standard print commands like 'puts' or 'write'
...
Code Block |
---|
GiD_WriteCalculationFile elements -elemtype Tetrahedra -elements_faces faces [dict create $group_name "element id:%d face index:%d\n"] |
Example: to print node id and the local axes (as 3 euler angles) of the nodes belonging to $group_name that have local axis assigned.
Code Block |
---|
GiD_WriteCalculationFile nodes -return -localaxes [dict create $group_name "%d Euler1=%.15g Euler2=%.15g Euler3=%.15g\n"] {} |