SET_DGSE_TYPE

Subroutine SET_DGSE_TYPE is used to force Adams Solver C++ or Adams Solver FORTRAN to call a GSE's GSE_UPDATE subroutine at the end of each successful integration step or at the regular defined calling interval defined by the SAMPLE_PERIOD option.

Use

Called By

Subroutine GSE_UPDATE.

Prerequisite

GSE statement in dataset with discrete states.

Calling Sequence

CALL SET_DGSE_TYPE (id, type)

Input Arguments

 
id
An integer variable that specifies the ID of a discrete GSE object. A discrete GSE object is created by a GSE statement that has discrete states (for example, XD option).
type
Set this value to 1 if you need the GSE_UPDATE function to be called at each successful integration type step. Set this value to 0 when the standard behavior is required (GSE_UPDATE is called according to the SAMPLE_PERIOD option in the GSE statement).

Output Argument

No output arguments
 
Caution:  
Call this function from within a GSE_UPDATE subroutine when IFLAG is not zero.

Example

SUBROUTINE GSE_UPDATE (ID, TIME, PAR, NPAR, DFLAG, IFLAG, ND,
* XDplus1)
C
C Inputs:
C
INTEGER ID, NPAR, ND
DOUBLE PRECISION PAR(*), TIME
INTEGER          IFLAG, DFLAG
C
C Outputs:
DOUBLE PRECISION XDplus1(ND)
C
IF( IFLAG ) THEN
CALL SET_DGSE_TYPE(1)
ENDIF
C
C User code here.
RETURN
END