GiD - The personal pre and post processor

GiD_MeshPre


GiD_MeshPre create <layer_name> <element_type> <element_num_nodes> ?-zero_based_array? <node_ids> <node_coordinates> <element_ids> <element_connectivities> ?<radius+?normals?>?
To create a preprocess mesh.
This command create all mesh nodes and elements in a single step (unlike GiD_Mesh that create each node or element one by one)

  • <layer_name>: the name of the layer where the nodes and elements will be created. If it is and empty string then it defaults to the current layer in use.
  • <element_type>: must be one of "point | line | triangle | quadrilateral | tetrahedra | hexahedra | prism | pyramid | sphere | circle"

It could be "" if <element_num_nodes>==0 and <elements_ids> and <element_connectivities>, to define only nodes.

  • <element_num_nodes>: is the number of nodes an element has. All elements of the mesh must have the same number of nodes.
  • -zero_based_array: optional flag. By default node and element indexes start from 1, but setting this flag indexes must start from 0.
  • <node_ids>: list of node identifiers. If it is an empty list them numeration is implicitly increasing.
  • <node_coordinates>: a list of real numbers with the thee coordinates of each node {x0 y0 z0 ... xnn-1 ynn-1 znn-1}

It is valid a zero size array for <node_ids> and <node_coordinates> if the nodes of the elements already exists

  • <element_ids>: list of element identifiers. If it is an empty list them numeration is implicitly increasing.
  • <element_connectivities>: a list of integers with the <element_num_nodes> nodes of each element: the id of each node is the location on the vector of nodes, starting from 0
  • <radius+normals>:
    • <radius>:only for spheres. Is a list of reals with the radius or each sphere {r0 ... rne-1}
    • <normals>:only for circles. Is a list of reals with the radius and normal to the plane or each circle {r0 nx0 ny0 nz0 ... rne-1 nxne-1 nyne-1 nzne-1}

It is valid a zero size array for <element_ids>, <element_connectivities> and <radius+normals> to create only nodes.


Example: to create a mesh with 4 nodes and 2 triangles in the current layer in use.

package require objarray 
set nodes_coordinates [objarray new doublearray -values {-4.64 -1.03 0.0 -4.65 1.66 0.0 -8.24 -1.03 0.0 -8.24 1.66 0.0}]
set element_connectivities [objarray new intarray -values {1 3 0 3 2 0}]
GiD_MeshPre create "" Triangle 3 -zero_based_array {} $nodes_coordinates {} $element_connectivities



COPYRIGHT © 2022 · GID · CIMNE