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

« Previous Version 2 Current »

int GiD_fWriteCoordinatesBlock( GiD_FILE fd, int num_points, GP_CONST double *xyz_array );
int GiD_fWriteCoordinatesIdBlock( GiD_FILE fd, int num_points, GP_CONST int *list_ids, GP_CONST double *xyz_array );

Description:

Write the coordinates array of the current mesh or of all meshes. These functions include GiD_fBeginCoordinates() and GiD_fEndCoordinates().

If GiD_fWriteCoordinatesBlock() is used, i.e. no list of node id’s are provided, then the node id’s are assumed to be 1..num_points .

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