GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

int GiD_fWriteElementsBlock( GiD_FILE fd, int num_elements, GP_CONST int *connectivities );
int GiD_fWriteElementsIdBlock( GiD_FILE fd, int num_elements, GP_CONST int *list_ids, GP_CONST int *connectivities );

int GiD_fWriteElementsMatBlock( GiD_FILE fd, int num_elements, GP_CONST int *connectivities, GP_CONST int *lst_material_id );

int GiD_fWriteElementsIdMatBlock( GiD_FILE fd, int num_elements, GP_CONST int *list_ids, GP_CONST int *connectivities, GP_CONST int *lst_material_id );

Description:

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 as described in GiD_fBeginMesh( ..., GiD_ElementType EType, ...) / GiD_fBeginMeshColor( ..., GiD_ElementType EType, ...)

If GiD_fWriteElementsBlock() or GiD_fWriteElementsMatBlock() are used, i.e. no list of elements id's are provided, then the elements id's are assumed to be 1..num_elements .

Parameters:

list_ids is the array of node id's and expected to be num_points in size.

xyz_array is the array consecutive x, y and z coordinates of the num_points nodes, and it is expected to have num_points * 3 doubles.

Example:
C/C++ as in testpost_fd.c :

int ids[ NUM_NODES ];
double xyz[ NUM_NODES * 3 ];
for ( int i = 0; i < NUM_NODES; i++ ) {
  ids[ i ] = G_nodes[ i ].id;
  xyz[ i * 3 + 0 ] = G_nodes[ i ].x;
  xyz[ i * 3 + 1 ] = G_nodes[ i ].y;
  xyz[ i * 3 + 2 ] = G_nodes[ i ].z;
}
GiD_fWriteCoordinatesIdBlock( fdm, NUM_NODES, ids, xyz );
  • No labels