Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Note: This command is provided to allow efficiency and relative flexibility writing the mesh and tree data related to groups, traversing the data structures without the cost of create a serialized copy in memory.
It is not compulsory to use this command, it is possible, and sometimes necessary, to use other Tcl commands to get mesh, groups and other data and reorder the information in order to be written.

Note: To print mesh nodes or elements by layers it exists other specialized command: GiD_EntitiesLayers print <layer> nodes|elements ?-element_type <types_allowed>? ?-offset_element_num <offset>? ?-factor <factor>? <format> <channel>


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"] {}