If you have an existing 1.0 API Reader and you desire to convert it to a 2.0 API reader, to take advantage of new capabilities, or the improved efficiency, the following may be helpful.
First the Good News!
The following routines were identical in both API's at the time that the 2.0 API was produced.
USERD_bkup
USERD_get_block_coords_by_component
USERD_get_block_iblanking
USERD_get_changing_geometry_status
USERD_get_dataset_query_file_info
USERD_get_element_label_status
USERD_get_name_of_reader
USERD_get_node_label_status
USERD_get_number_of_files_in_dataset
USERD_get_number_of_model_parts
USERD_get_number_of_variables
USERD_set_filenames
USERD_stop_part_building
Second, pretty Good News!
The following routines have minor changes, namely a slight name change and the addition of arguments related to complex data, constant type, or self contained parts vs global coords.
Note: The name changes are needed so both API's can exist together.
The arguments must be added, but depending on your situation, many might simply be place holders.
A) Changes related to imaginary flag for complex data If you don't deal with complex variables, simply add this flag to your argument list and ignore its value. |
|
API 1.0 |
API 2.0 |
|
|
|
) |
|
|
B) Changes related to complex data info, and constant type (and some of the multiple timeset support). If you don't deal with complex variables, simply add the arguments for
The argument The argument |
|
API 1.0 |
API 2.0 |
|
|
C) Changes related to self contained part coordinates. The number_of_nodes argument needs to be added and set for each part. This one is critical for you to do. |
|
API 1.0 |
API 2.0 |
|
|
D) Changes related to multiple timeset support. The timeset_number argument needs to be added for the following three routines. The multiple timeset support also includes the change in B) above for
|
|
API 1.0 |
API 2.0 |
|
|
|
|
|
|
Third, deleted and new routines. (Here is where the work lies).
Several old routines are gone. You will have to create the new routines that replace them. I think you will find in most cases that your old routines will form the basis of the new routines, and that it isn't too difficult to provide the information in the new way.
See Detailed Specifications for the needed information on these new routines.
API 1.0 |
API 2.0 |
These routines: |
replaced by the single routine: |
These global coordinate routines: |
replaced by part coord routines: |
These par connectivity routines: |
replaced by part by type routines: |
(Can be a sample) -> (Can be a sample) -> (Required) -> |
These are new routines: |
(Required) -> (Required) -> (Required) -> |
multiple timeset related: |
(Required) -> (Can be a sample) -> |
border provided by the reader option: |
(Can be a sample) -> |
transient model allocation efficiency: |
(Can be a sample) -> |
possible use with Server-of-Servers: |
Required routines added after version 2.00 (Many can be sample routines, depending on features needed): USERD_get_ghosts_in_block_flag USERD_get_ghosts_in_model_flag USERD_get_number_of_material_sets USERD_get_nfaced_nodes_per_face |
|
Also note the various optional routines which can be in the 2.0 API. See the Routine History for an easy identification of these routines |