## MA02JD

### Test if a matrix is an orthogonal symplectic matrix

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

      To compute || Q^T Q - I ||_F for a matrix of the form

                        [  op( Q1 )  op( Q2 ) ]
                   Q =  [                     ],
                        [ -op( Q2 )  op( Q1 ) ]

      where Q1 and Q2 are N-by-N matrices. This residual can be used to
      test wether Q is numerically an orthogonal symplectic matrix.

Specification

          DOUBLE PRECISION FUNCTION MA02JD( LTRAN1, LTRAN2, N, Q1, LDQ1, Q2,
         $                                  LDQ2, RES, LDRES )
    C     .. Scalar Arguments ..
          LOGICAL           LTRAN1, LTRAN2
          INTEGER           LDQ1, LDQ2, LDRES, N
    C     .. Array Arguments ..
          DOUBLE PRECISION  Q1(LDQ1,*), Q2(LDQ2,*), RES(LDRES,*)

Function Value

      MA02JD  DOUBLE PRECISION
              The computed residual.

Arguments

Mode Parameters

      LTRAN1  LOGICAL
              Specifies the form of op( Q1 ) as follows:
              = .FALSE.:  op( Q1 ) = Q1;
              = .TRUE. :  op( Q1 ) = Q1'.

      LTRAN2  LOGICAL
              Specifies the form of op( Q2 ) as follows:
              = .FALSE.:  op( Q2 ) = Q2;
              = .TRUE. :  op( Q2 ) = Q2'.

Input/Output Parameters

      N       (input) INTEGER
              The order of the matrices Q1 and Q2.  N >= 0.

      Q1      (input) DOUBLE PRECISION array, dimension (LDQ1,N)
              On entry, the leading N-by-N part of this array must
              contain the matrix op( Q1 ).

      LDQ1    INTEGER
              The leading dimension of the array Q1.  LDQ1 >= MAX(1,N).

      Q2      (input) DOUBLE PRECISION array, dimension (LDQ2,N)
              On entry, the leading N-by-N part of this array must
              contain the matrix op( Q2 ).

      LDQ2    INTEGER
              The leading dimension of the array Q2.  LDQ2 >= MAX(1,N).

Workspace

      RES     DOUBLE PRECISION array, dimension (LDRES,N)

      LDRES   INTEGER
              The leading dimension of the array RES.  LDRES >= MAX(1,N).

Method

      The routine computes the residual by simple elementary operations.

Further Comments

      None

Example

Program Text

      None

Program Data

      None

Program Results

      None

Return to Supporting Routines index