UNSERIALIZE_INTEGERS allows you to reload integer data into your user subroutines when Solver is executing a RELOAD/ command.
Use
Called By
Any user-written subroutine
Prerequisite
The user subroutine is being called to unserialize data.
Calling Sequence
CALL UNSERIALIZE_INTEGERS (i_array, n)
Input Argument
n | An integer variable that specifies the number of values to un-serialize. |
Output Argument
i_array | An integer array to receive the serialized data. |
Example
F77:
IF(IFLAG .EQ. 3)THEN
... Make calls to sysfnc and sysary to set up dependencies ...
ELSEIF (IFLAG .EQ. 7)THEN
CALL SERIALIZE_INTEGERS(I_DATA, N_I_DATA)
ELSEIF (IFLAG .EQ. 9)THEN
CALL UNSERIALIZE_INTEGERS(I_DATA, N_I_DATA)
ENDIF
CXX:
switch(IFLAG){
case 3:
... Make calls to c_sysfnc and c_sysary to set up dependencies ...
case 7:
c_adams_serialize_integers(&i_dataSize, 1);
c_adams_serialize_integers(i_data, i_dataSize);
break;
case 9:
c_adams_unserialize_integers(&i_dataSize, 1);
if( i_data )free(i_data);
d_data= (int*) malloc(sizeof(int)*i_dataSize);
c_adams_unserialize_integers(i_data, i_dataSize);
break;
}