Changeset c28deba


Ignore:
Timestamp:
12/08/10 18:33:53 (2 years ago)
Author:
Oleg Batrashev <ogbash@…>
Branches:
master, external, fix-prolong, refactor, refactor-ext, refactor-subsolvers
Children:
4bce076, 6c6ce1a
Parents:
dd63f9f
git-author:
Oleg Batrashev <ogbash@…> (12/08/10 18:33:53)
git-committer:
Oleg Batrashev <ogbash@…> (12/08/10 18:33:53)
Message:

Compact mesh plotting code.

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/datatypes/Mesh.F90

    rbd99c62 rc28deba  
    15051505    ! Send/recv 'eptnmap' 
    15061506    if (present(eptnmap)) then 
     1507       call MPI_BCAST(M%nparts, 1, MPI_INTEGER, & 
     1508            D_MASTER, MPI_COMM_WORLD, ierr) 
     1509 
    15071510       if (ismaster()) then 
    15081511          do p = 1,numprocs-1 
     
    15141517          call MPI_RECV(M%eptnmap, M%nell, MPI_INTEGER, & 
    15151518               D_MASTER, D_TAG_MESH_EPTNMAP, MPI_COMM_WORLD, status, ierr) 
     1519          M%parted = .true. 
    15161520       end if 
    15171521    end if 
     
    16431647  !! Plotting routines 
    16441648  ! 
     1649 
     1650  !> Show a sequence of plots of the mesh. 
     1651  subroutine Mesh_pl2D_mesh(Msh) 
     1652    type(Mesh), intent(inout) :: Msh 
     1653 
     1654    call Mesh_pl2D_pointCloud(Msh,D_PLPLOT_INIT) 
     1655    ! Plots mesh's dual graph 
     1656    call Mesh_pl2D_plotGraphDual(Msh,D_PLPLOT_END) 
     1657    ! Mesh & its Dual Graph 
     1658    call Mesh_pl2D_plotMesh(Msh, D_PLPLOT_INIT) 
     1659    call Mesh_pl2D_plotGraphDual(Msh, D_PLPLOT_END) 
     1660  end subroutine Mesh_pl2D_mesh 
     1661 
     1662  !> Show plots of the mesh partitions. 
     1663  subroutine Mesh_pl2D_partitions(Msh) 
     1664    type(Mesh), intent(inout) :: Msh 
     1665 
     1666    ! Draw colored partitoined graph 
     1667    call Mesh_pl2D_plotGraphParted(Msh) 
     1668 
     1669    ! Plot partitions of the mesh 
     1670    ! NB: Check for multivariable case! TODO 
     1671    call Mesh_pl2D_Partition(Msh) 
     1672    ! Partition with Dual Graph upon it 
     1673    call Mesh_pl2D_Partition(Msh, D_PLPLOT_INIT) 
     1674    call Mesh_pl2D_plotGraphDual(Msh, D_PLPLOT_CONT) 
     1675    call Mesh_pl2D_pointCloud(Msh,D_PLPLOT_END) 
     1676  end subroutine Mesh_pl2D_partitions 
     1677 
    16451678  !------------------------------------------------ 
    16461679  !! Plot cloud field 
     
    24822515       end do 
    24832516 
    2484        if (M%nfrelt(e) == 1) then ! 1-node boundary element 
     2517       if (M%nfrelt(e) == 0) then 
     2518          cycle 
     2519 
     2520       else if (M%nfrelt(e) == 1) then ! 1-node boundary element 
    24852521 
    24862522          ! Fake centre of 1-node element by simply assigning to 
  • src/main/main_drivers.F90

    rbd99c62 rc28deba  
    149149    ! Partition mesh's dual graph 
    150150    if (ismaster()) then 
    151  
    152        !! Build dual graph (Graph object is a data field in Mesh class) 
    153        !call Mesh_buildGraphDual(Msh) 
    154  
    155151       if (sctls%plotting == D_PLOT_YES) then 
    156  
    157           call Mesh_pl2D_pointCloud(Msh,D_PLPLOT_INIT) 
    158           ! Plots mesh's dual graph 
    159           call Mesh_pl2D_plotGraphDual(Msh,D_PLPLOT_END) 
    160           ! Mesh & its Dual Graph 
    161           call Mesh_pl2D_plotMesh(Msh, D_PLPLOT_INIT) 
    162           call Mesh_pl2D_plotGraphDual(Msh, D_PLPLOT_END) 
     152          call Mesh_pl2D_mesh(Msh) 
    163153       end if 
    164154 
    165155       ! Partition graph: D_PART_PMETIS, D_PART_KMETIS, D_PART_VKMETIS 
    166156       call Mesh_partitionDual(Msh, nparts, D_PART_VKMETIS, part_opts) 
    167  
    168157       if (sctls%plotting == D_PLOT_YES) then 
    169           ! Draw colored partitoined graph 
    170           call Mesh_pl2D_plotGraphParted(Msh) 
    171  
    172           ! Plot partitions of the mesh 
    173           ! NB: Check for multivariable case! TODO 
    174           call Mesh_pl2D_Partition(Msh) 
    175           ! Partition with Dual Graph upon it 
    176           call Mesh_pl2D_Partition(Msh, D_PLPLOT_INIT) 
    177           call Mesh_pl2D_plotGraphDual(Msh, D_PLPLOT_CONT) 
    178           call Mesh_pl2D_pointCloud(Msh,D_PLPLOT_END) 
    179        end if 
    180  
    181        ! Destroy previously created graph (purely to save memory) 
    182        ! (If it is not killed here or somewere else Mesh_Destroy() 
    183        !  will kill it any way) 
    184        !call Mesh_destroyGraph(Msh) 
    185     else ! SLAVES 
    186        ! Number of partions the mesh was partitioned into 
    187        Msh%nparts = nparts 
    188        Msh%parted = .true. 
    189     end if 
     158          call Mesh_pl2D_partitions(Msh) 
     159       end if 
     160    endif 
    190161 
    191162    ! Distribute elements to partitons map among slaves 
Note: See TracChangeset for help on using the changeset viewer.