Initialize, Verify and Finalize

The workflow in some user options may require initialization, verify during the run and finalize tasks in the Engine.

Those cannot be done in the computational routines. Some possible usages are either specific license management for user option vendors, specific I/O handling.
  • Initialization is accomplished before the time step loop.
  • Check/verification is accomplished during the time step loop / Enables to force Radioss to exit properly
  • Finalization is accomplished at the end, before Radioss exits
Important: The “#ifdef” and “!DEC$” pre-compilation directives are mandatory for Windows compatibility. Do not remove them; otherwise, the routine will not be found by Radioss Engine.

Initialization

CALL  ENGINE_USER_INITIALIZE( NSPMD, NTHREAD, MY_RANK)
#ifdef _WIN64
!DEC$ ATTRIBUTES DLLEXPORT, DECORATE, ALIAS : "ENGINE_USER_INITIALIZE" :: ENGINE_USER_INITIALIZE
!DEC$ ATTRIBUTES REFERENCE :: NSPMD, NTHREAD,MY_RANK
#endif
Where,
LINE
Character string with the message.
NSPMD
Number of MPI domains in the Radioss job.
NTHREAD
Number of SMP domains in the Radioss job.
MY_RANK
Domain Number of MPI process.
MY_RANK takes the values from 0 to NSPMD-1.

Checks/Verification During Run

CALL ENGINE_USER_CHECK(MY_RANK,TSTOP,NCYCLE,TT,MSTOP)
#ifdef _WIN64
!DEC$ ATTRIBUTES DLLEXPORT, DECORATE, ALIAS : "ENGINE_USER_CHECK" :: ENGINE_USER_CHECK
!DEC$ ATTRIBUTES REFERENCE :: MY_RANK,TSTOP,NCYCLE,TT,MSTOP
#endif
Where,
LINE
Character string with the message.
MY_RANK
MY_RANK takes the values from 0 to NSPMD-1.
TSTOP
Final simulation time.
NCYCLE
Current explicit cycle number.
TT
Current simulation time.
MSTOP
Output value: if MSTOP > 0, Radioss will terminate with restart writing. Refer to Comment 1.

Finalization

CALL  ENGINE_USER_FINALIZE(MY_RANK)
#ifdef _WIN64
!DEC$ ATTRIBUTES DLLEXPORT, DECORATE, ALIAS : "ENGINE_USER_FINALIZE" :: ENGINE_USER_FINALIZE
!DEC$ ATTRIBUTES REFERENCE :: MY_RANK
#endif
Where,
LINE
Character string with the message.
MY_RANK
MY_RANK takes the values from 0 to NSPMD-1.

Comments

  1. MSTOP must always be set as return value. When MSTOP is greater than zero, Radioss will terminate by writing a restart file and eventually a last animation file.