...
Write the connectivities array of the elements of the current mesh. These functions include GiD_fBeginElements()
and GiD_fEndElements()
. All elements are of the same type EType
as described in GiD_fBeginMesh( ..., GiD_ElementType EType, ...) / GiD_fBeginMeshColor( ..., GiD_ElementType EType, ...)
, GiD_fBeginMeshColor
If GiD_fWriteElementsBlock()
or GiD_fWriteElementsMatBlock()
are used, i.e. no list of element's id’s are provided, then the element's id’s are assumed to be 1..num_elements
.
If GiD_fWriteElementsBlock()
or GiD_fWriteElementsMatBlockfWriteElementsIdBlock()
are used, i.e. no list of elements id's element’s materials are provided, then the elements id's are assumed to be 1..num_elements
0
.
Parameters:
list_ids
is the array of node element’s id's and expected to be num_
points elements
in size.xyz_array
list_material_id
is the array of element's material's and expected to be num_elements
in size.
connectivities
is the array consecutive x, y and z coordinates element’s connectivities of the num_
points nodeselements
, and it is expected to have num_
points elements *
3 doublesNNode
doubles. Being Nnode
the number of nodes per element as specified in GiD_fBeginMesh, GiD_fBeginMeshColor .
Example:
C/C++ as in testpost_fd.c
:
Code Block |
---|
int ids[ NUM_NODESELEMS ]; doubleint xyzconnectivities[ NUM_NODESELEMS * 3 ]; int mat_ids[ NUM_ELEMS ]; for ( int i = 0; i < NUM_NODESELEMS; i++ ) { ids[ i ] = G_nodeselems[ i ].id; xyz connectivities[ i * 3 + 0 ] = G_nodeselems[ i ].xn1; xyzconnectivities[ i * 3 + 1 ] = G_nodeselems[ i ].yn2; xyzconnectivities[ i * 3 + 2 ] = G_nodeselems[ i ].z; } GiD_fWriteCoordinatesIdBlockn3; mat_ids[ i ] = 2; } GiD_fWriteElementsIdMatBlock( fdm, NUM_NODESELEMS, ids, xyzconnectivities, mat_ids ); |