Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If list_result_ids is omited, i.e. == NULL , then result value's id’s are assumed to be 1..num_result_values .

Parameters:

result_name, analysis_name, step_value, result_type, result_location, gauss_point_name, range_table_name, num_component_names, list_component_names[] are the same as in GiD_fBeginResult and GiD_fBeginResultHeader

num_result_values is the number of result values provided, i.e. number of scalars, or vectors, or tensors, etc.

list_result_ids is the array of node result id's and expected to be num_result_points values in size.xyz_array

num_component_values is the number of components per result value, for instance 1 for scalar, 2, 3, or 4 for vector, etc… as described in GiD_fBeginResult and GiD_fBeginResultHeader

list_component_values is the array of consecutive x, y and z coordinates of the num_points nodes, and it is result values, for instance v1v2v3v1v2v3... for 3-component vector result, and expected to have num_result_points * 3 values * num_component_values doubles.

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

Code Block

    const int ids[ num_components = 3; // xyz vector
    const int offset_value = 3000;
    double *scalar = create_dummy_result_block( num_components, NUM_NODES, offset_value ];
double xyz); // returns a malloc'ed vector
    // GiD_fWriteResultBlock includes BeginResult()/BeginValues() and EndValues()/EndResult()
    int list_ids[ NUM_NODES ];
 * 3 ]; for ( int i = 0; i < NUM_NODES; i++ ) {
      list_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,  }
    GiD_fWriteResultBlock( fdr, "VectorNodos", "Analysis", 1.0, GiD_Vector, GiD_OnNodes, NULL, NULL, 0, NULL,
                           NUM_NODES, list_ids, xyznum_components, scalar );
    free( scalar );