NAME

PMD_Schur_1DD - Builds the Schur matrix.

SYNOPSIS

CALL PMD_Schur_1DD(Comm=comm, LocalSolver, FirstDerivative, Operator=Op, Schur=schur)

PARAMETERS

<IN>  comm            : PMD handel of type PMD_Comm_1D or PMD_Comm_2D.
<IN>  LocalSolver     : EXTERNAL routine. A user defined routine
                        to solve the local problem. The parameters of this routine have
                        to be defined as the following depending on wether the operator
                        matrix is dense or tridiagonal:

                        SUBROUTINE LocalSolver( Comm, Dense, Source, Field )
                          USE PMD
                          TYPE(PMD_Comm_1[or 2]D), INTENT(IN)                 :: Comm
                          REAL(kind=R4[or 8]), INTENT(IN), DIMENSION(:,:)     :: Dense
                          REAL(kind=R4[or 8]), INTENT(IN), DIMENSION(:[,:])   :: Source
                          REAL(kind=R4[or 8]), INTENT(OUT), DIMENSION(0:[,:]) :: Field
                        END SUBROUTINE LocalSolver


                        SUBROUTINE LocalSolver( Comm, Low, Main, Upper, Source, Field )
                          USE PMD
                          TYPE(PMD_Comm_1[or 2]D), INTENT(IN)                 :: Comm
                          REAL(kind=R4[or 8]), INTENT(IN), DIMENSION(:[,:])   :: Low, Main, Upper
                          REAL(kind=R4[or 8]), INTENT(IN), DIMENSION(:[,:])   :: Source
                          REAL(kind=R4[or 8]), INTENT(OUT), DIMENSION(0:[,:]) :: Field
                        END SUBROUTINE LocalSolver

<IN>  FirstDerivative : EXTERNAL routine. A user defined routine
                        to compute the first normal derivative at the subdomain
                        interfaces. In a 1D Domain decomposition context, two normal
                        first derivatives have to be computed. One at the WEST
                        interface and the other at the EAST interface of each
                        subdomain. The parameters of this routine have
                        to be defined as the following:

                        SUBROUTINE FirstDerivative( Comm, Field, Source, WestFD, EastFD )
                          USE PMD
                          TYPE(PMD_Comm_1[or 2]D), INTENT(IN)                :: Comm
                          REAL(kind=R4[or 8]), INTENT(IN), DIMENSION(0:[,:]) :: Field
                          REAL(kind=R4[or 8]), INTENT(IN), DIMENSION(:[,:])  :: Source
                          REAL(kind=R4[or 8]), INTENT(OUT)[, DIMENSION(:)]   :: WestFD, EastFD
                        END SUBROUTINE FirstDerivative

<IN>  Op              : PMD handel of type PMD_R4_Ge_Operator or PMD_R8_Ge_Operator
                        or PMD_R4_Tr_Operator or PMD_R8_Tr_Operator
                        (see PMD_Operator_1DD).
<OUT> schur           : PMD handel of type PMD_R4_Schur or PMD_R8_Schur.

EXAMPLES

In the example below, we assume a 2D problem where each local operator is represented by a General dense matrix.
     PROGRAM Myprog
     USE PMD
     INTEGER, PARAMETER              :: Nx=21, Ny=51
     TYPE(PMD_Comm_2D)               :: comm
     TYPE(PMD_R8_Schur)              :: schur
     TYPE(PMD_R8_Ge_Operator)        :: Op
     REAL(kind=R8), DIMENSION(Nx,Ny) :: Ge
     EXTERNAL MyLocalSolver, MyFirstDerivative
     ...
     Ge(:,:) = ...
     CALL PMD_Operator_1DD( comm, Dense=Ge, Operator=Op )
     CALL PMD_Schur_1DD( comm, MyLocalSolver, MyFirstDerivative, Op, schur )
     ...
     END PROGRAM Myprog

     SUBROUTINE MyLocalSolver( comm, Ge, source, field )
       USE PMD
       TYPE(PMD_Comm_2D), INTENT(IN)               :: comm
       REAL(kind=R8), INTENT(IN), DIMENSION(:,:)   :: Ge, source
       REAL(kind=R8), INTENT(OUT), DIMENSION(0:,:) :: field
       ...
     END SUBROUTINE MyLocalSolver

     SUBROUTINE MyFirstDerivative( comm, field, source, WestFD, EastFD )
       USE PMD
       TYPE(PMD_Comm_2D), INTENT(IN)              :: comm
       REAL(kind=R8), INTENT(IN), DIMENSION(0:,:) :: field
       REAL(kind=R8), INTENT(IN), DIMENSION(:,:)  :: source
       REAL(kind=R8), INTENT(OUT), DIMENSION(:)   :: WestFD, EastFD
       ...
     END SUBROUTINE MyFirstDerivative
In most cases, the size of the rank 1 arrays WestFD and EastFD is equal Ny which represents the number of mesh nodes at each subdomain interface. In case of a 1D problem, WestFD and EastFD parameters reduce to scalars.

SEE ALSO

Back to the routines' list...
Last modified: Tue Nov 30 11:03:36 MET 1999