nemo_mesh_size Subroutine

subroutine nemo_mesh_size(msh)

Arguments

Type IntentOptional AttributesName
type(mesh), intent(in) :: msh

Calls

proc~~nemo_mesh_size~~CallsGraph proc~nemo_mesh_size nemo_mesh_size interface~icontxt_ icontxt_ proc~nemo_mesh_size->interface~icontxt_ psb_snd psb_snd proc~nemo_mesh_size->psb_snd interface~nprocs_ nprocs_ proc~nemo_mesh_size->interface~nprocs_ psb_rcv psb_rcv proc~nemo_mesh_size->psb_rcv interface~mypnum_ mypnum_ proc~nemo_mesh_size->interface~mypnum_ psb_sum psb_sum proc~nemo_mesh_size->psb_sum proc~icontxt_ icontxt_ interface~icontxt_->proc~icontxt_ proc~nprocs_ nprocs_ interface~nprocs_->proc~nprocs_ proc~mypnum_ mypnum_ interface~mypnum_->proc~mypnum_

Contents

Source Code


Source Code

    SUBROUTINE nemo_mesh_size(msh)
        IMPLICIT NONE
        TYPE(mesh), INTENT(IN) :: msh
        INTEGER(kind=nemo_int_long_)   ::isz
        REAL:: sz,sz1
        INTEGER :: icontxt, mypnum, nprocs,ip
        icontxt=icontxt_()
        mypnum = mypnum_()
        nprocs = nprocs_()
        isz = msh%nemo_sizeof()
        sz=isz
        IF(mypnum == 0) THEN
            WRITE(*,'()')
            WRITE(*,*) 'On process',mypnum, 'mesh size',sz
        END IF
        DO ip = 1, nprocs - 1
            IF(mypnum == ip) THEN
                CALL psb_snd(icontxt,sz,0)
            ELSEIF(mypnum == 0) THEN
                CALL psb_rcv(icontxt,sz1,ip)
                WRITE(*,*) 'On process',ip, 'mesh size', sz1
            END IF
        END DO
        CALL psb_sum(icontxt,isz)
        IF (mypnum==0) THEN
            WRITE(*,*) 'Total size of mesh   :',isz
            WRITE(*,*)
        ENDIF
    END SUBROUTINE nemo_mesh_size