Versions Compared

Key

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

...

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, ...) https://gidsimulation.atlassian.net/wiki/spaces/GPT/pages/2500165853

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 10 ..num_elements .

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 doubles.NNode doubles. Being Nnode the number of nodes per element as specified in https://gidsimulation.atlassian.net/wiki/spaces/GPT/pages/2500165853 .

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;
  xyz    connectivities[ i * 3 + 1 ] = G_nodeselems[ i ].yn2;
  xyz    connectivities[ i * 3 + 2 ] = G_nodeselems[ i ].z;
}
GiD_fWriteCoordinatesIdBlockn3;
      mat_ids[ i ] = 2;
    }
    GiD_fWriteElementsIdMatBlock( fdm, NUM_NODESELEMS, ids, connectivities, xyzmat_ids );