GiD_Mesh create|delete|edit|get|list
To create, delete, modify, list or know information about mesh nodes or elements of the preprocess:
create: to create a new node or element
GiD_Mesh create node <num>|append <x y z>
- <num>|append: <num> is the identifier (integer > 0) for the node. You can use the word 'append' to set a new number automatically. The number of the created entity is returned as the result.
- <x y z> are the node coordinates. If the z coordinate is missing, it is set to z=0.0.
GiD_Mesh create element <num>|append <elemtype> <nnode> <N1 ... Nnnode> <radius> <nx> <ny> <nz> ?<matname>?
- <num>|append: <num> is the identifier (integer > 0) for the node. You can use the word 'append' to set a new number automatically. The number of the created entity is returned as the result.
- <elemtype>: must be one of "Point | Line | Triangle | Quadrilateral | Tetrahedra | Hexahedra | Prism | Pyramid | Sphere | Circle"
- <nnode> is the number of nodes an element has
- <N1 ... Nnnode> is a Tcl list with the element connectivities
- <radius> is the element radius, only for sphere and circle elements
- <nx> <ny> <nz> is the normal of the plane that contain the circle, must be specified for circle elements only
- <matname> is the optional element material name
delete: to delete one or more nodes or elements
GiD_Mesh delete node|element <num_1 ... num_n>
<num> is the identifier (integer > 0) for the node or element to be deleted. It is possible to use a list of multiple ids.
edit: to modify a node or element
GiD_Mesh edit node <num> <x y z>
GiD_Mesh edit element <num> <elemtype> <nnode> <N1 ... Nnnode> <radius> <nx> <ny> <nz> ?<matname>?
Same syntax as create
or
GiD_Mesh edit node|element <num> material|label_on|selected <value>
<num> the entity id
<material> to set the material number (value>=0)
<label_on> to set the label flat (value 0 or 1)
<selected> to set the selection flag (value 0 or 1)
get: to get the information of a node or element
GiD_Mesh get node <num> ?coordinates|material|label_on|selected?
It return the list: <node_layer> <x> <y> <z>
with the extra word
- coordinates only the <x> <y> <z> coordinates are returned
- material: the material integer id is returned
- label_on: 0 or 1 is returned (label flag)
- selected: 0 or 1 is returned (selection flag)
GiD_Mesh get element <num>|from_face|from_edge ?face|face_linear|num_faces|edge_linear|num_edges|normal|tangent|center|connectivities|geometry_source|material|label_on|selected
?<face_id>|<edge_id>??
- <num> is the identifier (integer > 0) for the element to be asked
- face optional, instead of the element nodes it returns the nodes of the face, first the linear corner nodes and then the quadratic nodes
- face_linear optional, instead of the element nodes it returns only the linear corner nodes, also is the element is quadratic
- num_faces returns the amount of faces of the element (for surface elements its edges act as faces)
- <face_id> is the local face index from 1 to the number of faces of the element. If <face_id> is missing then a list with all faces is returned
- edge_linear optional, instead of the element nodes it returns only the linear edge nodes, also is the element is quadratic
- num_edges returns the amount of edges of the element
- <edge_id> is the local edge index from 1 to the number of edges of the element. If <edge_id> is missing then a list with all edges is returned
- normal return a 3D vector with the normal direction for surface elements (and for line elements in 2D the normal to the tangent)
- tangent return a 3D vector with the tangent direction for line elements
- center return a 3D vector with the element center
- connectivities return a list of integers with the element's nodes
- geometry_source return a list where the first item is the category: POINT_LT|LINE_LT|SURFACE_LT|VOLUME_LT and then the integer ids of the geometric entity source of the mesh element (usually one entity, but could be more than one meshing with Rjump)
material: the material integer id is returned
label_on: 0 or 1 is returned (label flag)
selected: 0 or 1 is returned (selection flag)
get element return the list: <element_layer> <elemtype> <nnode> <N1> ... <Nnnode>
get element face|face_linear: <N1_face> ... <Nnnode_face>
get element edge_linear: <N1_edge> <N2_edge>
If from_face is specified then the command has this syntax
GiD_Mesh get element from_face <face_nodes> ?-ordered?
it find and return the list of element ids that have a face with these nodes
- <face_nodes> is the list of integer ids of the face nodes {<face_node_1> ... <face_node_n>} (only corner lineal nodes must be specified in the list)
- if -ordered is specified then only faces with the same orientation of the nodes will be taken into account (else the order of the face nodes doesn't matter)
If from_edge is specified then the command has this syntax
GiD_Mesh get element from_edge <edge_nodes>
it find and return the list of element ids that have an edge with these nodes
- <edge_nodes> is the list of integer ids of the edge nodes {<edge_node_1> <edge_node_2>} (only corner lineal nodes must be specified in the list)
Note: get element from_face or from_edge could be an expensive operation because the whole mesh is traversed to find them.
GiD_Mesh get nodesdistance <num1> <num2>
returns the distance between two mesh nodes, specified by its numbers
list: to get a list of entity identifiers of a range, filtered with some conditionals
- GiD_Mesh list ?<filter_flags>? node|element|face ?<num>|<num_min:num_max>?
<filter_flags> could be: ?-higherentity <num_higher>? ?-material <id_material>? ?-layer <layer_name>? ?-plane {a b c d r}? ?-element_type <types_allowed>?
-higherentity <num_higher> to filter the selection and list only the entities with the amount of parents equal to <num_higher> (integer >=0)
-material <id_material>to filter the selection and list only the entities with material id equal to <id_material> (integer >=0)
-layer <layer_name>to filter the selection and list only the entities with layer equal to <layer_name>
-plane <a b c d r> to list only the entities wigth center that match the plane equation a*x+b*y+c*z+d<=r (r>=0.0)
-element_type <types_allowed> to list only the elements of a type contained in <types_allowed>, that must be a list of allowed types ("Point | Line | Triangle | Quadrilateral | Tetrahedra | Hexahedra | Prism | Pyramid | Sphere | Circle")
if <num> or <num_min:num_max> are not provided it is considered as 1:end, and then all ids are returned
In case of face it is returned a value with two lists: element_ids and face_index
Each face is identified by the element_id and the local face_index (form 1 to the number of faces of the element)
the valid flags are
GiD_Mesh list ?-unique? ?-normals_dotprod_threshold <threshold_value> -higherentity|higherentity_not <higherentity> -element_type <list_of_types> face
-unique is to avoid repeat faces shared between multiple elements, only one is arbitrary retained
-normals_dotprod_threshold <threshold_value> is to get only the faces (edges really) that belong to tho surface elements with dot product of its normals below the threshold_value (from 1.0 to -1.0). e.g. -0.9 for problematic faces of folded elements. In this case is implicit -higherentity 2 and -element_type {triangle quadrilateral}
-higherentity <higherentity> is to get only faces that belong exactly to <higherentity> elements (an integer number > 0)
-higherentity_not <higherentity> is to get only faces that not belong to <higherentity> elements
-element_type <list_of_types> is a list of types of elements (faces of other types are ignored). By now only triangle, quadrilateral
Examples:
GiD_Mesh create node append {1.5 3.4e2 6.0} GiD_Mesh create element 58 triangle 3 {7 15 2} steel GiD_Mesh delete element {58 60} set triangles_and_quads [GiD_Mesh list -element_type {triangle quadrilateral} element]