      SUBROUTINE GROUP_s ( GVALUE, LGVALU, FVALUE, GPVALU, NCALCG,
     *                   ITYPEG, ISTGPA, ICALCG, LTYPEG, LSTGPA,
     *                   LCALCG, LFVALU, LGPVLU, DERIVS, IGSTAT )
      INTEGER LGVALU, NCALCG, LTYPEG, LSTGPA
      INTEGER LCALCG, LFVALU, LGPVLU, IGSTAT
      LOGICAL DERIVS
      INTEGER ITYPEG(LTYPEG), ISTGPA(LSTGPA), ICALCG(LCALCG)
      REAL GVALUE(LGVALU,3), FVALUE(LFVALU), GPVALU(LGPVLU)
C
C  PROBLEM NAME : ALLINITU
C
      INTEGER IGRTYP, IGROUP, IPSTRT, JCALCG
      REAL GVAR
      IGSTAT = 0
      DO     3 JCALCG = 1, NCALCG
       IGROUP = ICALCG(JCALCG)
       IGRTYP = ITYPEG(IGROUP)
       IF ( IGRTYP .EQ. 0 ) GO TO     3
       IPSTRT = ISTGPA(IGROUP) - 1
       GO TO (    1,    2
     *                                                        ), IGRTYP
C
C  GROUP TYPE : TRIVIAL
C
    1  CONTINUE
       GVAR  = FVALUE(IGROUP)
       IF ( .NOT. DERIVS ) THEN
        GVALUE(IGROUP,1)= GVAR
       ELSE
        GVALUE(IGROUP,2)= 1.0
        GVALUE(IGROUP,3)= 0.0
       END IF
       GO TO     3
C
C  GROUP TYPE : L2
C
    2  CONTINUE
       GVAR  = FVALUE(IGROUP)
       IF ( .NOT. DERIVS ) THEN
        GVALUE(IGROUP,1)= GVAR * GVAR
       ELSE
        GVALUE(IGROUP,2)= GVAR + GVAR
        GVALUE(IGROUP,3)= 2.0
       END IF
    3 CONTINUE
      RETURN
      END
