
CD-Section: Special Routines for Use with Laue Reflection Lists
C These routines enable flags to be set when Laue Reflection List
C (LRL) routine have been used to predict a set of spots. The LDM
C module keeps track of whether any of the parameters required for
C the prediction have been changed since the list was predicted and
C a routine is available to query such changes. This can be used to
C save regenerating lists when they are not required and checking
C when they need to be regenerated. These routines are used for example 
C by the  LRL_GEN routine  and if this is used to generate spot lists
C then the routines described in this section will not normally need
C to be called explicitly from an application program.
CD-end

C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_LRL_CALC     **
C**************************
C
CD-Routine: Set LRL Generation Flags - LDM_LRL_CALC
C This routine is used  to inform the Laue Data Module that a stage of
C the generation of a Laue Reflection List (LRL) for a given pack and plate
C has been completed. There are three stages identified in the generation
C of the LRL.
CD-end
CD-Fortran:
      SUBROUTINE LDM_LRL_CALC (IPACK, IPLATE, ISTAGE)
CD-end
      INCLUDE 'implicit_none.finc'
C
C Purpose: Set flags to indicate that LRL has been calculated (each of three
C          stages)
C
C Author:  John W. Campbell, July 1993
C
C Arguments:
C
      INTEGER IPACK
      INTEGER IPLATE
      INTEGER ISTAGE

CD-Parameters:
C IPACK   i (R)   Pack number of LRL generation
C IPLATE  i (R)   Plate number of LRL generation
C ISTAGE  i (R)   Stage = 1, matrix calculation
C                       = 2, LRL generation
C                       = 3, overlaps calculation
CD-end
C
C====== GLOBALS:
C
      INCLUDE 'ldm_lrl.finc'
C
C====== LOCALS:
C

C
C-------------------------------------------------------------------------------
C
      PKMTX = IPACK
      PLMTX = IPLATE
      IF (ISTAGE.LT.2) RETURN
      PKGEN = IPACK
      PLGEN = IPLATE
      IF (ISTAGE.LT.3) RETURN
      PKOVL = IPACK
      PLOVL = IPLATE
      RETURN
      END
