SUBROUTINE ReadPMData(&
lib,task,ext,nelx,nel,imxss,iphsp,ipsd,ips,nprpmx,nxpmx,nprpm,ngpm,phspm,zgpm,xgpm)
IMPLICIT NONE
!---------------------------------------------------------------------------------------
CHARACTER,INTENT(INOUT)::ext*3,lib*80,task*16
INTEGER,INTENT(INOUT)::nel,nelx
!---------------------------------------------------------------------------------------
INTEGER,INTENT(INOUT):: imxss,iphsp,ipsd,ips
!---------------------------------------------------------------------------------------
INTEGER,INTENT(INOUT)::nprpm,nprpmx,nxpmx,ngpm(nelx-1,nprpmx)
CHARACTER,INTENT(INOUT)::phspm(nprpmx)*24
DOUBLE PRECISION,INTENT(INOUT)::xgpm(nxpmx),zgpm(nxpmx)
!---------------------------------------------------------------------------------------
INTEGER iel,ipr
CHARACTER CreatePMFileName*9,task1*16
!---------------------------------------------------------------------------------------
task1=TRIM(task)//'_'//CreatePMFileName(imxss,iphsp,ipsd,ips)
!---------------------------------------------------------------------------------------
OPEN(10,FILE=TRIM(lib)//TRIM(task1)//'.'//ext,ACCESS='SEQUENTIAL',STATUS='UNKNOWN'&
,FORM='UNFORMATTED',ACTION='READ')
READ(UNIT=10)nprpm,((ngpm(iel,ipr),iel=1,nel-1),ipr=1,nprpm),(phspm(ipr),ipr=1,nprpm)&
,zgpm(1:SUM(ngpm(1:nel-1,1:nprpm))),xgpm(1:SUM(ngpm(1:nel-1,1:nprpm)))
CLOSE(10)
!---------------------------------------------------------------------------------------
RETURN
END